mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 18:40:10 +00:00
perf syscalltbl: Remove syscall_table.h
The definition of "static const char *const syscalltbl[] = {" is done
in a generated syscalls_32.h or syscalls_64.h that is architecture
dependent. In order to include the appropriate file a syscall_table.h
is found via the perf include path and it includes the syscalls_32.h
or syscalls_64.h as appropriate.
To support having multiple syscall tables, one for 32-bit and one for
64-bit, or for different architectures, an include path cannot be
used. Remove syscall_table.h because of this and inline what it does
into syscalltbl.c.
For architectures without a syscall_table.h this will cause a failure
to include either syscalls_32.h or syscalls_64.h rather than a failure
to include syscall_table.h. For architectures that only included one
or other, the behavior matches BITS_PER_LONG as previously done on
architectures supporting both syscalls_32.h and syscalls_64.h.
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Howard Chu <howardchu95@gmail.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Link: https://lore.kernel.org/r/20250319050741.269828-4-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
@@ -1,2 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/syscalls_64.h>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/bitsperlong.h>
|
|
||||||
|
|
||||||
#if __BITS_PER_LONG == 64
|
|
||||||
#include <asm/syscalls_64.h>
|
|
||||||
#else
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
#endif
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/syscall_table_64.h>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/syscalls_64.h>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/bitsperlong.h>
|
|
||||||
|
|
||||||
#if __BITS_PER_LONG == 64
|
|
||||||
#include <asm/syscalls_64.h>
|
|
||||||
#else
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
#endif
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/bitsperlong.h>
|
|
||||||
|
|
||||||
#if __BITS_PER_LONG == 64
|
|
||||||
#include <asm/syscalls_64.h>
|
|
||||||
#else
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
#endif
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/bitsperlong.h>
|
|
||||||
|
|
||||||
#if __BITS_PER_LONG == 64
|
|
||||||
#include <asm/syscalls_64.h>
|
|
||||||
#else
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
#endif
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/syscalls_64.h>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/bitsperlong.h>
|
|
||||||
|
|
||||||
#if __BITS_PER_LONG == 64
|
|
||||||
#include <asm/syscalls_64.h>
|
|
||||||
#else
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
#endif
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/bitsperlong.h>
|
|
||||||
|
|
||||||
#if __BITS_PER_LONG == 64
|
|
||||||
#include <asm/syscalls_64.h>
|
|
||||||
#else
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
#endif
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#include <asm/syscalls_32.h>
|
|
||||||
@@ -7,13 +7,19 @@
|
|||||||
|
|
||||||
#include "syscalltbl.h"
|
#include "syscalltbl.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <asm/bitsperlong.h>
|
||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
#include <linux/zalloc.h>
|
#include <linux/zalloc.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "string2.h"
|
#include "string2.h"
|
||||||
|
|
||||||
#include <syscall_table.h>
|
#if __BITS_PER_LONG == 64
|
||||||
|
#include <asm/syscalls_64.h>
|
||||||
|
#else
|
||||||
|
#include <asm/syscalls_32.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
const int syscalltbl_native_max_id = SYSCALLTBL_MAX_ID;
|
const int syscalltbl_native_max_id = SYSCALLTBL_MAX_ID;
|
||||||
static const char *const *syscalltbl_native = syscalltbl;
|
static const char *const *syscalltbl_native = syscalltbl;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user