Message ID | 20250331094320.35226-6-yangyicong@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Add support for FEAT_{LS64, LS64_V} and related tests | expand |
On Mon, Mar 31, 2025 at 05:43:19PM +0800, Yicong Yang wrote: > From: Yicong Yang <yangyicong@hisilicon.com> > > 0x35 indicates IMPLEMENTATION DEFINED fault for Unsupported Exclusive or > Atomic access. Add ESR_ELx_FSC definition and corresponding wrapper. > > Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Just squash this into the next patch. Adding a helper w/o any user usually isn't a good idea. Thanks, Oliver
diff --git a/arch/arm64/include/asm/esr.h b/arch/arm64/include/asm/esr.h index d1b1a33f9a8b..2f357442f646 100644 --- a/arch/arm64/include/asm/esr.h +++ b/arch/arm64/include/asm/esr.h @@ -121,6 +121,7 @@ #define ESR_ELx_FSC_SEA_TTW(n) (0x14 + (n)) #define ESR_ELx_FSC_SECC (0x18) #define ESR_ELx_FSC_SECC_TTW(n) (0x1c + (n)) +#define ESR_ELx_FSC_EXCL_ATOMIC (0x35) /* Status codes for individual page table levels */ #define ESR_ELx_FSC_ACCESS_L(n) (ESR_ELx_FSC_ACCESS + (n)) @@ -464,6 +465,13 @@ static inline bool esr_fsc_is_access_flag_fault(unsigned long esr) (esr == ESR_ELx_FSC_ACCESS_L(0)); } +static inline bool esr_fsc_is_excl_atomic_fault(unsigned long esr) +{ + esr = esr & ESR_ELx_FSC; + + return esr == ESR_ELx_FSC_EXCL_ATOMIC; +} + /* Indicate whether ESR.EC==0x1A is for an ERETAx instruction */ static inline bool esr_iss_is_eretax(unsigned long esr) {