Stop enabling interrupts when reentering kdb on arm64

When we raise a data abort from the kernel we need to enable interrupts,
however we shouldn't be doing this when in the kernel debugger. In this
case interrupts can lead to a further panic as they don't expect to be
run from such a context.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
This commit is contained in:
Andrew Turner 2019-10-23 13:21:15 +00:00
parent a601368040
commit 9d0a6b83ca
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353920

View File

@ -179,6 +179,8 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr,
if (lower)
map = &p->p_vmspace->vm_map;
else {
intr_enable();
/* The top bit tells us which range to use */
if (far >= VM_MAXUSER_ADDRESS) {
map = kernel_map;
@ -316,7 +318,6 @@ do_el1h_sync(struct thread *td, struct trapframe *frame)
case EXCP_INSN_ABORT:
case EXCP_DATA_ABORT:
far = READ_SPECIALREG(far_el1);
intr_enable();
data_abort(td, frame, esr, far, 0,
exception == EXCP_INSN_ABORT);
break;