Skip to content

Commit afaa653

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
smp: Move irq_work_run() out of flush_smp_call_function_queue()
This ensures flush_smp_call_function_queue() is strictly about call_single_queue. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 52103be commit afaa653

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

kernel/smp.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ int smpcfd_dying_cpu(unsigned int cpu)
8484
* still pending.
8585
*/
8686
flush_smp_call_function_queue(false);
87+
irq_work_run();
8788
return 0;
8889
}
8990

@@ -191,6 +192,14 @@ static int generic_exec_single(int cpu, call_single_data_t *csd,
191192
void generic_smp_call_function_single_interrupt(void)
192193
{
193194
flush_smp_call_function_queue(true);
195+
196+
/*
197+
* Handle irq works queued remotely by irq_work_queue_on().
198+
* Smp functions above are typically synchronous so they
199+
* better run first since some other CPUs may be busy waiting
200+
* for them.
201+
*/
202+
irq_work_run();
194203
}
195204

196205
/**
@@ -267,14 +276,6 @@ static void flush_smp_call_function_queue(bool warn_cpu_offline)
267276
csd_unlock(csd);
268277
func(info);
269278
}
270-
271-
/*
272-
* Handle irq works queued remotely by irq_work_queue_on().
273-
* Smp functions above are typically synchronous so they
274-
* better run first since some other CPUs may be busy waiting
275-
* for them.
276-
*/
277-
irq_work_run();
278279
}
279280

280281
/*

0 commit comments

Comments
 (0)