x86_64: Remove unnecessary #ifdef SMP from files compiled with options SMP
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 3 Jun 2011 06:58:54 +0000 (14:58 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 3 Jun 2011 09:11:46 +0000 (17:11 +0800)
sys/platform/pc64/apic/apic_vector.s
sys/platform/pc64/apic/ioapic_abi.c
sys/platform/pc64/apic/ioapic_abi.h
sys/platform/pc64/apic/ioapic_ipl.h
sys/platform/pc64/apic/ioapic_ipl.s
sys/platform/pc64/apic/lapic.h
sys/platform/pc64/x86_64/mp_machdep.c

index ce23cc1..c12a03a 100644 (file)
        IOAPIC_IMASK_UNLOCK ;                                           \
 8: ;                                                                   \
 
-#ifdef SMP /* APIC-IO */
-
 /*
  * Interrupt call handlers run in the following sequence:
  *
@@ -161,8 +159,6 @@ IDTVEC(ioapic_intr##irq_num) ;                                              \
        MEXITCOUNT ;                                                    \
        jmp     doreti ;                                                \
 
-#endif
-
 /*
  * Handle "spurious INTerrupts".
  * Notes:
@@ -338,8 +334,6 @@ Xtimer:
        APIC_POP_FRAME
        jmp     doreti_iret
 
-#ifdef SMP /* APIC-IO */
-
 MCOUNT_LABEL(bintr)
        INTR_HANDLER(0)
        INTR_HANDLER(1)
@@ -535,8 +529,6 @@ MCOUNT_LABEL(bintr)
        INTR_HANDLER(191)
 MCOUNT_LABEL(eintr)
 
-#endif
-
        .data
 
 /* variables used by stop_cpus()/restart_cpus()/Xcpustop */
index e9951b7..05153ef 100644 (file)
@@ -61,8 +61,6 @@
 #include <machine_base/apic/ioapic_abi.h>
 #include <machine_base/apic/ioapic_ipl.h>
 
-#ifdef SMP /* APIC-IO */
-
 extern inthand_t
        IDTVEC(ioapic_intr0),
        IDTVEC(ioapic_intr1),
@@ -923,5 +921,3 @@ ioapic_abi_extint_irqmap(int irq)
 
        return 0;
 }
-
-#endif /* SMP */
index abe8fb1..ae08c5a 100644 (file)
@@ -66,8 +66,6 @@ struct apic_intmapinfo {
 
 extern struct apic_intmapinfo  int_to_apicintpin[];
 
-#ifdef SMP     /* APIC_IO */
-
 extern struct machintr_abi MachIntrABI_IOAPIC;
 
 int    ioapic_abi_extint_irqmap(int);
@@ -77,6 +75,4 @@ void  ioapic_abi_fixup_irqmap(void);
 int    ioapic_abi_find_gsi(int, enum intr_trigger, enum intr_polarity);
 int    ioapic_abi_find_irq(int, enum intr_trigger, enum intr_polarity);
 
-#endif /* SMP */
-
 #endif /* !_ARCH_APIC_IOAPIC_ABI_H_ */
index 7b539fa..ad60bbe 100644 (file)
 #ifndef _ARCH_APIC_IOAPIC_IPL_H_
 #define        _ARCH_APIC_IOAPIC_IPL_H_
 
-#ifdef SMP /* APIC-IO */
-
 #define IOAPIC_HWI_VECTORS 192
 
-#endif
-
 #ifdef LOCORE
 
 /*
index 277917e..430e03c 100644 (file)
@@ -66,8 +66,6 @@
 #include <machine_base/apic/ioapic_ipl.h>
 #include "assym.s"
 
-#ifdef SMP /* APIC-IO */
-
        .text
        SUPERALIGN_TEXT
 
@@ -128,4 +126,3 @@ ENTRY(ioapic_write)
        movl    %esi, (%rdi)            /* write the target register index */
        movl    %edx, IOAPIC_WINDOW(%rdi) /* write the IOAPIC register data */
        ret                             /* %eax = void */
-#endif
index 97c0144..d198617 100644 (file)
@@ -52,8 +52,6 @@ struct lapic_enumerator {
 #define LAPIC_ENUM_PRIO_MPTABLE                20
 #define LAPIC_ENUM_PRIO_MADT           40
 
-#ifdef SMP
-
 extern volatile lapic_t                *lapic;
 extern int                     cpu_id_to_apic_id[];
 extern int                     apic_id_to_cpu_id[];
@@ -84,8 +82,6 @@ all_but_self_ipi(int vector)
        return apic_ipi(APIC_DEST_ALLESELF, vector, APIC_DELMODE_FIXED);
 }
 
-#endif
-
 void   lapic_map(vm_offset_t /* XXX should be vm_paddr_t */);
 int    lapic_unused_apic_id(int);
 void   lapic_fixup_noioapic(void);
index 82cbaa1..8a93861 100644 (file)
@@ -773,7 +773,6 @@ static cpumask_t smp_invltlb_req;
 void
 smp_invltlb(void)
 {
-#ifdef SMP
        struct mdglobaldata *md = mdcpu;
 #ifdef SMP_INVLTLB_DEBUG
        long count = 0;
@@ -834,11 +833,8 @@ again:
        }
        atomic_clear_cpumask(&smp_invltlb_req, md->mi.gd_cpumask);
        crit_exit_gd(&md->mi);
-#endif
 }
 
-#ifdef SMP
-
 /*
  * Called from Xinvltlb assembly with interrupts disabled.  We didn't
  * bother to bump the critical section count or nested interrupt count
@@ -863,8 +859,6 @@ smp_invltlb_intr(void)
        }
 }
 
-#endif
-
 /*
  * When called the executing CPU will send an IPI to all other CPUs
  *  requesting that they halt execution.