Module Name: src
Committed By: christos
Date: Thu Feb 9 23:32:55 UTC 2012
Modified Files:
src/sys/arch/arm/arm32: fault.c
Log Message:
Cosmetic:
- add %s: __func__, function names change [most of them were wrong]
- add a DIAGNOSTIC printf to help debug alignment fixups
To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/arm/arm32/fault.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/arm32/fault.c
diff -u src/sys/arch/arm/arm32/fault.c:1.78 src/sys/arch/arm/arm32/fault.c:1.79
--- src/sys/arch/arm/arm32/fault.c:1.78 Sun Dec 19 19:25:27 2010
+++ src/sys/arch/arm/arm32/fault.c Thu Feb 9 18:32:55 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: fault.c,v 1.78 2010/12/20 00:25:27 matt Exp $ */
+/* $NetBSD: fault.c,v 1.79 2012/02/09 23:32:55 christos Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
#include "opt_sa.h"
#include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.78 2010/12/20 00:25:27 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.79 2012/02/09 23:32:55 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -193,7 +193,7 @@ data_abort_fixup(trapframe_t *tf, u_int
/*
* Oops, couldn't fix up the instruction
*/
- printf("data_abort_fixup: fixup for %s mode data abort failed.\n",
+ printf("%s: fixup for %s mode data abort failed.\n", __func__,
TRAP_USERMODE(tf) ? "user" : "kernel");
#ifdef THUMB_CODE
if (tf->tf_spsr & PSR_T_bit) {
@@ -263,6 +263,10 @@ data_abort_handler(trapframe_t *tf)
/* Invoke the appropriate handler, if necessary */
if (__predict_false(data_aborts[fsr & FAULT_TYPE_MASK].func != NULL)) {
+#ifdef DIAGNOSTIC
+ printf("%s: data_aborts fsr=0x%x far=0x%x\n",
+ __func__, fsr, far);
+#endif
if ((data_aborts[fsr & FAULT_TYPE_MASK].func)(tf, fsr, far,
l, &ksi))
goto do_trapsignal;
@@ -306,8 +310,8 @@ data_abort_handler(trapframe_t *tf)
* at some point.
*/
if (__predict_false(!user && (tf->tf_pc & 3) != 0)) {
- printf("\ndata_abort_fault: Misaligned Kernel-mode "
- "Program Counter\n");
+ printf("\n%s: Misaligned Kernel-mode Program Counter\n",
+ __func__);
dab_fatal(tf, fsr, far, l, NULL);
}
#else
@@ -328,8 +332,8 @@ data_abort_handler(trapframe_t *tf)
/*
* The kernel never executes Thumb code.
*/
- printf("\ndata_abort_fault: Misaligned Kernel-mode "
- "Program Counter\n");
+ printf("\n%s: Misaligned Kernel-mode Program Counter\n",
+ __func__);
dab_fatal(tf, fsr, far, l, NULL);
}
#endif
@@ -736,8 +740,7 @@ prefetch_abort_fixup(trapframe_t *tf)
/*
* Oops, couldn't fix up the instruction
*/
- printf(
- "prefetch_abort_fixup: fixup for %s mode prefetch abort failed.\n",
+ printf("%s: fixup for %s mode prefetch abort failed.\n", __func__,
TRAP_USERMODE(tf) ? "user" : "kernel");
#ifdef THUMB_CODE
if (tf->tf_spsr & PSR_T_bit) {
@@ -957,7 +960,7 @@ badaddr_read(void *addr, size_t size, vo
default:
curpcb = curpcb_save;
- panic("badaddr: invalid size (%lu)", (u_long) size);
+ panic("%s: invalid size (%lu)", __func__, (u_long)size);
}
/* Restore curpcb */