Skip to content

Commit a99ef9c

Browse files
Alexandru Eliseictmarinas
authored andcommitted
arm64: Make ESR_ELx_xVC_IMM_MASK compatible with assembly
ESR_ELx_xVC_IMM_MASK is used as a mask for the immediate value for the HVC/SMC instructions. The header file is included by assembly files (like entry.S) and ESR_ELx_xVC_IMM_MASK is not conditioned on __ASSEMBLY__ being undefined. Use the UL() macro for defining the constant's size, as that is compatible with both C code and assembly, whereas the UL suffix only works for C code. Signed-off-by: Alexandru Elisei <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent b2d229d commit a99ef9c

File tree

1 file changed

+1
-1
lines changed
  • arch/arm64/include/asm

1 file changed

+1
-1
lines changed

arch/arm64/include/asm/esr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
#define ESR_ELx_WFx_ISS_TI (UL(1) << 0)
137137
#define ESR_ELx_WFx_ISS_WFI (UL(0) << 0)
138138
#define ESR_ELx_WFx_ISS_WFE (UL(1) << 0)
139-
#define ESR_ELx_xVC_IMM_MASK ((1UL << 16) - 1)
139+
#define ESR_ELx_xVC_IMM_MASK ((UL(1) << 16) - 1)
140140

141141
#define DISR_EL1_IDS (UL(1) << 24)
142142
/*

0 commit comments

Comments
 (0)