Explorar o código

arm64/mm: Use ESR_ELx_FSC macro while decoding fault exception

Just replace hard code value of 63 (0x111111) with an existing macro
ESR_ELx_FSC when parsing for the status code during fault exception.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Anshuman Khandual %!s(int64=6) %!d(string=hai) anos
pai
achega
00bbd5d901
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/arm64/mm/fault.c

+ 1 - 1
arch/arm64/mm/fault.c

@@ -59,7 +59,7 @@ static const struct fault_info fault_info[];
 
 
 static inline const struct fault_info *esr_to_fault_info(unsigned int esr)
 static inline const struct fault_info *esr_to_fault_info(unsigned int esr)
 {
 {
-	return fault_info + (esr & 63);
+	return fault_info + (esr & ESR_ELx_FSC);
 }
 }
 
 
 #ifdef CONFIG_KPROBES
 #ifdef CONFIG_KPROBES