]> err.no Git - linux-2.6/blobdiff - arch/parisc/kernel/processor.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6] / arch / parisc / kernel / processor.c
index 27f955378a4229486e18c9185777d37b70192330..370086fb8333a8a1b5b6f9fdb17418759dc9e064 100644 (file)
@@ -76,13 +76,18 @@ extern int update_cr16_clocksource(void);   /* from time.c */
  * (return 1).  If so, initialize the chip and tell other partners in crime 
  * they have work to do.
  */
-static int __init processor_probe(struct parisc_device *dev)
+static int __cpuinit processor_probe(struct parisc_device *dev)
 {
        unsigned long txn_addr;
        unsigned long cpuid;
        struct cpuinfo_parisc *p;
 
-#ifndef CONFIG_SMP
+#ifdef CONFIG_SMP
+       if (num_online_cpus() >= NR_CPUS) {
+               printk(KERN_INFO "num_online_cpus() >= NR_CPUS\n");
+               return 1;
+       }
+#else
        if (boot_cpu_data.cpu_count > 0) {
                printk(KERN_INFO "CONFIG_SMP=n  ignoring additional CPUs\n");
                return 1;
@@ -381,12 +386,12 @@ show_cpuinfo (struct seq_file *m, void *v)
        return 0;
 }
 
-static struct parisc_device_id processor_tbl[] __read_mostly = {
+static const struct parisc_device_id processor_tbl[] = {
        { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID },
        { 0, }
 };
 
-static struct parisc_driver cpu_driver __read_mostly = {
+static struct parisc_driver cpu_driver = {
        .name           = "CPU",
        .id_table       = processor_tbl,
        .probe          = processor_probe