]> git.hungrycats.org Git - linux/commitdiff
[PATCH] move one more to subarch, general tidy up
authorMartin J. Bligh <mbligh@aracnet.com>
Tue, 7 Jan 2003 05:48:08 +0000 (21:48 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 7 Jan 2003 05:48:08 +0000 (21:48 -0800)
Moves check_phys_apicid_present() into subarch, and cleans up a
couple of stupid errors, and some bracketing issues in the macros.

arch/i386/kernel/smpboot.c
include/asm-i386/mach-default/mach_apic.h
include/asm-i386/mach-numaq/mach_apic.h
include/asm-i386/mach-summit/mach_apic.h
include/asm-i386/smp.h

index 98b903942e20a3a8c2866b3c05e5aa6882282de6..076d3a04f148c9256f57a3649b81fcc55812781a 100644 (file)
@@ -821,7 +821,7 @@ static int __init do_boot_cpu(int apicid)
        unsigned long boot_error;
        int timeout, cpu;
        unsigned long start_eip;
-       unsigned short nmi_high, nmi_low;
+       unsigned short nmi_high = 0, nmi_low = 0;
 
        cpu = ++cpucount;
        /*
@@ -1052,10 +1052,9 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
         * CPU too, but we do it for the sake of robustness anyway.
         * Makes no sense to do this check in clustered apic mode, so skip it
         */
-       if (!clustered_apic_mode && 
-           !test_bit(boot_cpu_physical_apicid, &phys_cpu_present_map)) {
+       if (!check_phys_apicid_present(boot_cpu_physical_apicid)) {
                printk("weird, boot CPU (#%d) not listed by the BIOS.\n",
-                                                       boot_cpu_physical_apicid);
+                               boot_cpu_physical_apicid);
                phys_cpu_present_map |= (1 << hard_smp_processor_id());
        }
 
index a560a19efd720728db0aa98a59b0d37852c9ee27..a469f8e6a614d937d49ca9b617e0ca1f43aeac09 100644 (file)
@@ -84,4 +84,9 @@ static inline void setup_portio_remap(void)
 {
 }
 
+static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+       return test_bit(boot_cpu_physical_apicid, &phys_cpu_present_map);
+}
+
 #endif /* __ASM_MACH_APIC_H */
index c1ab5465337eb147c427b5dc7e99a5421dbd724a..13237f0e009fc2966103c1411f02f606b55d6092 100644 (file)
@@ -1,14 +1,14 @@
 #ifndef __ASM_MACH_APIC_H
 #define __ASM_MACH_APIC_H
 
-#define APIC_DFR_VALUE (APIC_DFR_FLAT)
+#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
 
 #define TARGET_CPUS (0xf)
 
 #define no_balance_irq (1)
 
 #define APIC_BROADCAST_ID      0x0F
-#define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid))
+#define check_apicid_used(bitmap, apicid) ((bitmap) & (1 << (apicid)))
 
 static inline int apic_id_registered(void)
 {
@@ -26,6 +26,10 @@ static inline void clustered_apic_check(void)
                "NUMA-Q", nr_ioapics);
 }
 
+/*
+ * Skip adding the timer int on secondary nodes, which causes
+ * a small but painful rift in the time-space continuum.
+ */
 static inline int multi_timer_check(int apic, int irq)
 {
        return (apic != 0 && irq == 0);
@@ -82,4 +86,9 @@ static inline void setup_portio_remap(void)
                (u_long) xquad_portio, (u_long) numnodes*XQUAD_PORTIO_QUAD);
 }
 
+static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+       return (1);
+}
+
 #endif /* __ASM_MACH_APIC_H */
index e1aea8aedfcd08112f778f750e7f1d23cf9cadc4..bf1cb85fa9cc712608ac833d41f443624e5fe45b 100644 (file)
@@ -65,4 +65,9 @@ static inline void setup_portio_remap(void)
 {
 }
 
+static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+       return (1);
+}
+
 #endif /* __ASM_MACH_APIC_H */
index 71d58561d39cc70274314d4e781bc90de0d31cd5..4eff93adbf5b2eba5947f321b9179357d266c59c 100644 (file)
@@ -22,7 +22,7 @@
 #endif
 #endif
 
-#ifdef CONFIG_CLUSTERED_APIC
+#ifdef CONFIG_X86_NUMAQ
  #define INT_DELIVERY_MODE 0     /* physical delivery on LOCAL quad */
 #else
  #define INT_DELIVERY_MODE 1     /* logical delivery broadcast to all procs */