Skip to content

Commit 1272e7d

Browse files
AaronDotopsiff
authored andcommitted
LoongArch: Export some signal functions
So that they can be called in the kernel modules to do something. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
1 parent 4b6c58e commit 1272e7d

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

arch/loongarch/kernel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ OBJECT_FILES_NON_STANDARD_head.o := y
77

88
extra-y := vmlinux.lds
99

10+
obj-y += extern.o
1011
obj-y += head.o cpu-probe.o cacheinfo.o env.o setup.o entry.o genex.o \
1112
traps.o irq.o idle.o process.o dma.o mem.o io.o reset.o switch.o \
1213
elf.o syscall.o signal.o time.o topology.o inst.o ptrace.o vdso.o \

arch/loongarch/kernel/extern.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
#include <linux/signal.h>
3+
4+
void loongarch_set_current_blocked(sigset_t *newset);
5+
int loongarch_copy_siginfo_to_user(siginfo_t __user *to, const kernel_siginfo_t *from);
6+
int loongarch___save_altstack(stack_t __user *uss, unsigned long sp);
7+
int loongarch_restore_altstack(const stack_t __user *uss);
8+
9+
void loongarch_set_current_blocked(sigset_t *newset)
10+
{
11+
return set_current_blocked(newset);
12+
}
13+
EXPORT_SYMBOL_GPL(loongarch_set_current_blocked);
14+
15+
int loongarch_copy_siginfo_to_user(siginfo_t __user *to, const kernel_siginfo_t *from)
16+
{
17+
return copy_siginfo_to_user(to, from);
18+
}
19+
EXPORT_SYMBOL_GPL(loongarch_copy_siginfo_to_user);
20+
21+
int loongarch___save_altstack(stack_t __user *uss, unsigned long sp)
22+
{
23+
return __save_altstack(uss, sp);
24+
}
25+
EXPORT_SYMBOL_GPL(loongarch___save_altstack);
26+
27+
int loongarch_restore_altstack(const stack_t __user *uss)
28+
{
29+
return restore_altstack(uss);
30+
}
31+
EXPORT_SYMBOL_GPL(loongarch_restore_altstack);

0 commit comments

Comments
 (0)