Skip to content

Commit 256a6f4

Browse files
committed
Merge tag 'asm-generic-6.11' into loongarch-next
LoongArch architecture changes for 6.11 depend on the asm-generic changes to avoid confliction, so merge them to create a base.
2 parents 0c38364 + 1a7b732 commit 256a6f4

File tree

86 files changed

+1228
-1275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1228
-1275
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ remove-stale-files:
12191219
$(Q)$(srctree)/scripts/remove-stale-files
12201220

12211221
# Support for using generic headers in asm-generic
1222-
asm-generic := -f $(srctree)/scripts/Makefile.asm-generic obj
1222+
asm-generic := -f $(srctree)/scripts/Makefile.asm-headers obj
12231223

12241224
PHONY += asm-generic uapi-asm-generic
12251225
asm-generic: uapi-asm-generic

arch/arc/include/asm/Kbuild

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
syscall-y += syscall_table_32.h
3+
24
generic-y += extable.h
35
generic-y += kvm_para.h
46
generic-y += mcs_spinlock.h

arch/arc/include/asm/unistd.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+
#ifndef _ASM_ARC_UNISTD_H
3+
#define _ASM_ARC_UNISTD_H
4+
5+
#include <uapi/asm/unistd.h>
6+
7+
#define __ARCH_WANT_STAT64
8+
#define __ARCH_WANT_SYS_CLONE
9+
#define __ARCH_WANT_SYS_VFORK
10+
#define __ARCH_WANT_SYS_FORK
11+
12+
#define NR_syscalls __NR_syscalls
13+
14+
#endif

arch/arc/include/uapi/asm/Kbuild

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
syscall-y += unistd_32.h
3+
24
generic-y += ucontext.h

arch/arc/include/uapi/asm/unistd.h

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,4 @@
77
* published by the Free Software Foundation.
88
*/
99

10-
/******** no-legacy-syscalls-ABI *******/
11-
12-
/*
13-
* Non-typical guard macro to enable inclusion twice in ARCH sys.c
14-
* That is how the Generic syscall wrapper generator works
15-
*/
16-
#if !defined(_UAPI_ASM_ARC_UNISTD_H) || defined(__SYSCALL)
17-
#define _UAPI_ASM_ARC_UNISTD_H
18-
19-
#define __ARCH_WANT_RENAMEAT
20-
#define __ARCH_WANT_STAT64
21-
#define __ARCH_WANT_SET_GET_RLIMIT
22-
#define __ARCH_WANT_SYS_EXECVE
23-
#define __ARCH_WANT_SYS_CLONE
24-
#define __ARCH_WANT_SYS_CLONE3
25-
#define __ARCH_WANT_SYS_VFORK
26-
#define __ARCH_WANT_SYS_FORK
27-
#define __ARCH_WANT_TIME32_SYSCALLS
28-
29-
#define sys_mmap2 sys_mmap_pgoff
30-
31-
#include <asm-generic/unistd.h>
32-
33-
#define NR_syscalls __NR_syscalls
34-
35-
/* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */
36-
#define __NR_sysfs (__NR_arch_specific_syscall + 3)
37-
38-
/* ARC specific syscall */
39-
#define __NR_cacheflush (__NR_arch_specific_syscall + 0)
40-
#define __NR_arc_settls (__NR_arch_specific_syscall + 1)
41-
#define __NR_arc_gettls (__NR_arch_specific_syscall + 2)
42-
#define __NR_arc_usr_cmpxchg (__NR_arch_specific_syscall + 4)
43-
44-
__SYSCALL(__NR_cacheflush, sys_cacheflush)
45-
__SYSCALL(__NR_arc_settls, sys_arc_settls)
46-
__SYSCALL(__NR_arc_gettls, sys_arc_gettls)
47-
__SYSCALL(__NR_arc_usr_cmpxchg, sys_arc_usr_cmpxchg)
48-
__SYSCALL(__NR_sysfs, sys_sysfs)
49-
50-
#undef __SYSCALL
51-
52-
#endif
10+
#include <asm/unistd_32.h>

arch/arc/kernel/Makefile.syscalls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
syscall_abis_32 += arc time32 renameat stat64 rlimit

arch/arc/kernel/sys.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88

99
#define sys_clone sys_clone_wrapper
1010
#define sys_clone3 sys_clone3_wrapper
11+
#define sys_mmap2 sys_mmap_pgoff
1112

12-
#undef __SYSCALL
1313
#define __SYSCALL(nr, call) [nr] = (call),
14+
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
1415

1516
void *sys_call_table[NR_syscalls] = {
1617
[0 ... NR_syscalls-1] = sys_ni_syscall,
17-
#include <asm/unistd.h>
18+
#include <asm/syscall_table_32.h>
1819
};

arch/arm/include/asm/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#define __ARCH_WANT_SYS_FORK
3838
#define __ARCH_WANT_SYS_VFORK
3939
#define __ARCH_WANT_SYS_CLONE
40-
#define __ARCH_WANT_SYS_CLONE3
4140

4241
/*
4342
* Unimplemented (or alternatively implemented) syscalls

arch/arm64/include/asm/Kbuild

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
syscall-y += syscall_table_32.h
3+
syscall-y += syscall_table_64.h
4+
5+
# arm32 syscall table used by lib/compat_audit.c:
6+
syscall-y += unistd_32.h
7+
# same constants with prefixes, used by vdso, seccomp and sigreturn:
8+
syscall-y += unistd_compat_32.h
9+
210
generic-y += early_ioremap.h
311
generic-y += mcs_spinlock.h
412
generic-y += qrwlock.h

arch/arm64/include/asm/seccomp.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
#ifndef _ASM_SECCOMP_H
99
#define _ASM_SECCOMP_H
1010

11-
#include <asm/unistd.h>
11+
#include <asm/unistd_compat_32.h>
1212

1313
#ifdef CONFIG_COMPAT
14-
#define __NR_seccomp_read_32 __NR_compat_read
15-
#define __NR_seccomp_write_32 __NR_compat_write
16-
#define __NR_seccomp_exit_32 __NR_compat_exit
17-
#define __NR_seccomp_sigreturn_32 __NR_compat_rt_sigreturn
14+
#define __NR_seccomp_read_32 __NR_compat32_read
15+
#define __NR_seccomp_write_32 __NR_compat32_write
16+
#define __NR_seccomp_exit_32 __NR_compat32_exit
17+
#define __NR_seccomp_sigreturn_32 __NR_compat32_rt_sigreturn
1818
#endif /* CONFIG_COMPAT */
1919

2020
#include <asm-generic/seccomp.h>
@@ -23,8 +23,9 @@
2323
#define SECCOMP_ARCH_NATIVE_NR NR_syscalls
2424
#define SECCOMP_ARCH_NATIVE_NAME "aarch64"
2525
#ifdef CONFIG_COMPAT
26+
#include <asm/unistd_compat_32.h>
2627
# define SECCOMP_ARCH_COMPAT AUDIT_ARCH_ARM
27-
# define SECCOMP_ARCH_COMPAT_NR __NR_compat_syscalls
28+
# define SECCOMP_ARCH_COMPAT_NR __NR_compat32_syscalls
2829
# define SECCOMP_ARCH_COMPAT_NAME "arm"
2930
#endif
3031

0 commit comments

Comments
 (0)