To improve the readability of the el1_sync routine in hyp-stub.S replace the
numeric immediate values with preprocessor macros ESR_EL2_EC_SHIFT and
ESR_EL2_EC_HVC64.

Signed-off-by: Geoff Levand <[email protected]>
---
 arch/arm64/kernel/hyp-stub.S | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S
index a272f33..2d960a9 100644
--- a/arch/arm64/kernel/hyp-stub.S
+++ b/arch/arm64/kernel/hyp-stub.S
@@ -52,10 +52,13 @@ ENDPROC(__hyp_stub_vectors)
 
        .align 11
 
+#define ESR_EL2_EC_SHIFT       26
+#define ESR_EL2_EC_HVC64       0x16
+
 el1_sync:
        mrs     x1, esr_el2
-       lsr     x1, x1, #26
-       cmp     x1, #0x16
+       lsr     x1, x1, #ESR_EL2_EC_SHIFT
+       cmp     x1, #ESR_EL2_EC_HVC64
        b.ne    2f                              // Not an HVC trap
        cbz     x0, 1f
        msr     vbar_el2, x0                    // Set vbar_el2
-- 
1.9.1



_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to