The branch main has been updated by andrew:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=fa512fcd8fe74d72b7f29a324c8cd3ca20ff25c8

commit fa512fcd8fe74d72b7f29a324c8cd3ca20ff25c8
Author:     Andrew Turner <and...@freebsd.org>
AuthorDate: 2023-05-24 14:40:30 +0000
Commit:     Andrew Turner <and...@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 |

Reply via email to