diff mbox series

[kvm-unit-tests,v2,1/2] arm64: Use _BITULL() to define SCTLR_EL1 bit fields

Message ID 20230724073949.1297331-2-shahuang@redhat.com (mailing list archive)
State New, archived
Headers show
Series arm64: Define name for the original RES1 bit but now functinal bit | expand

Commit Message

Shaoqin Huang July 24, 2023, 7:39 a.m. UTC
Currently the SCTLR_EL1_* is defined by (1 << x), all of them can be
replaced by the _BITULL() macro to make the format consistent with the
SCTLR_EL1_RES1 definition.

Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
---
 lib/arm64/asm/sysreg.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/lib/arm64/asm/sysreg.h b/lib/arm64/asm/sysreg.h
index 18c4ed3..09ef5f5 100644
--- a/lib/arm64/asm/sysreg.h
+++ b/lib/arm64/asm/sysreg.h
@@ -80,17 +80,17 @@  asm(
 #define ICC_GRPEN1_EL1			sys_reg(3, 0, 12, 12, 7)
 
 /* System Control Register (SCTLR_EL1) bits */
-#define SCTLR_EL1_EE	(1 << 25)
-#define SCTLR_EL1_WXN	(1 << 19)
-#define SCTLR_EL1_I	(1 << 12)
-#define SCTLR_EL1_SA0	(1 << 4)
-#define SCTLR_EL1_SA	(1 << 3)
-#define SCTLR_EL1_C	(1 << 2)
-#define SCTLR_EL1_A	(1 << 1)
-#define SCTLR_EL1_M	(1 << 0)
-
-#define SCTLR_EL1_RES1	(_BITUL(7) | _BITUL(8) | _BITUL(11) | _BITUL(20) | \
-			 _BITUL(22) | _BITUL(23) | _BITUL(28) | _BITUL(29))
+#define SCTLR_EL1_EE		_BITULL(25)
+#define SCTLR_EL1_WXN		_BITULL(19)
+#define SCTLR_EL1_I		_BITULL(12)
+#define SCTLR_EL1_SA0		_BITULL(4)
+#define SCTLR_EL1_SA		_BITULL(3)
+#define SCTLR_EL1_C		_BITULL(2)
+#define SCTLR_EL1_A		_BITULL(1)
+#define SCTLR_EL1_M		_BITULL(0)
+
+#define SCTLR_EL1_RES1	(_BITULL(7) | _BITULL(8) | _BITULL(11) | _BITULL(20) | \
+			 _BITULL(22) | _BITULL(23) | _BITULL(28) | _BITULL(29))
 #define INIT_SCTLR_EL1_MMU_OFF	\
 			SCTLR_EL1_RES1