diff options
author | jhb <jhb@FreeBSD.org> | 2000-10-23 23:32:36 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-10-23 23:32:36 +0000 |
commit | dd3e4087e878ed28bb919eff2503f1465f3b114f (patch) | |
tree | 94f5dde67e86b1a6f70804480ee19131899762b0 /sys/amd64/amd64/vm_machdep.c | |
parent | 11e8e4bacdbafaa03686b68ae7bf9d2ccf073916 (diff) | |
download | FreeBSD-src-dd3e4087e878ed28bb919eff2503f1465f3b114f.zip FreeBSD-src-dd3e4087e878ed28bb919eff2503f1465f3b114f.tar.gz |
Don't dink with interrupts in vm_page_zero_idle(). This code assumed it
was being called with interrupts disabled, when it was actually being called
with them enabled.
Pointed out by: tegge
Diffstat (limited to 'sys/amd64/amd64/vm_machdep.c')
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 1984e69..468351b 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -542,7 +542,7 @@ vm_page_zero_idle() static int free_rover; static int zero_state; vm_page_t m; - int s, intrsave; + int s; /* * Attempt to maintain approximately 1/2 of our free pages in a @@ -560,8 +560,6 @@ vm_page_zero_idle() if (mtx_try_enter(&Giant, MTX_DEF)) { s = splvm(); - intrsave = save_intr(); - enable_intr(); zero_state = 0; m = vm_page_list_find(PQ_FREE, free_rover, FALSE); if (m != NULL && (m->flags & PG_ZERO) == 0) { @@ -583,16 +581,9 @@ vm_page_zero_idle() } free_rover = (free_rover + PQ_PRIME2) & PQ_L2_MASK; splx(s); - restore_intr(intrsave); mtx_exit(&Giant, MTX_DEF); return (1); } - /* - * We have to enable interrupts for a moment if the try_mplock fails - * in order to potentially take an IPI. XXX this should be in - * swtch.s - */ - __asm __volatile("sti; nop; cli" : : : "memory"); return (0); } |