Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Use alpha_pal_swpipl() directly instead...
details: https://anonhg.NetBSD.org/src/rev/4e8352382a78
branches: trunk
changeset: 955080:4e8352382a78
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Sep 18 00:02:43 2020 +0000
description:
Use alpha_pal_swpipl() directly instead of splhigh()/splx(), do avoid
soft int processing while dealing with entering / leaving the debugger.
Soft ints will be correctly handled during exception_return().
diffstat:
sys/arch/alpha/alpha/db_interface.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (50 lines):
diff -r dc1aae7f6eb8 -r 4e8352382a78 sys/arch/alpha/alpha/db_interface.c
--- a/sys/arch/alpha/alpha/db_interface.c Thu Sep 17 20:29:03 2020 +0000
+++ b/sys/arch/alpha/alpha/db_interface.c Fri Sep 18 00:02:43 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.34 2012/02/06 02:14:10 matt Exp $ */
+/* $NetBSD: db_interface.c,v 1.35 2020/09/18 00:02:43 thorpej Exp $ */
/*
* Mach Operating System
@@ -52,7 +52,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.34 2012/02/06 02:14:10 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.35 2020/09/18 00:02:43 thorpej Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -176,7 +176,7 @@
ddb_trap(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long entry, db_regs_t *regs)
{
struct cpu_info *ci = curcpu();
- int s;
+ unsigned long psl;
if (entry != ALPHA_KENTRY_IF ||
(a0 != ALPHA_IF_CODE_BPT && a0 != ALPHA_IF_CODE_BUGCHK)) {
@@ -200,7 +200,12 @@
/* Our register state is simply the trapframe. */
ddb_regp = ci->ci_db_regs = regs;
- s = splhigh();
+ /*
+ * Use SWPIPL directly; we want to avoid processing
+ * software interrrupts when we go back. Soft ints
+ * will be caught later, so not to worry.
+ */
+ psl = alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH);
db_active++;
cnpollc(true); /* Set polling mode, unblank video */
@@ -210,7 +215,7 @@
cnpollc(false); /* Resume interrupt mode */
db_active--;
- splx(s);
+ alpha_pal_swpipl(psl);
ddb_regp = ci->ci_db_regs = NULL;
Home |
Main Index |
Thread Index |
Old Index