arm64: Print the spinlock count on panic

When the spinlock count is non-zero while taking a data abort we panic.
Print this count to help debugging.

Sponsored by:	Arm Ltd
This commit is contained in:
Andrew Turner 2023-05-24 15:40:30 +01:00
parent 0731b0a9f1
commit fa512fcd8f

View File

@ -329,7 +329,8 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr,
print_registers(frame);
print_gp_register("far", far);
printf(" esr: %.16lx\n", esr);
panic("data abort with spinlock held");
panic("data abort with spinlock held (spinlock count %d != 0)",
td->td_md.md_spinlock_count);
}
#endif
if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK |