-/* $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 $ */
/*-
#endif
struct evcount clk_count;
+#ifdef MULTIPROCESSOR
struct evcount ipi_count;
+#endif
void lapic_delay(int);
static u_int32_t lapic_gettick(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);
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
}
}
+#ifdef MULTIPROCESSOR
int
x86_ipi_init(int target)
{
return result;
}
+#endif /* MULTIPROCESSOR */
/*
-/* $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 $ */
/*-
#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);
lapic_boot_init(paddr_t lapic_base)
{
static int clk_irq = 0;
+#ifdef MULTIPROCESSOR
static int ipi_irq = 0;
+#endif
lapic_map(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
}
}
+#ifdef MULTIPROCESSOR
int
i386_ipi_init(int target)
{
return result;
}
+#endif /* MULTIPROCESSOR */