]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Summit: APIC limits
authorMartin J. Bligh <martin.bligh@us.ibm.com>
Tue, 15 Oct 2002 12:37:57 +0000 (05:37 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 15 Oct 2002 12:37:57 +0000 (05:37 -0700)
This one sets up the apic broadcast id (the maximum allowable apic address)
properly for whichever platform. It also abstracts out check_apicid_used,
because that check doesn't work on Summit. Oh, and I bumped up
MAX_IO_APICS, but only for NUMA x86 platforms.

arch/i386/kernel/io_apic.c
arch/i386/mach-generic/mach_apic.h
arch/i386/mach-summit/mach_apic.h
include/asm-i386/apicdef.h

index b8fc20a24225fc03fbce56bde0bd69036de831a4..5bc54a30c2f8b72261ab49670380207acfed9ae2 100644 (file)
@@ -1152,7 +1152,7 @@ static void __init setup_ioapic_ids_from_mpc (void)
                
                old_id = mp_ioapics[apic].mpc_apicid;
 
-               if (mp_ioapics[apic].mpc_apicid >= 0xf) {
+               if (mp_ioapics[apic].mpc_apicid >= APIC_BROADCAST_ID) {
                        printk(KERN_ERR "BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n",
                                apic, mp_ioapics[apic].mpc_apicid);
                        printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",
@@ -1165,7 +1165,8 @@ static void __init setup_ioapic_ids_from_mpc (void)
                 * system must have a unique ID or we get lots of nice
                 * 'stuck on smp_invalidate_needed IPI wait' messages.
                 */
-               if (phys_id_present_map & (1 << mp_ioapics[apic].mpc_apicid)) {
+               if (check_apicid_used(phys_id_present_map,
+                                       mp_ioapics[apic].mpc_apicid)) {
                        printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n",
                                apic, mp_ioapics[apic].mpc_apicid);
                        for (i = 0; i < 0xf; i++)
index 5d6e15a51d790389e51d18f3e1d1ca6231161461..ea38d35c8dedb6cf319b7df4f6b281a86b16f804 100644 (file)
@@ -17,4 +17,7 @@ static inline unsigned long calculate_ldr(unsigned long old)
  #define TARGET_CPUS 0x01
 #endif
 
+#define APIC_BROADCAST_ID      0x0F
+#define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid))
+
 #endif /* __ASM_MACH_APIC_H */
index f672f5bba209589e2fdbc9017734948fa6511137..5b2a6999c968a07f298a61e638b09704a751105d 100644 (file)
@@ -23,4 +23,7 @@ static inline unsigned long calculate_ldr(unsigned long old)
 #define APIC_DFR_VALUE (x86_summit ? APIC_DFR_CLUSTER : APIC_DFR_FLAT)
 #define TARGET_CPUS    (x86_summit ? XAPIC_DEST_CPUS_MASK : cpu_online_map)
 
+#define APIC_BROADCAST_ID     (x86_summit ? 0xFF : 0x0F)
+#define check_apicid_used(bitmap, apicid) (0)
+
 #endif /* __ASM_MACH_APIC_H */
index be81838ef1e9a7924447fa1ba2670f4b32fb883a..4aac5f72e9ed2e75a3d7ce18c9f65816d5db76c4 100644 (file)
 
 #define APIC_BASE (fix_to_virt(FIX_APIC_BASE))
 
-#define MAX_IO_APICS 8
+#ifdef CONFIG_X86_NUMA
+ #define MAX_IO_APICS 32
+#else
+ #define MAX_IO_APICS 8
+#endif
 
 /*
  * the local APIC register structure, memory mapped. Not terribly well