[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/7] xen/events: drop xen_allocate_irqs_dynamic()


  • To: Juergen Gross <jgross@xxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Tue, 14 Nov 2023 08:20:07 +0000
  • Accept-language: en-US, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=zu66BTRsKQSTP5zj7i0yftHaKjX4+sHfNq2CYBpLDRI=; b=jBItv+nz0REg7Hp29a07Ydovc7g8DmAS5z5xq8FvPXNy3U84BxcyayaxVn5gah75LV+1gZNf5vUxMknS/Mx5YSmrka59AWhm5gMtf25MSsskYav2kglqGBgCt1rs9pMgi1D3K/93cVIvzFIoVdRN3pAs964yUcNRSGTUdcVHOwbQL5WxKXOccZK68jRgWom9F8JJTOs3xZTewfe4Rs056dmAUWlnbeNKUXlaNXNXDIqFqF6N5ibINbhRr1Yr4uTBCVHCxIj8pPx/by4WyHIDHDzYkg5BrnoDf/L77mK/M/DlkdBL6a16UfW3IK6PYsMRMofTpAO0E6BNadoqQlp4DA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gvOZ+/36jANvz4DqejjPiTj+8LVlOc35Ble1h+OBdrKsam5+b7tXSHN3jkSUuDDzsmCzvB0FEYoE1zr2g2EI1TGBVbwJnE12Ro8fX24PviFjL18vTCkLgBO7UeP/Q95M6j0+uRov7GRa3zDnuPpcy+jd5iOPoiEFcjRui/9BK138duhj4ym2VS2HvXFscFoARZzc2PEnyh6yezyRaj2JOQwfwQkdXKyTxR5q2fZ369fM5Ibk3cKW2AjGh7LOpPqhas4DYnJb/17ktngUWT8j00oQ3SW4RcXeYbLv9L/16K4E+DiVRp0zNM9/qY0kbUxMKk4B8RtkUI8BK32kk0m/KQ==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 14 Nov 2023 08:20:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZ//oUYzlaLKzNvESKtKHtrAIYJrB5psyA
  • Thread-topic: [PATCH 5/7] xen/events: drop xen_allocate_irqs_dynamic()


On 16.10.23 09:28, Juergen Gross wrote:


Hello Juergen

> Instead of having a common function for allocating a single IRQ or a
> consecutive number of IRQs, split up the functionality into the callers
> of xen_allocate_irqs_dynamic().
> 
> This allows to handle any allocation error in xen_irq_init() gracefully
> instead of panicing the system. Let xen_irq_init() return the irq_info
> pointer or NULL in case of an allocation error.
> 
> Additionally set the IRQ into irq_info already at allocation time, as
> otherwise the IRQ would be '0' (which is a valid IRQ number) until
> being set.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
>   drivers/xen/events/events_base.c | 74 +++++++++++++++++++-------------
>   1 file changed, 44 insertions(+), 30 deletions(-)
> 

[snip]

> @@ -1725,6 +1738,7 @@ void rebind_evtchn_irq(evtchn_port_t evtchn, int irq)
>          so there should be a proper type */
>       BUG_ON(info->type == IRQT_UNBOUND);
>   
> +     info->irq = irq;


I failed to understand why this is added here. Doesn't irq remain the 
same, and info->irq remains valid? Could you please clarify.

Other changes lgtm.


>       (void)xen_irq_info_evtchn_setup(irq, evtchn, NULL);
>   
>       mutex_unlock(&irq_mapping_update_lock);

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.