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

Re: [PATCH 7/7] xen/events: remove some info_for_irq() calls in pirq handling


  • To: Juergen Gross <jgross@xxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Tue, 14 Nov 2023 18:16:41 +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=snhrVvvN4n1+9E1UVn5rS3vpAdArREM6gOElex3dLIg=; b=gSqgqnlB4bMRw53CI8tvwHigAbLSMjICxQsn4KIzQrGbrase1Qu6uWZX2k+Mb2sG34wyC9zhZ5RUuCcZOw8ZjzLtZy0leK7Nx6Mhf+Z0zjtWkNlmQkmNumh4m2qGAZx4/CvAMqZwdusSDCWicVD5k7w2ClE1zhwe7OkcKuowtbWU6deuXlE9cJhW6Fjgeggrz8WvIyL9qiMnfsReXpTUs6EXDRK/s8Pcd5rh1YKeO6xPzdieSe5mvPO7YUgfMuLcW6p0FEScjR6iZPJMXxRBVXQ7XjBqrSSzWgpWONlZ1aDWSKRQNXLQPTFMo3W097+1aVPHsRunSQzLpkg0oFPDlw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cvtQdpJeembNOVEtjDMbfSuftZFXoTfhdxwLZH/C9ZW4+jTRBlRkVaNmnNmcLkce33Nuc1eQXilBVJ8/dMXL0lTuRmF4PWk4MeUg+knWtrRvyrwU3D/D7358pti1X19YsA6yKdwM5EAktHo0l8FO7lOEuJW/UoaDNgbfQDrWol48DM2GCC3CibPDn4fIaot9zcsIn24RjWzjKCxSUQ6CMs7PIkWRgUNNyQmG0Tzo/S4fW2yu0c1Z9u2WaEujX7HPIKPG5vHewNhzeeiiy14v9+La4wfYlPj6jU82sHBs0sIGfYfNGawBnLAyoFj+2MlgfPRykE39eYFX1f7FujfWDw==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 14 Nov 2023 18:17:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZ//oeBwkqjiPvKEql1DMh00sxAbB6TXqA
  • Thread-topic: [PATCH 7/7] xen/events: remove some info_for_irq() calls in pirq handling


On 16.10.23 09:28, Juergen Gross wrote:

Hello Juergen


> Instead of the IRQ number user the struct irq_info pointer as parameter
> in the internal pirq related functions. This allows to drop some calls
> of info_for_irq().
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>


Looks good, so

Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>


Just one NIT below ...


[snip]

>   
> -static void pirq_query_unmask(int irq)
> +static void pirq_query_unmask(struct irq_info *info)
>   {
>       struct physdev_irq_status_query irq_status;
> -     struct irq_info *info = info_for_irq(irq);
>   
>       BUG_ON(info->type != IRQT_PIRQ);
>   
> -     irq_status.irq = pirq_from_irq(irq);
> +     irq_status.irq = info->u.pirq.pirq;


  ... what is the reason to open-code pirq_from_irq() here?
For example, __startup_pirq() continues to use helper in almost the same 
situation ...


[snip]

>   
> -static unsigned int __startup_pirq(unsigned int irq)
> +static unsigned int __startup_pirq(struct irq_info *info)
>   {
>       struct evtchn_bind_pirq bind_pirq;
> -     struct irq_info *info = info_for_irq(irq);
> -     evtchn_port_t evtchn = evtchn_from_irq(irq);
> +     evtchn_port_t evtchn = info->evtchn;
>       int rc;
>   
>       BUG_ON(info->type != IRQT_PIRQ);
> @@ -851,20 +868,20 @@ static unsigned int __startup_pirq(unsigned int irq)
>       if (VALID_EVTCHN(evtchn))
>               goto out;
>   
> -     bind_pirq.pirq = pirq_from_irq(irq);
> +     bind_pirq.pirq = pirq_from_irq(info);

    ... here



[snip]

 


Rackspace

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