aboutsummaryrefslogtreecommitdiff
path: root/sys/ia64/ia64/interrupt.c
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2001-01-21 19:25:07 +0000
committerJake Burkholder <jake@FreeBSD.org>2001-01-21 19:25:07 +0000
commita448b62ac998ab4ae5e85fc7235cbb5c5dbe60ef (patch)
treea8fab5ee465b0d67b785fe50774997a21db3fdd5 /sys/ia64/ia64/interrupt.c
parent96b15e09d91b60bbe41d2a3ff239e9a38022ab57 (diff)
downloadsrc-a448b62ac998ab4ae5e85fc7235cbb5c5dbe60ef.tar.gz
src-a448b62ac998ab4ae5e85fc7235cbb5c5dbe60ef.zip
Make intr_nesting_level per-process, rather than per-cpu. Setup
interrupt threads to run with it always >= 1, so that malloc can detect M_WAITOK from "interrupt" context. This is also necessary in order to context switch from sched_ithd() directly. Reviewed By: peter
Notes
Notes: svn path=/head/; revision=71337
Diffstat (limited to 'sys/ia64/ia64/interrupt.c')
-rw-r--r--sys/ia64/ia64/interrupt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c
index 698b46c64430..fc2f84a30c59 100644
--- a/sys/ia64/ia64/interrupt.c
+++ b/sys/ia64/ia64/interrupt.c
@@ -78,8 +78,10 @@ static u_int schedclk2;
void
interrupt(u_int64_t vector, struct trapframe *framep)
{
- atomic_add_int(PCPU_PTR(intr_nesting_level), 1);
+ struct proc *p;
+ p = curproc;
+ atomic_add_int(&p->p_intr_nesting_level, 1);
switch (vector) {
case 240: /* clock interrupt */
CTR0(KTR_INTR, "clock interrupt");
@@ -104,7 +106,7 @@ interrupt(u_int64_t vector, struct trapframe *framep)
panic("unexpected interrupt: vec %ld\n", vector);
/* NOTREACHED */
}
- atomic_subtract_int(PCPU_PTR(intr_nesting_level), 1);
+ atomic_subtract_int(&p->p_intr_nesting_level, 1);
}