sync with OpenBSD -current
This commit is contained in:
parent
b467550def
commit
991d31b9d0
40 changed files with 217 additions and 55 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $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 $ */
|
||||
|
||||
/*
|
||||
|
@ -73,6 +73,8 @@ struct pic softintr_pic = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
int intr_suspended;
|
||||
|
||||
/*
|
||||
* Fill in default interrupt table (in case of spurious interrupt
|
||||
* during configuration of kernel), setup interrupt control unit
|
||||
|
@ -524,7 +526,6 @@ intr_disestablish(struct intrhand *ih)
|
|||
int
|
||||
intr_handler(struct intrframe *frame, struct intrhand *ih)
|
||||
{
|
||||
extern int cpu_suspended;
|
||||
struct cpu_info *ci = curcpu();
|
||||
int floor;
|
||||
int rc;
|
||||
|
@ -536,7 +537,7 @@ intr_handler(struct intrframe *frame, struct intrhand *ih)
|
|||
* 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
|
||||
|
@ -723,6 +724,8 @@ intr_enable_wakeup(void)
|
|||
if (pic->pic_hwmask)
|
||||
pic->pic_hwmask(pic, pin);
|
||||
}
|
||||
|
||||
intr_suspended = 1;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -732,6 +735,8 @@ intr_disable_wakeup(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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue