Skip to content

Commit dce0aa3

Browse files
H. Peter Anvin (Intel)ingomolnar
authored andcommitted
x86/syscall: Unconditionally prototype {ia32,x32}_sys_call_table[]
Even if these APIs are disabled, and the arrays therefore do not exist, having the prototypes allows us to use IS_ENABLED() rather than using #ifdefs. If something ends up trying to actually *use* these arrays a linker error will ensue. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20210510185316.3307264-4-hpa@zytor.com
1 parent 3e5e7f7 commit dce0aa3

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

arch/x86/include/asm/syscall.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ extern const sys_call_ptr_t sys_call_table[];
2121

2222
#if defined(CONFIG_X86_32)
2323
#define ia32_sys_call_table sys_call_table
24-
#endif
25-
26-
#if defined(CONFIG_IA32_EMULATION)
24+
#else
25+
/*
26+
* These may not exist, but still put the prototypes in so we
27+
* can use IS_ENABLED().
28+
*/
2729
extern const sys_call_ptr_t ia32_sys_call_table[];
28-
#endif
29-
30-
#ifdef CONFIG_X86_X32_ABI
3130
extern const sys_call_ptr_t x32_sys_call_table[];
3231
#endif
3332

0 commit comments

Comments
 (0)