[PATCH] arm64: fix misleading data abort decoding

Dave Martin Dave.Martin at arm.com
Mon Oct 2 05:54:03 PDT 2017


On Mon, Oct 02, 2017 at 12:42:00PM +0100, Mark Rutland wrote:
> 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 <mark.rutland at arm.com>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Julien Thierry <julien.thierry at arm.com>
> Cc: Will Deacon <will.deacon at arm.com>
> Fixes: 1f9b8936f36f4a8e ("arm64: Decode information from ESR upon mem faults")
> ---
>  arch/arm64/mm/fault.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
> index 89993c4b..a6d5281 100644
> --- a/arch/arm64/mm/fault.c
> +++ b/arch/arm64/mm/fault.c
> @@ -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...

Reviewed-by: Dave Martin <Dave.Martin at arm.com>

(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



More information about the linux-arm-kernel mailing list