patch-5.15.79-rt54.patch
[platform/kernel/linux-rpi.git] / kernel / entry / common.c
index 998bdb7..a553fed 100644 (file)
@@ -159,9 +159,17 @@ static unsigned long exit_to_user_mode_loop(struct pt_regs *regs,
 
                local_irq_enable_exit_to_user(ti_work);
 
-               if (ti_work & _TIF_NEED_RESCHED)
+               if (ti_work & _TIF_NEED_RESCHED_MASK)
                        schedule();
 
+#ifdef ARCH_RT_DELAYS_SIGNAL_SEND
+               if (unlikely(current->forced_info.si_signo)) {
+                       struct task_struct *t = current;
+                       force_sig_info(&t->forced_info);
+                       t->forced_info.si_signo = 0;
+               }
+#endif
+
                if (ti_work & _TIF_UPROBE)
                        uprobe_notify_resume(regs);
 
@@ -387,7 +395,7 @@ void irqentry_exit_cond_resched(void)
                rcu_irq_exit_check_preempt();
                if (IS_ENABLED(CONFIG_DEBUG_ENTRY))
                        WARN_ON_ONCE(!on_thread_stack());
-               if (need_resched())
+               if (should_resched(0))
                        preempt_schedule_irq();
        }
 }