diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-07-18 21:39:17 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-07-18 21:39:17 +0000 |
commit | f3c04ba24c858c2e8c0185a3d2495d07b918e483 (patch) | |
tree | 3ec9d90a0ddecc7eab63bf3bbf7ea7930866c881 /sys | |
parent | c0f7c0e18174b35ff971e9243c154808e96965de (diff) |
Make IPL_VM level 5, which is guaranteed to be above bio tty and net, instead
of making it dynamic and the smallest value above the former three. Idea
from NetBSD.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/hp300/intr.c | 15 | ||||
-rw-r--r-- | sys/arch/hp300/include/intr.h | 4 |
2 files changed, 8 insertions, 11 deletions
diff --git a/sys/arch/hp300/hp300/intr.c b/sys/arch/hp300/hp300/intr.c index c6dc0551a6f..4afe998208f 100644 --- a/sys/arch/hp300/hp300/intr.c +++ b/sys/arch/hp300/hp300/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.21 2008/06/26 05:42:10 ray Exp $ */ +/* $OpenBSD: intr.c,v 1.22 2008/07/18 21:39:14 miod Exp $ */ /* $NetBSD: intr.c,v 1.5 1998/02/16 20:58:30 thorpej Exp $ */ /*- @@ -62,7 +62,7 @@ isr_list_t isr_list[NISR]; /* * Default interrupt priorities. - * IPL_BIO, IPL_NET, IPL_TTY and IPL_VM will be adjusted when devices attach. + * IPL_BIO, IPL_NET and IPL_TTY will be adjusted when devices attach. */ u_short hp300_varpsl[NISR] = { PSL_S | PSL_IPL0, /* IPL_NONE */ @@ -70,7 +70,7 @@ u_short hp300_varpsl[NISR] = { PSL_S | PSL_IPL3, /* IPL_BIO */ PSL_S | PSL_IPL3, /* IPL_NET */ PSL_S | PSL_IPL3, /* IPL_TTY */ - PSL_S | PSL_IPL3, /* IPL_VM */ + PSL_S | PSL_IPL5, /* IPL_VM */ PSL_S | PSL_IPL6, /* IPL_CLOCK */ PSL_S | PSL_IPL7 /* IPL_HIGH */ }; @@ -99,7 +99,7 @@ intr_computeipl() /* Start with low values. */ hp300_varpsl[IPL_BIO] = hp300_varpsl[IPL_NET] = - hp300_varpsl[IPL_TTY] = hp300_varpsl[IPL_VM] = PSL_S | PSL_IPL3; + hp300_varpsl[IPL_TTY] = PSL_S | PSL_IPL3; for (ipl = 0; ipl < NISR; ipl++) { LIST_FOREACH(isr, &isr_list[ipl], isr_link) { @@ -139,9 +139,6 @@ intr_computeipl() if (hp300_varpsl[IPL_TTY] < hp300_varpsl[IPL_NET]) hp300_varpsl[IPL_TTY] = hp300_varpsl[IPL_NET]; - - if (hp300_varpsl[IPL_VM] < hp300_varpsl[IPL_TTY]) - hp300_varpsl[IPL_VM] = hp300_varpsl[IPL_TTY]; } void @@ -149,9 +146,9 @@ intr_printlevels() { #ifdef DEBUG - printf("psl: bio = 0x%x, net = 0x%x, tty = 0x%x, vm = 0x%x\n", + printf("psl: bio = 0x%x, net = 0x%x, tty = 0x%x\n", hp300_varpsl[IPL_BIO], hp300_varpsl[IPL_NET], - hp300_varpsl[IPL_TTY], hp300_varpsl[IPL_VM]); + hp300_varpsl[IPL_TTY]); #endif printf("interrupt levels: bio = %d, net = %d, tty = %d\n", diff --git a/sys/arch/hp300/include/intr.h b/sys/arch/hp300/include/intr.h index a96f903f5e4..c7216332a51 100644 --- a/sys/arch/hp300/include/intr.h +++ b/sys/arch/hp300/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.23 2008/06/26 05:42:10 ray Exp $ */ +/* $OpenBSD: intr.h,v 1.24 2008/07/18 21:39:16 miod Exp $ */ /* $NetBSD: intr.h,v 1.2 1997/07/24 05:43:08 scottr Exp $ */ /*- @@ -83,7 +83,7 @@ extern unsigned short hp300_varpsl[NISR]; #define spltty() _splraise(hp300_varpsl[IPL_TTY]) #define splclock() _splraise(PSL_S | PSL_IPL6) #define splstatclock() _splraise(PSL_S | PSL_IPL6) -#define splvm() _splraise(hp300_varpsl[IPL_VM]) +#define splvm() _splraise(PSL_S | PSL_IPL5) #define splhigh() _spl(PSL_S | PSL_IPL7) #define splsched() splhigh() |