Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140545
b: refs/heads/master
c: 996867d
h: refs/heads/master
i:
  140543: 5428660
v: v3
  • Loading branch information
Rusty Russell committed Mar 13, 2009
1 parent b655a95 commit 7ed5f4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ad728f98162cb1af06a85b2a5fc422dddd4fb78
refs/heads/master: 996867d0965775dfa62447d0bddb5dc6818a7892
10 changes: 6 additions & 4 deletions trunk/arch/x86/kernel/cpu/mcheck/mce_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ static struct sysdev_attribute *mce_attributes[] = {
NULL
};

static cpumask_t mce_device_initialized = CPU_MASK_NONE;
static cpumask_var_t mce_device_initialized;

/* Per cpu sysdev init. All of the cpus still share the same ctl bank */
static __cpuinit int mce_create_device(unsigned int cpu)
Expand Down Expand Up @@ -1021,7 +1021,7 @@ static __cpuinit int mce_create_device(unsigned int cpu)
if (err)
goto error2;
}
cpu_set(cpu, mce_device_initialized);
cpumask_set_cpu(cpu, mce_device_initialized);

return 0;
error2:
Expand All @@ -1043,7 +1043,7 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
{
int i;

if (!cpu_isset(cpu, mce_device_initialized))
if (!cpumask_test_cpu(cpu, mce_device_initialized))
return;

for (i = 0; mce_attributes[i]; i++)
Expand All @@ -1053,7 +1053,7 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
sysdev_remove_file(&per_cpu(device_mce, cpu),
&bank_attrs[i]);
sysdev_unregister(&per_cpu(device_mce,cpu));
cpu_clear(cpu, mce_device_initialized);
cpumask_clear_cpu(cpu, mce_device_initialized);
}

/* Make sure there are no machine checks on offlined CPUs. */
Expand Down Expand Up @@ -1162,6 +1162,8 @@ static __init int mce_init_device(void)
if (!mce_available(&boot_cpu_data))
return -EIO;

alloc_cpumask_var(&mce_device_initialized, GFP_KERNEL);

err = mce_init_banks();
if (err)
return err;
Expand Down

0 comments on commit 7ed5f4b

Please sign in to comment.