diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -44,6 +44,7 @@ #include "opt_hwpmc_hooks.h" #include "opt_ntp.h" #include "opt_watchdog.h" +#include "opt_acpi.h" #include #include @@ -533,7 +534,10 @@ if (i > 0 && i <= newticks) watchdog_fire(); } - intr_event_handle(clk_intr_event, NULL); +#ifdef DEV_ACPI + if (!CK_SLIST_EMPTY(&clk_intr_event->ie_handlers)) + intr_event_handle(clk_intr_event, NULL); +#endif } if (curcpu == CPU_FIRST()) cpu_tick_calibration(); diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -32,6 +32,7 @@ #include "opt_ddb.h" #include "opt_hwpmc_hooks.h" #include "opt_kstack_usage_prof.h" +#include "opt_acpi.h" #include #include @@ -88,7 +89,9 @@ uintptr_t event; }; +#ifdef DEV_ACPI struct intr_event *clk_intr_event; +#endif struct proc *intrproc; static MALLOC_DEFINE(M_ITHREAD, "ithread", "Interrupt Threads"); @@ -1618,6 +1621,7 @@ } #endif /* DDB */ +#ifdef DEV_ACPI /* * Start standard software interrupt threads */ @@ -1631,6 +1635,7 @@ } SYSINIT(start_softintr, SI_SUB_SOFTINTR, SI_ORDER_FIRST, start_softintr, NULL); +#endif /* * Sysctls used by systat and others: hw.intrnames and hw.intrcnt. diff --git a/sys/sys/interrupt.h b/sys/sys/interrupt.h --- a/sys/sys/interrupt.h +++ b/sys/sys/interrupt.h @@ -152,7 +152,9 @@ struct proc; +#ifdef DEV_ACPI extern struct intr_event *clk_intr_event; +#endif /* Counts and names for statistics (defined in MD code). */ extern u_long *intrcnt; /* counts for each device and stray */ diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1663,7 +1663,10 @@ ipi_swi_handler(struct trapframe frame) { - intr_event_handle(clk_intr_event, &frame); +#ifdef DEV_ACPI + if (!CK_SLIST_EMPTY(&clk_intr_event->ie_handlers)) + intr_event_handle(clk_intr_event, &frame); +#endif } /*