Skip to content

Commit

Permalink
arm64: Make ESR_ELx_xVC_IMM_MASK compatible with assembly
Browse files Browse the repository at this point in the history
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 <alexandru.elisei@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220425114444.368693-2-alexandru.elisei@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Alexandru Elisei authored and ctmarinas committed Apr 29, 2022
1 parent b2d229d commit a99ef9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/esr.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
#define ESR_ELx_WFx_ISS_TI (UL(1) << 0)
#define ESR_ELx_WFx_ISS_WFI (UL(0) << 0)
#define ESR_ELx_WFx_ISS_WFE (UL(1) << 0)
#define ESR_ELx_xVC_IMM_MASK ((1UL << 16) - 1)
#define ESR_ELx_xVC_IMM_MASK ((UL(1) << 16) - 1)

#define DISR_EL1_IDS (UL(1) << 24)
/*
Expand Down

0 comments on commit a99ef9c

Please sign in to comment.