fix(rmm): replace ARRAY_READ/WRITE macros with direct read/write
In sysregs.c 'rt' index of reads/writes from/to 'rec->regs[rt]'
is being checked for maximum possible value of 31 corresonding
to XZR and all these cases are handled safely, so there is no
need for using ARRAY_READ/WRITE macros which cause performance
deterioration.
This patch replaces usage of ARRAY_READ/WRITE macros with direct
read and writes commands and renames those macros to
SAFE_ARRAY_READ/WRITE.
The patch removes 'esr_sysreg_rt()' inline function
defined in esr.h and replaces calls to it with modified
ESR_EL2_SYSREG_ISS_RT macro.
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: Ib2d9996ef380ffb9cdcafa320ded9fa991d9a378
diff --git a/lib/arch/include/arch.h b/lib/arch/include/arch.h
index a67baa4..5db3d08 100644
--- a/lib/arch/include/arch.h
+++ b/lib/arch/include/arch.h
@@ -882,10 +882,8 @@
#define ESR_EL2_SYSREG_IS_WRITE(esr) (!((esr) & ESR_EL2_SYSREG_DIRECTION))
#define ESR_IL(esr) ((esr) & ESR_EL2_IL_MASK)
-#define ESR_ISS(esr) ((esr) & ESR_EL2_ISS_MASK)
-#define ESR_EL2_SYSREG_ISS_RT(esr) \
- ((ESR_ISS(esr) & ESR_EL2_SYSREG_TRAP_RT_MASK) >> ESR_EL2_SYSREG_TRAP_RT_SHIFT)
+#define ESR_EL2_SYSREG_ISS_RT(esr) EXTRACT(ESR_EL2_SYSREG_TRAP_RT, esr)
#define ICC_HPPIR1_EL1_INTID_SHIFT 0
#define ICC_HPPIR1_EL1_INTID_WIDTH 24