Skip to content

Commit 42dbf54

Browse files
mrutland-armwildea01
authored andcommitted
arm64: consistently log ESR and page table
When we take a fault we can't handle, we try to dump some relevant information, but we're not consistent about doing so. In do_mem_abort(), we log the full ESR, but don't dump a page table walk. In __do_kernel_fault, we dump an attempted decoding of the ESR (but not the ESR itself) along with a page table walk. Let's try to make things more consistent by dumping the full ESR in mem_abort_decode(), and having do_mem_abort dump a page table walk. The existing dump of the ESR in do_mem_abort() is rendered redundant, and removed. Tested-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Julien Thierry <julien.thierry@arm.com> Cc: Kristina Martsenko <kristina.martsenko@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent fa3eb71 commit 42dbf54

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎arch/arm64/mm/fault.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ static void mem_abort_decode(unsigned int esr)
109109
{
110110
pr_alert("Mem abort info:\n");
111111

112+
pr_alert(" ESR = 0x%08x\n", esr);
112113
pr_alert(" Exception class = %s, IL = %u bits\n",
113114
esr_get_class_string(esr),
114115
(esr & ESR_ELx_IL) ? 32 : 16);
@@ -692,11 +693,13 @@ asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr,
692693
if (!inf->fn(addr, esr, regs))
693694
return;
694695

695-
pr_alert("Unhandled fault: %s (0x%08x) at 0x%016lx\n",
696-
inf->name, esr, addr);
696+
pr_alert("Unhandled fault: %s at 0x%016lx\n",
697+
inf->name, addr);
697698

698699
mem_abort_decode(esr);
699700

701+
show_pte(addr);
702+
700703
info.si_signo = inf->sig;
701704
info.si_errno = 0;
702705
info.si_code = inf->code;

0 commit comments

Comments
 (0)