rpi4: boot: Update the firmwares for kernel v5.15.82 (fix booting issue)
[platform/kernel/linux-rpi.git] / kernel / smp.c
index f43ede0..9d3c8c5 100644 (file)
@@ -174,9 +174,9 @@ static int __init csdlock_debug(char *str)
        if (val)
                static_branch_enable(&csdlock_debug_enabled);
 
-       return 0;
+       return 1;
 }
-early_param("csdlock_debug", csdlock_debug);
+__setup("csdlock_debug=", csdlock_debug);
 
 static DEFINE_PER_CPU(call_single_data_t *, cur_csd);
 static DEFINE_PER_CPU(smp_call_func_t, cur_csd_func);
@@ -579,7 +579,7 @@ static void flush_smp_call_function_queue(bool warn_cpu_offline)
 
        /* There shouldn't be any pending callbacks on an offline CPU. */
        if (unlikely(warn_cpu_offline && !cpu_online(smp_processor_id()) &&
-                    !warned && !llist_empty(head))) {
+                    !warned && entry != NULL)) {
                warned = true;
                WARN(1, "IPI on offline CPU %d\n", smp_processor_id());
 
@@ -690,10 +690,20 @@ void flush_smp_call_function_from_idle(void)
 
        cfd_seq_store(this_cpu_ptr(&cfd_seq_local)->idle, CFD_SEQ_NOCPU,
                      smp_processor_id(), CFD_SEQ_IDLE);
+
        local_irq_save(flags);
        flush_smp_call_function_queue(true);
-       if (local_softirq_pending())
-               do_softirq();
+
+       if (local_softirq_pending()) {
+               if (!IS_ENABLED(CONFIG_PREEMPT_RT)) {
+                       do_softirq();
+               } else {
+                       struct task_struct *ksoftirqd = this_cpu_ksoftirqd();
+
+                       if (ksoftirqd && !task_is_running(ksoftirqd))
+                               wake_up_process(ksoftirqd);
+               }
+       }
 
        local_irq_restore(flags);
 }