Merge remote-tracking branch 'tip/sched/arm64' into for-next/core
[linux-2.6-microblaze.git] / arch / arm64 / kernel / signal.c
index e93ffd7..fb54fb7 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/unistd.h>
 #include <asm/fpsimd.h>
 #include <asm/ptrace.h>
+#include <asm/syscall.h>
 #include <asm/signal32.h>
 #include <asm/traps.h>
 #include <asm/vdso.h>
@@ -895,7 +896,7 @@ static void do_signal(struct pt_regs *regs)
                     retval == -ERESTART_RESTARTBLOCK ||
                     (retval == -ERESTARTSYS &&
                      !(ksig.ka.sa.sa_flags & SA_RESTART)))) {
-                       regs->regs[0] = -EINTR;
+                       syscall_set_return_value(current, regs, -EINTR, 0);
                        regs->pc = continue_addr;
                }
 
@@ -916,19 +917,6 @@ static void do_signal(struct pt_regs *regs)
        restore_saved_sigmask();
 }
 
-static bool cpu_affinity_invalid(struct pt_regs *regs)
-{
-       if (!compat_user_mode(regs))
-               return false;
-
-       /*
-        * We're preemptible, but a reschedule will cause us to check the
-        * affinity again.
-        */
-       return !cpumask_test_cpu(raw_smp_processor_id(),
-                                system_32bit_el0_cpumask());
-}
-
 void do_notify_resume(struct pt_regs *regs, unsigned long thread_flags)
 {
        do {
@@ -955,19 +943,6 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_flags)
                        if (thread_flags & _TIF_NOTIFY_RESUME) {
                                tracehook_notify_resume(regs);
                                rseq_handle_notify_resume(NULL, regs);
-
-                               /*
-                                * If we reschedule after checking the affinity
-                                * then we must ensure that TIF_NOTIFY_RESUME
-                                * is set so that we check the affinity again.
-                                * Since tracehook_notify_resume() clears the
-                                * flag, ensure that the compiler doesn't move
-                                * it after the affinity check.
-                                */
-                               barrier();
-
-                               if (cpu_affinity_invalid(regs))
-                                       force_sig(SIGKILL);
                        }
 
                        if (thread_flags & _TIF_FOREIGN_FPSTATE)