Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / arch / x86_64 / kernel / mce.c
index 4e017fb..c69fc43 100644 (file)
@@ -562,7 +562,7 @@ static struct sysdev_class mce_sysclass = {
        set_kset_name("machinecheck"),
 };
 
-DEFINE_PER_CPU(struct sys_device, device_mce);
+static DEFINE_PER_CPU(struct sys_device, device_mce);
 
 /* Why are there no generic functions for this? */
 #define ACCESSOR(name, var, start) \
@@ -615,7 +615,7 @@ static __cpuinit int mce_create_device(unsigned int cpu)
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-static void mce_remove_device(unsigned int cpu)
+static __cpuinit void mce_remove_device(unsigned int cpu)
 {
        int i;
 
@@ -626,6 +626,7 @@ static void mce_remove_device(unsigned int cpu)
        sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_check_interval);
        sysdev_unregister(&per_cpu(device_mce,cpu));
 }
+#endif
 
 /* Get notified when a cpu comes on/off. Be hotplug friendly. */
 static int
@@ -637,9 +638,11 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
        case CPU_ONLINE:
                mce_create_device(cpu);
                break;
+#ifdef CONFIG_HOTPLUG_CPU
        case CPU_DEAD:
                mce_remove_device(cpu);
                break;
+#endif
        }
        return NOTIFY_OK;
 }
@@ -647,7 +650,6 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
 static struct notifier_block mce_cpu_notifier = {
        .notifier_call = mce_cpu_callback,
 };
-#endif
 
 static __init int mce_init_device(void)
 {
@@ -662,7 +664,7 @@ static __init int mce_init_device(void)
                mce_create_device(i);
        }
 
-       register_hotcpu_notifier(&mce_cpu_notifier);
+       register_cpu_notifier(&mce_cpu_notifier);
        misc_register(&mce_log_device);
        return err;
 }