* [PATCH] arm64: mm: decode xFSC in mem_abort_decode()
@ 2021-06-08 12:37 Mark Rutland
2021-06-08 13:21 ` Will Deacon
0 siblings, 1 reply; 3+ messages in thread
From: Mark Rutland @ 2021-06-08 12:37 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Mark Rutland, Catalin Marinas, Robin Murphy, Will Deacon
It would be helpful if mem_abort_decode() could decode the DFSC/IFSC, as
this can make it easier to identify common bugs (e.g. accesses which
trigger alignment faults) without having to manually decode the xFSC
value.
Decode the xFSC in mem_abort_decode().
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Robin Murphy <wobin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
---
arch/arm64/mm/fault.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index c10bf749c233..2fba5da62104 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -99,6 +99,8 @@ static void mem_abort_decode(unsigned int esr)
pr_alert(" EA = %lu, S1PTW = %lu\n",
(esr & ESR_ELx_EA) >> ESR_ELx_EA_SHIFT,
(esr & ESR_ELx_S1PTW) >> ESR_ELx_S1PTW_SHIFT);
+ pr_alert(" FSC = 0x%02x: %s\n", (esr & ESR_ELx_FSC),
+ esr_to_fault_info(esr)->name);
if (esr_is_data_abort(esr))
data_abort_decode(esr);
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: mm: decode xFSC in mem_abort_decode()
2021-06-08 12:37 [PATCH] arm64: mm: decode xFSC in mem_abort_decode() Mark Rutland
@ 2021-06-08 13:21 ` Will Deacon
2021-06-08 13:55 ` Mark Rutland
0 siblings, 1 reply; 3+ messages in thread
From: Will Deacon @ 2021-06-08 13:21 UTC (permalink / raw)
To: Mark Rutland, linux-arm-kernel
Cc: catalin.marinas, kernel-team, Will Deacon, Robin Murphy
On Tue, 8 Jun 2021 13:37:42 +0100, Mark Rutland wrote:
> It would be helpful if mem_abort_decode() could decode the DFSC/IFSC, as
> this can make it easier to identify common bugs (e.g. accesses which
> trigger alignment faults) without having to manually decode the xFSC
> value.
>
> Decode the xFSC in mem_abort_decode().
Applied to arm64 (for-next/mm), thanks!
[1/1] arm64: mm: decode xFSC in mem_abort_decode()
https://git.kernel.org/arm64/c/392eec313f29
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: mm: decode xFSC in mem_abort_decode()
2021-06-08 13:21 ` Will Deacon
@ 2021-06-08 13:55 ` Mark Rutland
0 siblings, 0 replies; 3+ messages in thread
From: Mark Rutland @ 2021-06-08 13:55 UTC (permalink / raw)
To: Will Deacon; +Cc: linux-arm-kernel, catalin.marinas, kernel-team, Robin Murphy
On Tue, Jun 08, 2021 at 02:21:52PM +0100, Will Deacon wrote:
> On Tue, 8 Jun 2021 13:37:42 +0100, Mark Rutland wrote:
> > It would be helpful if mem_abort_decode() could decode the DFSC/IFSC, as
> > this can make it easier to identify common bugs (e.g. accesses which
> > trigger alignment faults) without having to manually decode the xFSC
> > value.
> >
> > Decode the xFSC in mem_abort_decode().
>
> Applied to arm64 (for-next/mm), thanks!
>
> [1/1] arm64: mm: decode xFSC in mem_abort_decode()
> https://git.kernel.org/arm64/c/392eec313f29
Thanks!
Somehow I typo'd Robin's email address in the Cc list. If it's possible
to fix that up in the patch, that'd be great. If that's a pain, no
worries.
I'll go find a keyboard I can actually handle...
Mark.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-08 13:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 12:37 [PATCH] arm64: mm: decode xFSC in mem_abort_decode() Mark Rutland
2021-06-08 13:21 ` Will Deacon
2021-06-08 13:55 ` Mark Rutland
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.