
From: Tiezhu Yang <yangtiezhu@loongson.cn> LoongArch inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IC10DU CVE: NA -------------------------------- So that they can be called in the kernel modules to do something. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Change-Id: I8892ff991bfc850f2016203ceb7d61595b7b8cba --- arch/loongarch/kernel/Makefile | 1 + arch/loongarch/kernel/extern.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 arch/loongarch/kernel/extern.c diff --git a/arch/loongarch/kernel/Makefile b/arch/loongarch/kernel/Makefile index caf9a0b5e62d..327af6b33cf6 100644 --- a/arch/loongarch/kernel/Makefile +++ b/arch/loongarch/kernel/Makefile @@ -7,6 +7,7 @@ OBJECT_FILES_NON_STANDARD_head.o := y extra-y := vmlinux.lds +obj-y += extern.o obj-y += head.o cpu-probe.o cacheinfo.o env.o setup.o entry.o genex.o \ traps.o irq.o idle.o process.o dma.o mem.o io.o reset.o switch.o \ elf.o syscall.o signal.o time.o topology.o inst.o ptrace.o vdso.o \ diff --git a/arch/loongarch/kernel/extern.c b/arch/loongarch/kernel/extern.c new file mode 100644 index 000000000000..11a94c331037 --- /dev/null +++ b/arch/loongarch/kernel/extern.c @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <linux/signal.h> + +void loongarch_set_current_blocked(sigset_t *newset); +int loongarch_copy_siginfo_to_user(siginfo_t __user *to, const kernel_siginfo_t *from); +int loongarch___save_altstack(stack_t __user *uss, unsigned long sp); +int loongarch_restore_altstack(const stack_t __user *uss); + +void loongarch_set_current_blocked(sigset_t *newset) +{ + return set_current_blocked(newset); +} +EXPORT_SYMBOL_GPL(loongarch_set_current_blocked); + +int loongarch_copy_siginfo_to_user(siginfo_t __user *to, const kernel_siginfo_t *from) +{ + return copy_siginfo_to_user(to, from); +} +EXPORT_SYMBOL_GPL(loongarch_copy_siginfo_to_user); + +int loongarch___save_altstack(stack_t __user *uss, unsigned long sp) +{ + return __save_altstack(uss, sp); +} +EXPORT_SYMBOL_GPL(loongarch___save_altstack); + +int loongarch_restore_altstack(const stack_t __user *uss) +{ + return restore_altstack(uss); +} +EXPORT_SYMBOL_GPL(loongarch_restore_altstack); -- 2.43.0