Thread (53 messages) 53 messages, 2 authors, 2023-12-22
STALE894d

[kvm-unit-tests PATCH v5 13/29] powerpc: Make interrupt handler error more readable

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2023-12-16 13:54:42
Also in: kvm
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Installing the same handler twice reports a shifted trap vector
address which is hard to decipher. Print the unshifed address.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 lib/powerpc/processor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/powerpc/processor.c b/lib/powerpc/processor.c
index aaf45b68..b4cd5b4c 100644
--- a/lib/powerpc/processor.c
+++ b/lib/powerpc/processor.c
@@ -26,7 +26,7 @@ void handle_exception(int trap, void (*func)(struct pt_regs *, void *),
 	trap >>= 8;
 
 	if (func && handlers[trap].func) {
-		printf("exception handler installed twice %#x\n", trap);
+		printf("exception handler installed twice %#x\n", trap << 5);
 		abort();
 	}
 	handlers[trap].func = func;
-- 
2.42.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help