]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/ia64/kernel/topology.c
[IA64] panic if topology_init kzalloc fails
[karo-tx-linux.git] / arch / ia64 / kernel / topology.c
index 5511d9c6c70152fe67b1025c1fe8ea8044926760..f648c610b10c50882b7fcbd0869e19b3659539b6 100644 (file)
@@ -13,7 +13,6 @@
  *     Populate cpu cache entries in sysfs for cpu cache info
  */
 
-#include <linux/config.h>
 #include <linux/cpu.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
@@ -68,10 +67,8 @@ static int __init topology_init(void)
 #endif
 
        sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL);
-       if (!sysfs_cpus) {
-               err = -ENOMEM;
-               goto out;
-       }
+       if (!sysfs_cpus)
+               panic("kzalloc in topology_init failed - NR_CPUS too big?");
 
        for_each_present_cpu(i) {
                if((err = arch_register_cpu(i)))
@@ -436,7 +433,7 @@ static int __cpuinit cache_sysfs_init(void)
                                (void *)(long)i);
        }
 
-       register_cpu_notifier(&cache_cpu_notifier);
+       register_hotcpu_notifier(&cache_cpu_notifier);
 
        return 0;
 }