Skip to content

Commit 5fddf9a

Browse files
author
Marc Zyngier
committed
arm64: Add ESR_ELx_FSC_ADDRSZ_L() helper
Although we have helpers that encode the level of a given fault type, the Address Size fault type is missing it. While we're at it, fix the bracketting for ESR_ELx_FSC_ACCESS_L() and ESR_ELx_FSC_PERM_L(). Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent b229b46 commit 5fddf9a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • arch/arm64/include/asm

arch/arm64/include/asm/esr.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122
#define ESR_ELx_FSC_SECC_TTW(n) (0x1c + (n))
123123

124124
/* Status codes for individual page table levels */
125-
#define ESR_ELx_FSC_ACCESS_L(n) (ESR_ELx_FSC_ACCESS + n)
126-
#define ESR_ELx_FSC_PERM_L(n) (ESR_ELx_FSC_PERM + n)
125+
#define ESR_ELx_FSC_ACCESS_L(n) (ESR_ELx_FSC_ACCESS + (n))
126+
#define ESR_ELx_FSC_PERM_L(n) (ESR_ELx_FSC_PERM + (n))
127127

128128
#define ESR_ELx_FSC_FAULT_nL (0x2C)
129129
#define ESR_ELx_FSC_FAULT_L(n) (((n) < 0 ? ESR_ELx_FSC_FAULT_nL : \
@@ -161,6 +161,7 @@
161161

162162
/* ISS field definitions for exceptions taken in to Hyp */
163163
#define ESR_ELx_FSC_ADDRSZ (0x00)
164+
#define ESR_ELx_FSC_ADDRSZ_L(n) (ESR_ELx_FSC_ADDRSZ + (n))
164165
#define ESR_ELx_CV (UL(1) << 24)
165166
#define ESR_ELx_COND_SHIFT (20)
166167
#define ESR_ELx_COND_MASK (UL(0xF) << ESR_ELx_COND_SHIFT)

0 commit comments

Comments
 (0)