[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 05/13] net/ntb: Use never-managed version of pci_intx()
- To: Philipp Stanner <pstanner@xxxxxxxxxx>, Damien Le Moal <dlemoal@xxxxxxxxxx>, Niklas Cassel <cassel@xxxxxxxxxx>, Sergey Shtylyov <s.shtylyov@xxxxxx>, Jiri Kosina <jikos@xxxxxxxxxx>, Benjamin Tissoires <bentiss@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Alex Dubov <oakad@xxxxxxxxx>, Sudarsana Kalluru <skalluru@xxxxxxxxxxx>, Manish Chopra <manishc@xxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Rasesh Mody <rmody@xxxxxxxxxxx>, GR-Linux-NIC-Dev@xxxxxxxxxxx, Igor Mitsyanko <imitsyanko@xxxxxxxxxxxxx>, Sergey Matyukevich <geomatsi@xxxxxxxxx>, Kalle Valo <kvalo@xxxxxxxxxx>, Jon Mason <jdmason@xxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, Allen Hubbe <allenbh@xxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Jaroslav Kysela <perex@xxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, Chen Ni <nichen@xxxxxxxxxxx>, Ricky Wu <ricky_wu@xxxxxxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Breno Leitao <leitao@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>, Mostafa Saleh <smostafa@xxxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Hannes Reinecke <hare@xxxxxxx>, John Garry <john.g.garry@xxxxxxxxxx>, Soumya Negi <soumya.negi97@xxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Yi Liu <yi.l.liu@xxxxxxxxx>, "Dr. David Alan Gilbert" <linux@xxxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, Ankit Agrawal <ankita@xxxxxxxxxx>, Reinette Chatre <reinette.chatre@xxxxxxxxx>, Eric Auger <eric.auger@xxxxxxxxxx>, Ye Bin <yebin10@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxx>, Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>, Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>, Rui Salvaterra <rsalvaterra@xxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>
- From: Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx>
- Date: Thu, 10 Oct 2024 10:12:34 +0530
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Klvl+0k+IcZY28S/d1xTQ0dsUop0L+0uOzjkH7sZpdg=; b=vX7awtTupLUr/F/VVJsANxdlBNuuS/E5oKdp7xBtjbDfF5WLqPhOwEvc34Lm5AAf7BGLarEMOKJrXTuxludph8OX+YAkRyPDNHfGwN2bQzS5IdfVF4ElfJQW0n+0x/Vse7JJ72V4gi86lHbgcemJ6HQkdoc6TLw4sGZ2Khi5dcxj92FR2DeVlJfGbsHvEpx/w690H3+HTrrS8pmVG0w65vAYCsiX8g9kY27eSVpP83CHigrZtH8JZePucXZJwuKPtBNxXPW0hYr8Urq8oKW8RIOeRju/C9pP66qmvxNH/LrOjBy8JWa6F0110zOJEPmrw/yWlJu1rWrvrPiOIEdIVw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LM2RQTywtsDvhV+D7HUhGtmhYRzc8D1v7tTf7FzjzwBQViyBFkhwAGit4zugaHZ6WqDS5+DI9/XQQDpdtIsZYTz1BUQXd2sXt7jjsySpsaurNCHwmgXqvLtQWGy6hoKE2lxIAB2UUa2jgN8iP/SaD+69FTHIiPvraaiTBVQ7H7/3xeDClXKIz8qeHwvioiwjya0VAbs5AOPJibBDAf8FZpa8R9yM1lnEr/xQrOlZ92fUOGdQorn5shSGFW3gnw8FJDKlzMIGcEwz19Zc/Guy/lR/F66SISYRoGdTjuuCPbP5n0YbDZksrN0bQPWDsRzFUr4tzmSyg1c1qryaNHkuWw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: linux-ide@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-wireless@xxxxxxxxxxxxxxx, ntb@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-sound@xxxxxxxxxxxxxxx
- Delivery-date: Thu, 10 Oct 2024 05:30:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 10/9/2024 14:05, Philipp Stanner wrote:
> pci_intx() is a hybrid function which can sometimes be managed through
> devres. To remove this hybrid nature from pci_intx(), it is necessary to
> port users to either an always-managed or a never-managed version.
>
> hw/amd and how/intel enable their PCI-Device with pci_enable_device().
> Thus, they need the never-managed version.
>
> Replace pci_intx() with pci_intx_unmanaged().
>
> Signed-off-by: Philipp Stanner <pstanner@xxxxxxxxxx>
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx> #for ntb_hw_amd.c
> ---
> drivers/ntb/hw/amd/ntb_hw_amd.c | 4 ++--
> drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c
> index d687e8c2cc78..b146f170e839 100644
> --- a/drivers/ntb/hw/amd/ntb_hw_amd.c
> +++ b/drivers/ntb/hw/amd/ntb_hw_amd.c
> @@ -791,7 +791,7 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev,
> err_msi_enable:
>
> /* Try to set up intx irq */
> - pci_intx(pdev, 1);
> + pci_intx_unmanaged(pdev, 1);
>
> rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED,
> "ndev_irq_isr", ndev);
> @@ -831,7 +831,7 @@ static void ndev_deinit_isr(struct amd_ntb_dev *ndev)
> if (pci_dev_msi_enabled(pdev))
> pci_disable_msi(pdev);
> else
> - pci_intx(pdev, 0);
> + pci_intx_unmanaged(pdev, 0);
> }
> }
>
> diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c
> b/drivers/ntb/hw/intel/ntb_hw_gen1.c
> index 079b8cd79785..9ad9d7fe227e 100644
> --- a/drivers/ntb/hw/intel/ntb_hw_gen1.c
> +++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c
> @@ -445,7 +445,7 @@ int ndev_init_isr(struct intel_ntb_dev *ndev,
>
> /* Try to set up intx irq */
>
> - pci_intx(pdev, 1);
> + pci_intx_unmanaged(pdev, 1);
>
> rc = request_irq(pdev->irq, ndev_irq_isr, IRQF_SHARED,
> "ndev_irq_isr", ndev);
|