@@ -1399,6 +1399,13 @@ static void pci_do_jobs(void (*fn)(void *))
cpu = next_available_cpu(cpu);
if (!cpu)
cpu = first_available_cpu();
+
+ /* No CPU to run on, just run synchro */
+ if (cpu == this_cpu()) {
+ fn(phbs[i]);
+ jobs[i] = NULL;
+ goto next_phb;
+ }
}
jobs[i] = __cpu_queue_job(cpu, fn, phbs[i], false);
@@ -1408,6 +1415,8 @@ static void pci_do_jobs(void (*fn)(void *))
cpu = next_available_cpu(cpu);
if (!cpu)
cpu = first_available_cpu();
+ next_phb:
+ ;
}
/* Wait until all tasks are done */
The job dispatch code would spin forever trying to find a target CPU on a machine with only one available Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> --- core/pci.c | 9 +++++++++ 1 file changed, 9 insertions(+)