forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/parisc/kernel/signal.c
....@@ -30,7 +30,6 @@
3030 #include <asm/ucontext.h>
3131 #include <asm/rt_sigframe.h>
3232 #include <linux/uaccess.h>
33
-#include <asm/pgalloc.h>
3433 #include <asm/cacheflush.h>
3534 #include <asm/asm-offsets.h>
3635
....@@ -65,7 +64,6 @@
6564 #define INSN_LDI_R25_1 0x34190002 /* ldi 1,%r25 (in_syscall=1) */
6665 #define INSN_LDI_R20 0x3414015a /* ldi __NR_rt_sigreturn,%r20 */
6766 #define INSN_BLE_SR2_R0 0xe4008200 /* be,l 0x100(%sr2,%r0),%sr0,%r31 */
68
-#define INSN_NOP 0x08000240 /* nop */
6967 /* For debugging */
7068 #define INSN_DIE_HORRIBLY 0x68000ccc /* stw %r0,0x666(%sr0,%r0) */
7169
....@@ -165,7 +163,7 @@
165163
166164 give_sigsegv:
167165 DBG(1,"sys_rt_sigreturn: Sending SIGSEGV\n");
168
- force_sig(SIGSEGV, current);
166
+ force_sig(SIGSEGV);
169167 return;
170168 }
171169
....@@ -510,7 +508,7 @@
510508 regs->gr[28] = -EINTR;
511509 break;
512510 }
513
- /* fallthrough */
511
+ fallthrough;
514512 case -ERESTARTNOINTR:
515513 check_syscallno_in_delay_branch(regs);
516514 break;
....@@ -611,11 +609,10 @@
611609
612610 void do_notify_resume(struct pt_regs *regs, long in_syscall)
613611 {
614
- if (test_thread_flag(TIF_SIGPENDING))
612
+ if (test_thread_flag(TIF_SIGPENDING) ||
613
+ test_thread_flag(TIF_NOTIFY_SIGNAL))
615614 do_signal(regs, in_syscall);
616615
617
- if (test_thread_flag(TIF_NOTIFY_RESUME)) {
618
- clear_thread_flag(TIF_NOTIFY_RESUME);
616
+ if (test_thread_flag(TIF_NOTIFY_RESUME))
619617 tracehook_notify_resume(regs);
620
- }
621618 }