mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
x86/entry: Make syscall functions static
They are only used in the respective source files. No point in exposing them. Signed-off-by: Thomas Gleixner <tglx@kernel.org> Tested-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com> Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com> Link: https://patch.msgid.link/20260707190254.438361565@kernel.org
This commit is contained in:
@@ -41,7 +41,7 @@ const sys_call_ptr_t sys_call_table[] = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __SYSCALL(nr, sym) case nr: return __ia32_##sym(regs);
|
#define __SYSCALL(nr, sym) case nr: return __ia32_##sym(regs);
|
||||||
long ia32_sys_call(const struct pt_regs *regs, unsigned int nr)
|
static noinline long ia32_sys_call(const struct pt_regs *regs, unsigned int nr)
|
||||||
{
|
{
|
||||||
switch (nr) {
|
switch (nr) {
|
||||||
#include <asm/syscalls_32.h>
|
#include <asm/syscalls_32.h>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const sys_call_ptr_t sys_call_table[] = {
|
|||||||
#undef __SYSCALL
|
#undef __SYSCALL
|
||||||
|
|
||||||
#define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs);
|
#define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs);
|
||||||
long x64_sys_call(const struct pt_regs *regs, unsigned int nr)
|
static noinline long x64_sys_call(const struct pt_regs *regs, unsigned int nr)
|
||||||
{
|
{
|
||||||
switch (nr) {
|
switch (nr) {
|
||||||
#include <asm/syscalls_64.h>
|
#include <asm/syscalls_64.h>
|
||||||
@@ -40,15 +40,17 @@ long x64_sys_call(const struct pt_regs *regs, unsigned int nr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_X86_X32_ABI
|
static noinline long x32_sys_call(const struct pt_regs *regs, unsigned int nr)
|
||||||
long x32_sys_call(const struct pt_regs *regs, unsigned int nr)
|
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_X86_X32_ABI
|
||||||
switch (nr) {
|
switch (nr) {
|
||||||
#include <asm/syscalls_x32.h>
|
#include <asm/syscalls_x32.h>
|
||||||
default: return __x64_sys_ni_syscall(regs);
|
default: return __x64_sys_ni_syscall(regs);
|
||||||
}
|
}
|
||||||
}
|
#else
|
||||||
|
return -ENOSYS;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static __always_inline bool do_syscall_x64(struct pt_regs *regs, int nr)
|
static __always_inline bool do_syscall_x64(struct pt_regs *regs, int nr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,14 +20,6 @@
|
|||||||
typedef long (*sys_call_ptr_t)(const struct pt_regs *);
|
typedef long (*sys_call_ptr_t)(const struct pt_regs *);
|
||||||
extern const sys_call_ptr_t sys_call_table[];
|
extern const sys_call_ptr_t sys_call_table[];
|
||||||
|
|
||||||
/*
|
|
||||||
* These may not exist, but still put the prototypes in so we
|
|
||||||
* can use IS_ENABLED().
|
|
||||||
*/
|
|
||||||
extern long ia32_sys_call(const struct pt_regs *, unsigned int nr);
|
|
||||||
extern long x32_sys_call(const struct pt_regs *, unsigned int nr);
|
|
||||||
extern long x64_sys_call(const struct pt_regs *, unsigned int nr);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Only the low 32 bits of orig_ax are meaningful, so we return int.
|
* Only the low 32 bits of orig_ax are meaningful, so we return int.
|
||||||
* This importantly ignores the high bits on 64-bit, so comparisons
|
* This importantly ignores the high bits on 64-bit, so comparisons
|
||||||
|
|||||||
Reference in New Issue
Block a user