- Don't acquire/release Giant during an interrupt context for machine
checks, clock interrupts, and device interrupts. - Assert that Giant is not owned during the main loop of ithd_loop().
This commit is contained in:
parent
22f1b34223
commit
651c378316
@ -99,7 +99,6 @@ interrupt(a0, a1, a2, framep)
|
||||
struct proc *p = curproc;
|
||||
if (!p) p = &proc0;
|
||||
if ((caddr_t) framep < (caddr_t) p->p_addr + 1024) {
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
panic("possible stack overflow\n");
|
||||
}
|
||||
}
|
||||
@ -121,33 +120,25 @@ interrupt(a0, a1, a2, framep)
|
||||
return;
|
||||
}
|
||||
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
alpha_clock_interrupt(framep);
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
break;
|
||||
|
||||
case ALPHA_INTR_ERROR: /* Machine Check or Correctable Error */
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
a0 = alpha_pal_rdmces();
|
||||
if (platform.mcheck_handler)
|
||||
(*platform.mcheck_handler)(a0, framep, a1, a2);
|
||||
else
|
||||
machine_check(a0, framep, a1, a2);
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
break;
|
||||
|
||||
case ALPHA_INTR_DEVICE: /* I/O device interrupt */
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
cnt.v_intr++;
|
||||
if (platform.iointr)
|
||||
(*platform.iointr)(framep, a1);
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
break;
|
||||
|
||||
case ALPHA_INTR_PERF: /* interprocessor interrupt */
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
perf_irq(a1, framep);
|
||||
mtx_exit(&Giant, MTX_DEF);
|
||||
break;
|
||||
|
||||
case ALPHA_INTR_PASSIVE:
|
||||
@ -157,7 +148,6 @@ interrupt(a0, a1, a2, framep)
|
||||
break;
|
||||
|
||||
default:
|
||||
mtx_enter(&Giant, MTX_DEF);
|
||||
panic("unexpected interrupt: type 0x%lx vec 0x%lx a2 0x%lx\n",
|
||||
a0, a1, a2);
|
||||
/* NOTREACHED */
|
||||
@ -638,6 +628,7 @@ ithd_loop(void *dummy)
|
||||
* lock. This may take a while and it_need may get
|
||||
* set again, so we have to check it again.
|
||||
*/
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
mtx_enter(&sched_lock, MTX_SPIN);
|
||||
if (!ithd->it_need) {
|
||||
ithd->it_proc->p_stat = SWAIT; /* we're idle */
|
||||
|
Loading…
x
Reference in New Issue
Block a user