Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / arch / x86_64 / kernel / mce_amd.c
index 3f967d4..fa09deb 100644 (file)
@@ -551,14 +551,13 @@ out:
        return err;
 }
 
-#ifdef CONFIG_HOTPLUG_CPU
 /*
  * let's be hotplug friendly.
  * in case of multiple core processors, the first core always takes ownership
  *   of shared sysfs dir/files, and rest of the cores will be symlinked to it.
  */
 
-static __cpuinit void deallocate_threshold_block(unsigned int cpu,
+static void deallocate_threshold_block(unsigned int cpu,
                                                 unsigned int bank)
 {
        struct threshold_block *pos = NULL;
@@ -578,7 +577,7 @@ static __cpuinit void deallocate_threshold_block(unsigned int cpu,
        per_cpu(threshold_banks, cpu)[bank]->blocks = NULL;
 }
 
-static __cpuinit void threshold_remove_bank(unsigned int cpu, int bank)
+static void threshold_remove_bank(unsigned int cpu, int bank)
 {
        int i = 0;
        struct threshold_bank *b;
@@ -594,12 +593,14 @@ static __cpuinit void threshold_remove_bank(unsigned int cpu, int bank)
 
        sprintf(name, "threshold_bank%i", bank);
 
+#ifdef CONFIG_SMP
        /* sibling symlink */
        if (shared_bank[bank] && b->blocks->cpu != cpu) {
                sysfs_remove_link(&per_cpu(device_mce, cpu).kobj, name);
-               per_cpu(threshold_banks, i)[bank] = NULL;
+               per_cpu(threshold_banks, cpu)[bank] = NULL;
                return;
        }
+#endif
 
        /* remove all sibling symlinks before unregistering */
        for_each_cpu_mask(i, b->cpus) {
@@ -618,7 +619,7 @@ free_out:
        per_cpu(threshold_banks, cpu)[bank] = NULL;
 }
 
-static __cpuinit void threshold_remove_device(unsigned int cpu)
+static void threshold_remove_device(unsigned int cpu)
 {
        unsigned int bank;
 
@@ -629,12 +630,6 @@ static __cpuinit void threshold_remove_device(unsigned int cpu)
        }
 }
 
-#else /* !CONFIG_HOTPLUG_CPU */
-static void threshold_remove_device(unsigned int cpu)
-{
-}
-#endif
-
 /* get notified when a cpu comes on/off */
 static int threshold_cpu_callback(struct notifier_block *nfb,
                                            unsigned long action, void *hcpu)
@@ -673,7 +668,7 @@ static __init int threshold_init_device(void)
                if (err)
                        return err;
        }
-       register_cpu_notifier(&threshold_cpu_notifier);
+       register_hotcpu_notifier(&threshold_cpu_notifier);
        return 0;
 }