Skip to content

Commit cbe8777

Browse files
FearyncessMingcongBai
authored andcommitted
AOSCOS: enable memfd_secret for LoongArch64
Loongarch64 is marked ARCH_HAS_SET_DIRECT_MAP by Chen Huacai. So we can use memfd_secret for this architecture. This commit has enabled it, and it is kselftest passed. Signed-off-by: Lain "Fearyncess" Yang <fsf@live.com>
1 parent 2388d67 commit cbe8777

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

arch/loongarch/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010

1111
#define __ARCH_WANT_NEW_STAT
1212
#define __ARCH_WANT_SYS_CLONE
13+
#define __ARCH_WANT_MEMFD_SECRET
1314

1415
#define NR_syscalls (__NR_syscalls)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3-
# No special ABIs on loongarch so far
4-
syscall_abis_64 +=
3+
# Add memfd_secret explictly
4+
syscall_abis_64 += memfd_secret

tools/testing/selftests/mm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ TEST_GEN_FILES += madv_populate
7272
TEST_GEN_FILES += map_fixed_noreplace
7373
TEST_GEN_FILES += map_hugetlb
7474
TEST_GEN_FILES += map_populate
75-
ifneq (,$(filter $(ARCH),arm64 riscv riscv64 x86 x86_64))
75+
ifneq (,$(filter $(ARCH),arm64 riscv riscv64 x86 x86_64 loongarch64))
7676
TEST_GEN_FILES += memfd_secret
7777
endif
7878
TEST_GEN_FILES += migration

0 commit comments

Comments
 (0)