summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-02-04 21:52:44 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-02-04 21:52:44 +0000
commit2b703f67d711bfe0fb8542b65bbff1c9725a4019 (patch)
treea0705eff13987c2ef836a90be3b074e1fdb99f0b /sys/arch/alpha
parent42639854806d0d2234c611be84802eccc9e8098a (diff)
Restore spl (lowering it) with alpha_pal_swpipl() instead of splx() in the
code paths which can be run from ipi handlers, to avoid running soft interrupt handlers if lowering ipl to 0. Soft interrupts will be processed upon returning from the ipi interrupt anyway.
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/machdep.c11
-rw-r--r--sys/arch/alpha/alpha/trap.c4
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 5360da2aaf7..b6dd865b21b 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.147 2014/02/01 21:25:06 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.148 2014/02/04 21:52:42 miod Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -1787,7 +1787,7 @@ fpusave_cpu(struct cpu_info *ci, int save)
out:
#if defined(MULTIPROCESSOR)
atomic_clearbits_ulong(&ci->ci_flags, CPUF_FPUSAVE);
- splx(s);
+ alpha_pal_swpipl(s);
#endif
return;
}
@@ -1808,7 +1808,6 @@ fpusave_proc(struct proc *p, int save)
KDASSERT(p->p_addr != NULL);
for (;;) {
-
#if defined(MULTIPROCESSOR)
/* Need to block IPIs */
s = splipi();
@@ -1817,7 +1816,7 @@ fpusave_proc(struct proc *p, int save)
oci = p->p_addr->u_pcb.pcb_fpcpu;
if (oci == NULL) {
#if defined(MULTIPROCESSOR)
- splx(s);
+ alpha_pal_swpipl(s);
#endif
return;
}
@@ -1825,7 +1824,7 @@ fpusave_proc(struct proc *p, int save)
#if defined(MULTIPROCESSOR)
if (oci == ci) {
KASSERT(ci->ci_fpcurproc == p);
- splx(s);
+ alpha_pal_swpipl(s);
fpusave_cpu(ci, save);
return;
}
@@ -1838,7 +1837,7 @@ fpusave_proc(struct proc *p, int save)
continue;
alpha_send_ipi(oci->ci_cpuid, ipi);
- splx(s);
+ alpha_pal_swpipl(s);
while (p->p_addr->u_pcb.pcb_fpcpu != NULL)
SPINLOCK_SPIN_HOOK;
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index cb5e1acdd2e..f44f28fb875 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.67 2014/02/01 21:25:07 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.68 2014/02/04 21:52:43 miod Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
@@ -690,7 +690,7 @@ alpha_enable_fp(struct proc *p, int check)
p->p_addr->u_pcb.pcb_fpcpu = ci;
ci->ci_fpcurproc = p;
#if defined(MULTIPROCESSOR)
- splx(s);
+ alpha_pal_swpipl(s);
#endif
atomic_add_int(&uvmexp.fpswtch, 1);