[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/smp: Support NULL IPI function pointers
- To: Wei Chen <Wei.Chen@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 18 Nov 2021 10:56:04 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t76qZVa18ssaCE3fEw7q8ZCroRiWjv9laCR6W4EkqEE=; b=DcgRh4fF0dK/fMLi8P8SVWPJcx2/yGxgE5Kj7MyJc18zgGFpuwLlSoRhw8aEPmvSlAjD0z5bhByYhrJ7SrTO6nJUoPydaYINgOtzZvGHQ8kk0KSzoSF9I+O5LxQK8hYH9QvEMDsRFylOCuy7WMkO8RLK+j943NxhUyAgvACKk3KlALYREcuAD3cGfpCppTUz/8/yxlQjQmh5QJ9I2u3ZxeIQpGIIfObNAdv6WZNydK2Y+67XqeDI7EPyuwoVIu71EacvYxFsw1ud6R6KvsxnYdBv8ppZsb8tNe/fSoLw3EJY0RpR8GC1rM5E6YWNCS1hC+NRHcuGuDs6ZgRjt+FGww==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HPCVUByVLXy2ebdU1zmxeGHoOtyPO7hH+CU+6EWGl1cKA+resPEhHWhIbUxRtTT4Q2iQi0k0SoHLrz1Ce9aUDRKFuun2xrRqo8Azi1k6xrJBLJO8f75dzGkos+9w/wnNNR7DyDFjJMdCh3fpGuEmMKIT/LnjzLxa44wohX/ZVAbtg8maLrJH9rz3ka6m2c/mlwOKAaINlNSQJl74SfDYx7n7eeIvTlZ0Ro5aLTJ3xOU4p1gICmDevze8xSOCRrcTjEnd9QfGeORos+0lyuvoV1BrGKb/oAAaXs0c/qPQltU/6hlnZxfEiq8gI/Ss/e2Lid5uyANRA+frd4TU//ox5A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Delivery-date: Thu, 18 Nov 2021 09:56:21 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|