git: fa512fcd8fe7 - main - arm64: Print the spinlock count on panic
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 May 2023 16:20:21 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=fa512fcd8fe74d72b7f29a324c8cd3ca20ff25c8
commit fa512fcd8fe74d72b7f29a324c8cd3ca20ff25c8
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-05-24 14:40:30 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2023-05-24 16:20:06 +0000
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
---
sys/arm64/arm64/trap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c
index 17bda56d806e..9b1b73aeb55d 100644
--- a/sys/arm64/arm64/trap.c
+++ b/sys/arm64/arm64/trap.c
@@ -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 |