From patchwork Wed Nov 13 12:41:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13873561 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD1C4D41C3F for ; Wed, 13 Nov 2024 12:43:12 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.835555.1251453 (Exim 4.92) (envelope-from ) id 1tBChs-0004i9-F7; Wed, 13 Nov 2024 12:42:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 835555.1251453; Wed, 13 Nov 2024 12:42:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tBChs-0004hy-Bx; Wed, 13 Nov 2024 12:42:48 +0000 Received: by outflank-mailman (input) for mailman id 835555; Wed, 13 Nov 2024 12:42:47 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tBChr-0003m4-A2 for xen-devel@lists.xenproject.org; Wed, 13 Nov 2024 12:42:47 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c766b23a-a1bc-11ef-a0c7-8be0dac302b0; Wed, 13 Nov 2024 13:42:45 +0100 (CET) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-389-LLXNvxtiPoymLi2ZbYooGQ-1; Wed, 13 Nov 2024 07:42:40 -0500 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-381d07c377cso5245809f8f.1 for ; Wed, 13 Nov 2024 04:42:40 -0800 (PST) Received: from eisenberg.redhat.com (nat-pool-muc-u.redhat.com. [149.14.88.27]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381ed99aa18sm18023528f8f.61.2024.11.13.04.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 04:42:38 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c766b23a-a1bc-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjE3MC4xMC4xMjkuMTI0IiwiaGVsbyI6InVzLXNtdHAtZGVsaXZlcnktMTI0Lm1pbWVjYXN0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM3NjZiMjNhLWExYmMtMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNTAxNzY1LjQ5MDE5Mywic2VuZGVyIjoicHN0YW5uZXJAcmVkaGF0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731501764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gh5xBESPiuO8YtWqrs+YzUNc8fkB81YlCR9KwN+kONI=; b=b4On77mXEGVG+7RQHGY1GwvLAdLGNeCi69RzXatZk/gvFL1r6VqSOMw2pmjqINIgyBxKLW JbHJXa/JA17bPgXwXjhrG+KpMmPdBq24eCDA3/OmJxehIxxFS/IRRaVz9mgN9Evel8av+Q yLO/whn2uRGXVve+NHf9Lzpd/6sSnYg= X-MC-Unique: LLXNvxtiPoymLi2ZbYooGQ-1 X-Mimecast-MFC-AGG-ID: LLXNvxtiPoymLi2ZbYooGQ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731501759; x=1732106559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gh5xBESPiuO8YtWqrs+YzUNc8fkB81YlCR9KwN+kONI=; b=Obqxg8/g/vYDxlO8SMId3I3dOW5ROYiXxkzlYvw++2WV6jmffgBunuVElvZmUju0dU /+ivNY195hE7qf+gUGGgpNNCWtRaQN5CxJdMIrbouMEVbI4JSPT/aznPftt3OoTT6LcH jU1IwFNLFqOf5U3UtnCWHCAb20z3Xt3yNb8XJiTyhx5ENftJjGZ0iyQuy7db8BJvP1l8 wCO/d3/cxa87PZ9aGY3j3J4TYAWkrjxRFjZ3MiZHAMgPQAtg43NBhn5HaY4HgS892z26 4v5druY6cPW/9d5vvcId0FFB5DguEki1mtkwSFgOg5M6tzhOWDaiD+JfvtM+l+uk5NNO B5dg== X-Forwarded-Encrypted: i=1; AJvYcCWjrklDnqPwznyN5TPlsGSmACFq5yQckZtyWy9XpWZsxVFRC4nLSBWHWXy3cleOWxvXOGel5bGegMM=@lists.xenproject.org X-Gm-Message-State: AOJu0YygH1KvKPgrguBl29Jmut+F9NV2KC9Azj8BxxXKoZCN7lZ6ZrUd NfKoPs20ns114VyqGdyGkSezXgQoGYvY++Mdvt20WGkp7dDk5GIpidWTAioTy//7qBjuM0mAtBM 9v/qjvEbwiE2e/N6guJUh6TuNMya0xWNBdkyIdW8fxxYiZv7N5NpTV0Eq3FK9Xx37 X-Received: by 2002:a05:6000:1868:b0:37c:d1ea:f1ce with SMTP id ffacd0b85a97d-381f1871ae1mr21127488f8f.25.1731501759568; Wed, 13 Nov 2024 04:42:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjSkicOa2vHaglKeMl2d4NOiMMxDq6ITRAVtvhVhWcLJvAFiM/FAEZ/6qNVryGFEz3sYUTmQ== X-Received: by 2002:a05:6000:1868:b0:37c:d1ea:f1ce with SMTP id ffacd0b85a97d-381f1871ae1mr21127442f8f.25.1731501759149; Wed, 13 Nov 2024 04:42:39 -0800 (PST) From: Philipp Stanner To: Damien Le Moal , Niklas Cassel , Basavaraj Natikar , Jiri Kosina , Benjamin Tissoires , Arnd Bergmann , Greg Kroah-Hartman , Alex Dubov , Sudarsana Kalluru , Manish Chopra , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rasesh Mody , GR-Linux-NIC-Dev@marvell.com, Igor Mitsyanko , Sergey Matyukevich , Kalle Valo , Sanjay R Mehta , Shyam Sundar S K , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Alex Williamson , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Philipp Stanner , Mario Limonciello , Chen Ni , Ricky Wu , Al Viro , Breno Leitao , Kevin Tian , Thomas Gleixner , Mostafa Saleh , Andy Shevchenko , Jason Gunthorpe , Yi Liu , Kunwu Chan , Ankit Agrawal , Christian Brauner , Reinette Chatre , Eric Auger , Ye Bin Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org Subject: [PATCH v2 04/11] net/ntb: Use never-managed version of pci_intx() Date: Wed, 13 Nov 2024 13:41:52 +0100 Message-ID: <20241113124158.22863-6-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113124158.22863-2-pstanner@redhat.com> References: <20241113124158.22863-2-pstanner@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Q0LDnnmtXghAbUhAyw0mptgXnpWnLxST-BlJeS-COp0_1731501760 X-Mimecast-Originator: redhat.com 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 Acked-by: Shyam Sundar S K #for ntb_hw_amd.c Acked-by: Dave Jiang # for ntb_hw_gen1.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);