From a526a1308a03086381b7585f817af2c0d25142db Mon Sep 17 00:00:00 2001 From: Zhao Yihan Date: Tue, 10 Jan 2023 17:09:20 +0800 Subject: [PATCH] sw64: fix a compile error with CONFIG_EFI=n Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I56QAM -------------------------------- Signed-off-by: Zhao Yihan Reviewed-by: He Sheng Signed-off-by: Gu Zitao --- arch/sw_64/include/asm/efi.h | 8 ++++---- arch/sw_64/kernel/traps.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/sw_64/include/asm/efi.h b/arch/sw_64/include/asm/efi.h index ae68505e5e11..b9af3592cb28 100644 --- a/arch/sw_64/include/asm/efi.h +++ b/arch/sw_64/include/asm/efi.h @@ -6,6 +6,10 @@ #include #ifdef CONFIG_EFI extern void efi_init(void); +extern unsigned long entSuspend; + +#define SLEEP_ENTRY_GUID EFI_GUID(0x59cb76bb, 0x9c3a, 0x4c8f, 0xbd, 0x5c, 0xc0, 0x0f, 0x20, 0x61, 0x18, 0x4b) + #else #define efi_init() #define efi_idmap_init() @@ -35,8 +39,4 @@ extern void efi_init(void); #define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) -extern unsigned long entSuspend; - -#define SLEEP_ENTRY_GUID EFI_GUID(0x59cb76bb, 0x9c3a, 0x4c8f, 0xbd, 0x5c, 0xc0, 0x0f, 0x20, 0x61, 0x18, 0x4b) - #endif /* _ASM_SW64_EFI_H */ diff --git a/arch/sw_64/kernel/traps.c b/arch/sw_64/kernel/traps.c index 252eb23dd032..38a013129008 100644 --- a/arch/sw_64/kernel/traps.c +++ b/arch/sw_64/kernel/traps.c @@ -1459,5 +1459,7 @@ trap_init(void) wrent(entIF, 3); wrent(entUna, 4); wrent(entSys, 5); +#ifdef CONFIG_EFI wrent((void *)entSuspend, 6); +#endif } -- GitLab