arch-arm: Remove currOpMode utility function

This was used by the currEL function only. We are progressively
removing any interface referring to Armv7 concepts

Change-Id: I1d97b392d063e85562b9234c094b1f2166e75ac9
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53623
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
diff --git a/src/arch/arm/utility.hh b/src/arch/arm/utility.hh
index 2155e8c..9514eb0 100644
--- a/src/arch/arm/utility.hh
+++ b/src/arch/arm/utility.hh
@@ -108,17 +108,12 @@
 
 bool inAArch64(ThreadContext *tc);
 
-static inline OperatingMode
-currOpMode(const ThreadContext *tc)
-{
-    CPSR cpsr = tc->readMiscRegNoEffect(MISCREG_CPSR);
-    return (OperatingMode) (uint8_t) cpsr.mode;
-}
-
 static inline ExceptionLevel
 currEL(const ThreadContext *tc)
 {
-    return opModeToEL(currOpMode(tc));
+    CPSR cpsr = tc->readMiscRegNoEffect(MISCREG_CPSR);
+
+    return opModeToEL((OperatingMode)(uint8_t)cpsr.mode);
 }
 
 inline ExceptionLevel