]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] for i386 SETUP CODE
authorKeith Mannthey <mannthey@us.ibm.com>
Thu, 15 Aug 2002 04:31:37 +0000 (21:31 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 15 Aug 2002 04:31:37 +0000 (21:31 -0700)
   The following is a simple fix for an array overrun problem in
mpparse.c.  I am working on a multiquad box which has a EISA bus in it
for it's service processor.  It's local bus number is 18 which is > 3
(see quad_local_to_mp_bus_id.  When the NR_CPUS is close the the real
number of cpus adding the EISA bus #18 in the array stomps all over
various things in memory.  The EISA bus does not need to be mapped
anywhere in the kernel for anything.  This patch will not affect non
clustered apic (multiquad) kernels.

arch/i386/kernel/mpparse.c

index 0a3aab887fac93a1c01375b8751ece813dc0e221..ba96793892ce255e16eeef11cfa87d73ffa6e570 100644 (file)
@@ -213,7 +213,6 @@ static void __init MP_bus_info (struct mpc_config_bus *m)
                quad = translation_table[mpc_record]->trans_quad;
                mp_bus_id_to_node[m->mpc_busid] = quad;
                mp_bus_id_to_local[m->mpc_busid] = translation_table[mpc_record]->trans_local;
-               quad_local_to_mp_bus_id[quad][translation_table[mpc_record]->trans_local] = m->mpc_busid;
                printk("Bus #%d is %s (node %d)\n", m->mpc_busid, str, quad);
        } else {
                Dprintk("Bus #%d is %s\n", m->mpc_busid, str);
@@ -224,6 +223,9 @@ static void __init MP_bus_info (struct mpc_config_bus *m)
        } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA)-1) == 0) {
                mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA;
        } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI)-1) == 0) {
+               if (clustered_apic_mode){
+                       quad_local_to_mp_bus_id[quad][translation_table[mpc_record]->trans_local] = m->mpc_busid;
+               }
                mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI;
                mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id;
                mp_current_pci_id++;