-/* $OpenBSD: intr.c,v 1.59 2024/06/07 06:26:23 jsg Exp $ */
+/* $OpenBSD: intr.c,v 1.60 2024/06/15 18:01:44 kettenis Exp $ */
/* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */
/*
NULL,
};
+int intr_suspended;
+
/*
* Fill in default interrupt table (in case of spurious interrupt
* during configuration of kernel), setup interrupt control unit
int
intr_handler(struct intrframe *frame, struct intrhand *ih)
{
- extern int cpu_suspended;
struct cpu_info *ci = curcpu();
int floor;
int rc;
* We may not be able to mask MSIs, so block non-wakeup
* interrupts while we're suspended.
*/
- if (cpu_suspended && (ih->ih_flags & IPL_WAKEUP) == 0)
+ if (intr_suspended && (ih->ih_flags & IPL_WAKEUP) == 0)
return 0;
#ifdef MULTIPROCESSOR
if (pic->pic_hwmask)
pic->pic_hwmask(pic, pin);
}
+
+ intr_suspended = 1;
}
void
struct pic *pic;
int irq, pin;
+ intr_suspended = 0;
+
for (irq = 0; irq < MAX_INTR_SOURCES; irq++) {
if (ci->ci_isources[irq] == NULL)
continue;