Skip to contentSkip to conversation

arm64: fix misleading data abort decoding

PATCH New Mark Rutland 5 participants 5 messages Oct 2, 2017 arm64

lore
Share & tools
lore

Mark Rutland

author reviewer
#0 lore raw

PATCH 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.

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 +1 -1
index 89993c4b..a6d5281 100644
@@ -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
#1 lore raw

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
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
index 89993c4b..a6d5281 100644
@@ -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
#2 lore raw

PATCH 1/1 arm64: fix misleading data abort decoding

In reply to Mark Rutland
Quoted 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.

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
index 89993c4b..a6d5281 100644

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
#3 lore raw

PATCH 1/1 arm64: fix misleading data abort decoding

In reply to Mark Rutland
Quoted 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.

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
index 89993c4b..a6d5281 100644

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

maintainer Applied
#4 lore raw

PATCH 1/1 arm64: fix misleading data abort decoding

In reply to Mark Rutland
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
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