mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 16:44:27 +08:00
9474689020
When using syscall wrappers the __SYSCALL_DEFINEx() and related macros
add a "__powerpc_" prefix to all syscall entry points.
So for example sys_mmap becomes __powerpc_sys_mmap.
This risks breaking workflows and tools that expect the old naming
scheme. At a minimum setting a breakpoint on eg. sys_mmap with gdb no
longer works.
There seems to be no compelling reason to add the "__powerpc_" prefix,
other than that it follows what some other arches do (x86, arm64, s390).
But unlike other arches powerpc doesn't always enable syscall wrappers,
so the syscall entry points can change name depending on CONFIG options.
For those reasons drop the "__powerpc_" prefix, reverting to the
existing naming.
Doing so reveals two prototypes in signal.h that have the incorrect type
when syscall wrappers are enabled. There are already prototypes for both
functions in syscalls.h, so drop the ones from signal.h.
Fixes: 7e92e01b72
("powerpc: Provide syscall wrapper")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221006135940.1223988-1-mpe@ellerman.id.au
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* This file contains the table of syscall-handling functions.
|
|
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
|
|
*
|
|
* Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
|
|
* and Paul Mackerras.
|
|
*
|
|
* Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
|
|
* PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
|
|
*/
|
|
|
|
#include <linux/syscalls.h>
|
|
#include <linux/compat.h>
|
|
#include <asm/unistd.h>
|
|
#include <asm/syscalls.h>
|
|
|
|
#undef __SYSCALL_WITH_COMPAT
|
|
#define __SYSCALL_WITH_COMPAT(nr, entry, compat) __SYSCALL(nr, entry)
|
|
|
|
#undef __SYSCALL
|
|
#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
|
|
#define __SYSCALL(nr, entry) [nr] = entry,
|
|
#else
|
|
/*
|
|
* Coerce syscall handlers with arbitrary parameters to common type
|
|
* requires cast to void* to avoid -Wcast-function-type.
|
|
*/
|
|
#define __SYSCALL(nr, entry) [nr] = (void *) entry,
|
|
#endif
|
|
|
|
const syscall_fn sys_call_table[] = {
|
|
#ifdef CONFIG_PPC64
|
|
#include <asm/syscall_table_64.h>
|
|
#else
|
|
#include <asm/syscall_table_32.h>
|
|
#endif
|
|
};
|
|
|
|
#ifdef CONFIG_COMPAT
|
|
#undef __SYSCALL_WITH_COMPAT
|
|
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat)
|
|
const syscall_fn compat_sys_call_table[] = {
|
|
#include <asm/syscall_table_32.h>
|
|
};
|
|
#endif /* CONFIG_COMPAT */
|