]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/x86_64/kernel/mce_amd.c
[PATCH] x86_64: moving phys_proc_id and cpu_core_id to cpuinfo_x86
[mv-sheeva.git] / arch / x86_64 / kernel / mce_amd.c
index 0b62a44ab34bf2b5139abdb00730c8d2c7df9ffd..86e1e022b20e0d810baff3da7e239959e1c49384 100644 (file)
@@ -115,7 +115,7 @@ void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c)
                per_cpu(bank_map, cpu) |= (1 << bank);
 
 #ifdef CONFIG_SMP
-               if (shared_bank[bank] && cpu_core_id[cpu])
+               if (shared_bank[bank] && c->cpu_core_id)
                        continue;
 #endif
 
@@ -320,13 +320,13 @@ static struct kobj_type threshold_ktype = {
 static __cpuinit int threshold_create_bank(unsigned int cpu, int bank)
 {
        int err = 0;
-       struct threshold_bank *b = 0;
+       struct threshold_bank *b = NULL;
 
 #ifdef CONFIG_SMP
-       if (cpu_core_id[cpu] && shared_bank[bank]) {    /* symlink */
+       if (cpu_data[cpu].cpu_core_id && shared_bank[bank]) {   /* symlink */
                char name[16];
                unsigned lcpu = first_cpu(cpu_core_map[cpu]);
-               if (cpu_core_id[lcpu])
+               if (cpu_data[lcpu].cpu_core_id)
                        goto out;       /* first core not up yet */
 
                b = per_cpu(threshold_banks, lcpu)[bank];
@@ -409,7 +409,7 @@ static __cpuinit void threshold_remove_bank(unsigned int cpu, int bank)
        if (shared_bank[bank] && atomic_read(&b->kobj.kref.refcount) > 2) {
                sprintf(name, "bank%i", bank);
                sysfs_remove_link(&per_cpu(device_threshold, cpu).kobj, name);
-               per_cpu(threshold_banks, cpu)[bank] = 0;
+               per_cpu(threshold_banks, cpu)[bank] = NULL;
        } else {
                kobject_unregister(&b->kobj);
                kfree(per_cpu(threshold_banks, cpu)[bank]);
@@ -434,7 +434,7 @@ static __cpuinit int threshold_create_symlinks(unsigned int cpu)
        int bank, err = 0;
        unsigned int lcpu = 0;
 
-       if (cpu_core_id[cpu])
+       if (cpu_data[cpu].cpu_core_id)
                return 0;
        for_each_cpu_mask(lcpu, cpu_core_map[cpu]) {
                if (lcpu == cpu)
@@ -455,7 +455,7 @@ static __cpuinit void threshold_remove_symlinks(unsigned int cpu)
 {
        int bank;
        unsigned int lcpu = 0;
-       if (cpu_core_id[cpu])
+       if (cpu_data[cpu].cpu_core_id)
                return;
        for_each_cpu_mask(lcpu, cpu_core_map[cpu]) {
                if (lcpu == cpu)
@@ -482,7 +482,7 @@ static void threshold_remove_device(unsigned int cpu)
 #endif
 
 /* get notified when a cpu comes on/off */
-static __cpuinit int threshold_cpu_callback(struct notifier_block *nfb,
+static int threshold_cpu_callback(struct notifier_block *nfb,
                                            unsigned long action, void *hcpu)
 {
        /* cpu was unsigned int to begin with */