arm64: fix misleading data abort decoding
Mark Rutland
reviewerPATCH 1/1 arm64: fix misleading data abort decoding
Currently data_abort_decode() dumps the ISS field as a decimal value with a '0x' prefix, which is somewhat misleading.
Fix it to print as hexadecimal, as was intended.
--- arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/mm/fault.c +1 -1
@@ -97,7 +97,7 @@ static void data_abort_decode(unsigned int esr) (esr & ESR_ELx_SF) >> ESR_ELx_SF_SHIFT, (esr & ESR_ELx_AR) >> ESR_ELx_AR_SHIFT); }else { -pr_alert (" ISV = 0, ISS = 0x%08lu\n" , esr & ESR_ELx_ISS_MASK); +pr_alert (" ISV = 0, ISS = 0x%08lx\n" , esr & ESR_ELx_ISS_MASK); } pr_alert(" CM = %lu, WnR = %lu\n",
Signature · 1 line
1.9.1
PATCH 1/1 arm64: fix misleading data abort decoding
Quoted 5 lines · Mark Rutland
Currently
data_abort_decode()dumps the ISS field as a decimal value with a '0x' prefix, which is somewhat misleading.Fix it to print as hexadecimal, as was intended.
Quoted 8 lines
Signed-off-by Mark Rutland <[email protected]>Cc Catalin Marinas <[email protected]>Cc Julien Thierry <[email protected]>Cc Will Deacon <[email protected]>Fixes 1f9b8936f36f4a8e ("arm64: Decode information from ESR upon mem faults")--- arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Will
Quoted 16 lines
arch/arm64/mm/fault.c +1
-1@@ -97,7 +97,7 @@ static void data_abort_decode(unsigned int esr) (esr & ESR_ELx_SF) >> ESR_ELx_SF_SHIFT, (esr & ESR_ELx_AR) >> ESR_ELx_AR_SHIFT); }else { -pr_alert (" ISV = 0, ISS = 0x%08lu\n" , esr & ESR_ELx_ISS_MASK); +pr_alert (" ISV = 0, ISS = 0x%08lx\n" , esr & ESR_ELx_ISS_MASK); } pr_alert(" CM = %lu, WnR = %lu\n",Signature · 1 line
1.9.1
PATCH 1/1 arm64: fix misleading data abort decoding
In reply to Mark RutlandQuoted 19 lines · Mark Rutland
Currently
data_abort_decode()dumps the ISS field as a decimal value with a '0x' prefix, which is somewhat misleading.Fix it to print as hexadecimal, as was intended.
Signed-off-by Mark Rutland <[email protected]>Cc Catalin Marinas <[email protected]>Cc Julien Thierry <[email protected]>Cc Will Deacon <[email protected]>Fixes 1f9b8936f36f4a8e ("arm64: Decode information from ESR upon mem faults")--- arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/mm/fault.c +0
-0
arch/arm64/mm/fault.c static void data_abort_decode(unsigned int esr) · line 100
Quoted 5 lines
arch/arm64/mm/fault.c +1
-1@@ -97,7 +97,7 @@ static void data_abort_decode(unsigned int esr) (esr & ESR_ELx_SF) >> ESR_ELx_SF_SHIFT, (esr & ESR_ELx_AR) >> ESR_ELx_AR_SHIFT); }else { -pr_alert (" ISV = 0, ISS = 0x%08lu\n" , esr & ESR_ELx_ISS_MASK); +pr_alert (" ISV = 0, ISS = 0x%08lx\n" , esr & ESR_ELx_ISS_MASK);
Whoops, thanks for catching that.
FWIW:
Thanks,
Signature · 1 line
Julien Thierry
PATCH 1/1 arm64: fix misleading data abort decoding
In reply to Mark RutlandQuoted 19 lines · Mark Rutland
Currently
data_abort_decode()dumps the ISS field as a decimal value with a '0x' prefix, which is somewhat misleading.Fix it to print as hexadecimal, as was intended.
Signed-off-by Mark Rutland <[email protected]>Cc Catalin Marinas <[email protected]>Cc Julien Thierry <[email protected]>Cc Will Deacon <[email protected]>Fixes 1f9b8936f36f4a8e ("arm64: Decode information from ESR upon mem faults")--- arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/mm/fault.c +0
-0
arch/arm64/mm/fault.c static void data_abort_decode(unsigned int esr) · line 100
Quoted 5 lines
arch/arm64/mm/fault.c +1
-1@@ -97,7 +97,7 @@ static void data_abort_decode(unsigned int esr) (esr & ESR_ELx_SF) >> ESR_ELx_SF_SHIFT, (esr & ESR_ELx_AR) >> ESR_ELx_AR_SHIFT); }else { -pr_alert (" ISV = 0, ISS = 0x%08lu\n" , esr & ESR_ELx_ISS_MASK); +pr_alert (" ISV = 0, ISS = 0x%08lx\n" , esr & ESR_ELx_ISS_MASK);
FWIW, since this is in front of me...
(esr & ESR_ELx_ISS_MASK seems long somewhat by accident, but the compiler should warn realiably if the type becomes mismatched in the future -- this patch makes the situation no worse anyway)
Cheers
---Dave
PATCH 1/1 arm64: fix misleading data abort decoding
In reply to Mark RutlandQuoted 5 lines · Mark Rutland
Currently
data_abort_decode()dumps the ISS field as a decimal value with a '0x' prefix, which is somewhat misleading.Fix it to print as hexadecimal, as was intended.
Quoted 8 lines
Signed-off-by Mark Rutland <[email protected]>Cc Catalin Marinas <[email protected]>Cc Julien Thierry <[email protected]>Cc Will Deacon <[email protected]>Fixes 1f9b8936f36f4a8e ("arm64: Decode information from ESR upon mem faults")--- arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Queued for 4.14-rc4. Thanks.
Signature · 1 line
Catalin