]> git.openpandora.org Git - pandora-kernel.git/commitdiff
arm64: decode ESR_ELx.EC when reporting exceptions
authorMark Rutland <mark.rutland@arm.com>
Tue, 18 Nov 2014 12:16:30 +0000 (12:16 +0000)
committerMark Rutland <mark.rutland@arm.com>
Thu, 15 Jan 2015 12:24:22 +0000 (12:24 +0000)
To aid the developer when something triggers an unexpected exception,
decode the ESR_ELx.EC field when logging an ESR_ELx value. This doesn't
tell the developer the specifics of the exception encoded in the
remaining IL and ISS bits, but it can be helpful to distinguish between
exception classes (e.g. SError and a data abort) without having to
manually decode the field, which can be tiresome.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/esr.h
arch/arm64/kernel/traps.c

index 0fd1b0e15ea87e2529611e07faf5f80c7e695039..c315543d50f914ecb1af07fdd2e060f81218569f 100644 (file)
 #define ESR_ELx_COND_MASK      (UL(0xF) << ESR_ELx_COND_SHIFT)
 #define ESR_ELx_WFx_ISS_WFE    (UL(1) << 0)
 
+#ifndef __ASSEMBLY__
+#include <asm/types.h>
+
+const char *esr_get_class_string(u32 esr);
+#endif /* __ASSEMBLY */
+
 #endif /* __ASM_ESR_H */
Simple merge