firmware/br-ext-chip-ingenic/board/t40/kernel/patches/00000-arch_mips_kernel_smp....

24 lines
633 B
Diff

diff -drupN a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
--- a/arch/mips/kernel/smp.c 2017-10-21 18:09:07.000000000 +0300
+++ b/arch/mips/kernel/smp.c 2022-06-09 05:02:27.000000000 +0300
@@ -247,6 +247,8 @@ void smp_prepare_boot_cpu(void)
int __cpu_up(unsigned int cpu, struct task_struct *tidle)
{
+ unsigned int timeout = 0xff;
+
mp_ops->boot_secondary(cpu, tidle);
/*
@@ -256,6 +258,10 @@ int __cpu_up(unsigned int cpu, struct ta
udelay(100);
schedule();
}
+ while (!(cpumask_test_cpu(cpu, cpu_online_mask) || !timeout--)) {
+ udelay(100);
+ schedule();
+ }
synchronise_count_master(cpu);
return 0;