diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/lapic.c | 10 | ||||
-rw-r--r-- | sys/arch/i386/i386/lapic.c | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c index 60d4febbd15..c7507f41819 100644 --- a/sys/arch/amd64/amd64/lapic.c +++ b/sys/arch/amd64/amd64/lapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lapic.c,v 1.24 2010/06/26 23:24:43 guenther Exp $ */ +/* $OpenBSD: lapic.c,v 1.25 2010/07/23 07:21:02 matthew Exp $ */ /* $NetBSD: lapic.c,v 1.2 2003/05/08 01:04:35 fvdl Exp $ */ /*- @@ -62,7 +62,9 @@ #endif struct evcount clk_count; +#ifdef MULTIPROCESSOR struct evcount ipi_count; +#endif void lapic_delay(int); static u_int32_t lapic_gettick(void); @@ -220,7 +222,9 @@ void lapic_boot_init(paddr_t lapic_base) { static u_int64_t clk_irq = 0; +#ifdef MULTIPROCESSOR static u_int64_t ipi_irq = 0; +#endif lapic_map(lapic_base); @@ -241,7 +245,9 @@ lapic_boot_init(paddr_t lapic_base) idt_vec_set(LAPIC_TIMER_VECTOR, Xintr_lapic_ltimer); evcount_attach(&clk_count, "clock", (void *)&clk_irq, &evcount_intr); +#ifdef MULTIPROCESSOR evcount_attach(&ipi_count, "ipi", (void *)&ipi_irq, &evcount_intr); +#endif } static __inline u_int32_t @@ -453,6 +459,7 @@ i82489_icr_wait(void) } } +#ifdef MULTIPROCESSOR int x86_ipi_init(int target) { @@ -498,6 +505,7 @@ x86_ipi(int vec, int target, int dl) return result; } +#endif /* MULTIPROCESSOR */ /* diff --git a/sys/arch/i386/i386/lapic.c b/sys/arch/i386/i386/lapic.c index 423f58fea78..b4675c19029 100644 --- a/sys/arch/i386/i386/lapic.c +++ b/sys/arch/i386/i386/lapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lapic.c,v 1.28 2010/06/26 23:24:43 guenther Exp $ */ +/* $OpenBSD: lapic.c,v 1.29 2010/07/23 07:21:02 matthew Exp $ */ /* $NetBSD: lapic.c,v 1.1.2.8 2000/02/23 06:10:50 sommerfeld Exp $ */ /*- @@ -57,7 +57,9 @@ #include <dev/ic/i8253reg.h> struct evcount clk_count; +#ifdef MULTIPROCESSOR struct evcount ipi_count; +#endif void lapic_delay(int); static u_int32_t lapic_gettick(void); @@ -193,7 +195,9 @@ void lapic_boot_init(paddr_t lapic_base) { static int clk_irq = 0; +#ifdef MULTIPROCESSOR static int ipi_irq = 0; +#endif lapic_map(lapic_base); @@ -208,7 +212,9 @@ lapic_boot_init(paddr_t lapic_base) idt_vec_set(LAPIC_TIMER_VECTOR, Xintrltimer); evcount_attach(&clk_count, "clock", (void *)&clk_irq, &evcount_intr); +#ifdef MULTIPROCESSOR evcount_attach(&ipi_count, "ipi", (void *)&ipi_irq, &evcount_intr); +#endif } static __inline u_int32_t @@ -420,6 +426,7 @@ i82489_icr_wait(void) } } +#ifdef MULTIPROCESSOR int i386_ipi_init(int target) { @@ -465,3 +472,4 @@ i386_ipi(int vec, int target, int dl) return result; } +#endif /* MULTIPROCESSOR */ |