[PATCH OLK-6.6 v2] arm64: entry: Fix ACTLR_XCALL_XINT not set build problem

hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/release-management/issues/IBV2E4 -------------------------------- When ACTLR_XCALL_XINT not set, the "el0t_64_xcall" and "el0t_64_xint" will not be defind, the following build problem occurs. Use config isolation to fix it. aarch64-linux-gnu-ld: arch/arm64/kernel/entry.o: in function `vectors_xcall_xint': ./arch/arm64/kernel/entry.S:596: undefined reference to `el0t_64_xcall' aarch64-linux-gnu-ld: ./arch/arm64/kernel/entry.S:596: undefined reference to `el0t_64_xcall' aarch64-linux-gnu-ld: ./arch/arm64/kernel/entry.S:597: undefined reference to `el0t_64_xint' Fixes: 7f2e02718bba ("arm64: entry: Support hardware xcall and xint") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> --- arch/arm64/include/asm/vectors.h | 2 ++ arch/arm64/kernel/entry.S | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/arch/arm64/include/asm/vectors.h b/arch/arm64/include/asm/vectors.h index 0addb4bd2b3d..9ecf45b67091 100644 --- a/arch/arm64/include/asm/vectors.h +++ b/arch/arm64/include/asm/vectors.h @@ -11,7 +11,9 @@ #include <asm/fixmap.h> extern char vectors[]; +#ifdef CONFIG_ACTLR_XCALL_XINT extern char vectors_xcall_xint[]; +#endif extern char tramp_vectors[]; extern char __bp_harden_el1_vectors[]; diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 801a521613ad..bd43e39d35c0 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -48,6 +48,7 @@ mrs x30, tpidrro_el0 msr tpidrro_el0, xzr .else +#ifdef CONFIG_ACTLR_XCALL_XINT alternative_if ARM64_HAS_HW_XCALL_XINT mrs x30, tpidrro_el0 msr tpidrro_el0, xzr @@ -55,6 +56,9 @@ mov x30, xzr nop alternative_endif +#else + mov x30, xzr +#endif .endif .Lskip_tramp_vectors_cleanup\@: .endif @@ -576,6 +580,7 @@ SYM_CODE_START(vectors) kernel_ventry 0, t, 32, error // Error 32-bit EL0 SYM_CODE_END(vectors) +#ifdef CONFIG_ACTLR_XCALL_XINT .align 11 SYM_CODE_START(vectors_xcall_xint) kernel_ventry 1, t, 64, sync // Synchronous EL1t @@ -598,6 +603,7 @@ SYM_CODE_START(vectors_xcall_xint) kernel_ventry 0, t, 32, fiq // FIQ 32-bit EL0 kernel_ventry 0, t, 32, error // Error 32-bit EL0 SYM_CODE_END(vectors_xcall_xint) +#endif #ifdef CONFIG_VMAP_STACK SYM_CODE_START_LOCAL(__bad_stack) @@ -882,11 +888,13 @@ alternative_else_nop_endif msr tpidrro_el0, x30 // Restored in kernel_ventry .endif +#ifdef CONFIG_ACTLR_XCALL_XINT .if \regsize == 32 alternative_if ARM64_HAS_HW_XCALL_XINT msr tpidrro_el0, x30 // Restored in kernel_ventry alternative_else_nop_endif .endif +#endif .if \bhb == BHB_MITIGATION_LOOP /* @@ -912,12 +920,16 @@ alternative_else_nop_endif 2: tramp_map_kernel x30 alternative_insn isb, nop, ARM64_WORKAROUND_QCOM_FALKOR_E1003 +#ifdef CONFIG_ACTLR_XCALL_XINT alternative_if_not ARM64_HAS_HW_XCALL_XINT tramp_data_read_var x30, vectors b 3f alternative_else_nop_endif tramp_data_read_var x30, vectors_xcall_xint 3: +#else + tramp_data_read_var x30, vectors +#endif alternative_if_not ARM64_WORKAROUND_CAVIUM_TX2_219_PRFM prfm plil1strm, [x30, #(1b - \vector_start)] alternative_else_nop_endif @@ -925,11 +937,15 @@ alternative_else_nop_endif msr vbar_el1, x30 isb .else +#ifdef CONFIG_ACTLR_XCALL_XINT alternative_if_not ARM64_HAS_HW_XCALL_XINT adr_l x30, vectors alternative_else adr_l x30, vectors_xcall_xint alternative_endif +#else + adr_l x30, vectors +#endif .endif // \kpti == 1 .if \bhb == BHB_MITIGATION_FW -- 2.34.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/16523 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/LBV... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/16523 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/LBV...
participants (2)
-
Jinjie Ruan
-
patchwork bot