On 18.11.2021 07:51, Wei Chen wrote: > On 2021/11/18 0:48, Andrew Cooper wrote: >> --- a/xen/common/smp.c >> +++ b/xen/common/smp.c >> @@ -87,10 +87,14 @@ void smp_call_function_interrupt(void) >> >> irq_enter(); >> >> + if ( unlikely(!func) ) >> + goto no_func; >> + >> if ( call_data.wait ) >> { >> (*func)(info); >> smp_mb(); >> + no_func: >> cpumask_clear_cpu(cpu, &call_data.selected); >> } >> else > > Why only apply to call_data.wait non-zero case? > Is it because func will not be NULL when call_data.wait is zero?
No. call_data.wait is irrelevant when no function is to be called. If you look at the "else" branch, all that would be needed there is again just the cpumask_clear_cpu() invocation. Hence easiest to wire it like Andrew did (leaving aside my personal dislike of goto). Jan