From patchwork Mon Dec 9 13:06:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 848505 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AF4C35955 for ; Mon, 9 Dec 2024 13:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749616; cv=none; b=kZq+GCc4Nh1TKMDBJQBUgSPCe6Kn8qVWfxmkVqBsmThrFgKa6pznwvP71QjoVMmcc+ai4O3bWtg/Zgwstw1wOk17QzczUt/M8eY3t0aF1AS2Mx9HtMXvnvpHWs7T3ZhsSutcTTcOxxEVZQKRF5Uyjzd9C4lo3g+ThHjWWAwKaGo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749616; c=relaxed/simple; bh=lb7GonT3+ZCBn5vd8Htudn5MDz8T66fffMcfmzxL9oM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u7MkCU4P+ZtbzCbbuORopLwiDhOe7T2D+/KsNnHm6ZLD6wfSdHFBio9u03M1o02/ao0OJtJsBCFJ2K3x/01pMW9ZP0dIi6JsQL+VT5ptOnfdlAHwopwojhz1PEzFuGjsh9G6XaVSTwFRhpbETSud2GGRFrp6PNMctz6MCbtks+w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=h5Njczhi; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="h5Njczhi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733749613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JzWiWxh4LRhHWrBZAH8gP8nNmxU8jwjjwHhpaGNecfw=; b=h5Njczhizrv+D0H+RvkoG7u8bWVdiuF1wzQ33g/UdE0EPsc0uMUJBr0Z2VnAZAL60tScfS Ch3FERY7n0AU4qRpEgTWX6uur6RcORSDCX1HNp0O6OM6i6SwFfOm34SiIM/+Z9dmOsfHRq u8Nr5WEnqSCUJDOw+cm0Um+KJBv8JBg= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-ZfgAz-NTNgO5_OlsKK-SzQ-1; Mon, 09 Dec 2024 08:06:52 -0500 X-MC-Unique: ZfgAz-NTNgO5_OlsKK-SzQ-1 X-Mimecast-MFC-AGG-ID: ZfgAz-NTNgO5_OlsKK-SzQ Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-386333ea577so774607f8f.1 for ; Mon, 09 Dec 2024 05:06:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733749611; x=1734354411; 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=JzWiWxh4LRhHWrBZAH8gP8nNmxU8jwjjwHhpaGNecfw=; b=ABzBAjfhlSDZJ9bYWP/lygeo9KPZcb/UdbCR1VJc2/HH02LgZEWROA5EE1MYubN6Ad ePqNbUvPz/IUz38J5q+zMiGXteQV9Ey9fNQHhBdu0foZQcBLAlacfjeR5kl8WmoqeS62 id9uH1SP7Tm1LNQvMpLY0oUoQ3OxcDfBCHZ+AZNdOxeIycHTE73YhJ7/3G9NOxkOVnEV df0PioCLCX71hm7IboWQCgzhrCZks5AsIiZttTHn9q3zdnZ7PJ7fGGFfXCWvvZsbWDR7 9eLGXP4/SurSE6x5FQXkiiniPaJrDszldimFBJcSu7iureKvO/T6iMdh03zPE5c5R4CL RVpQ== X-Forwarded-Encrypted: i=1; AJvYcCVWTIuklWS6mwTDkU+WaynG0kDgf6UDhN2ABlKkUPMJKa+BP62AABdy2SxX0l9jSkZeDDf1tFu5IgtzgA==@vger.kernel.org X-Gm-Message-State: AOJu0YzSeks44Mb1KNvI1c6s95kokZYfLlvraFdBxzG675anG4jHX05U 14v9Y2jRHNj9B3H0IAx62gv15x+JamE/cqg3tqED5/3sJqgZXlheXAY5W/sGpj9ql2s0EwYNJ+Y pqvZE8FhorexfzJcO05LZyy5LimBF+InRaYhQukPRDQwhz5kijlJHV8geoWu6 X-Gm-Gg: ASbGncvs3piWBNgqzhlewC+qw3/0zOphWFdZUG12yvjb2wM84mjX1oakx9ShvugRKar 5NhUEQTIVYJ6vaVU8u6sENtSmaanGenA+1qKuHMBgdHvtl2WG6GCqO/CK+9FywqcA4eeZC7w1nn 8N2ARWOVJDGgcDdVi5HA4zm03cIGIpMP7F8vlhgGVj798RdsPwzgmlCqCqMdIeP8LmXY2qqNOPS WeUyXAVOg8xIFyfML/O4SHRBxPfLrGcqMQYgNKUn8Eu9QBSE1hBq0hqWGS60bobCa3LTts4bSSE T1kftIUf X-Received: by 2002:a05:6000:186c:b0:385:f465:12f8 with SMTP id ffacd0b85a97d-386453f6891mr224930f8f.47.1733749611227; Mon, 09 Dec 2024 05:06:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYLGzMuES8pL8UNwc6rduiHNSssmgKFMI0arqDxmQvwrHwV9r5BJKNGyDbmmGP7hHm3hITRA== X-Received: by 2002:a05:6000:186c:b0:385:f465:12f8 with SMTP id ffacd0b85a97d-386453f6891mr224791f8f.47.1733749609723; Mon, 09 Dec 2024 05:06:49 -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-3862190965asm13200127f8f.82.2024.12.09.05.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 05:06:49 -0800 (PST) From: Philipp Stanner To: amien 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 , Mario Limonciello , Chen Ni , Philipp Stanner , Ricky Wu , Al Viro , Breno Leitao , Thomas Gleixner , Kevin Tian , Andy Shevchenko , Mostafa Saleh , Jason Gunthorpe , Yi Liu , Kunwu Chan , Dan Carpenter , "Dr. David Alan Gilbert" , Ankit Agrawal , 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 v3 02/11] drivers/xen: Use never-managed version of pci_intx() Date: Mon, 9 Dec 2024 14:06:24 +0100 Message-ID: <20241209130632.132074-4-pstanner@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241209130632.132074-2-pstanner@redhat.com> References: <20241209130632.132074-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. xen enables its PCI-Device with pci_enable_device(). Thus, it needs the never-managed version. Replace pci_intx() with pci_intx_unmanaged(). Signed-off-by: Philipp Stanner Acked-by: Juergen Gross --- drivers/xen/xen-pciback/conf_space_header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c index fc0332645966..8d26d64232e8 100644 --- a/drivers/xen/xen-pciback/conf_space_header.c +++ b/drivers/xen/xen-pciback/conf_space_header.c @@ -106,7 +106,7 @@ static int command_write(struct pci_dev *dev, int offset, u16 value, void *data) if (dev_data && dev_data->allow_interrupt_control && ((cmd->val ^ value) & PCI_COMMAND_INTX_DISABLE)) - pci_intx(dev, !(value & PCI_COMMAND_INTX_DISABLE)); + pci_intx_unmanaged(dev, !(value & PCI_COMMAND_INTX_DISABLE)); cmd->val = value; From patchwork Mon Dec 9 13:06:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 848504 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C60762309AF for ; Mon, 9 Dec 2024 13:06:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749620; cv=none; b=jKrUCbwuI4WPlUETQGzbECj5Zl/X6Ic+4Khx8xCxdnFIzJJ5ZvxxFMGKvcmVr3v4f/WcGZel85Frpgq/GXyfU3IrY3YZfVWHvTBmgAQ8PD33VcA2EjMsJUhFTNAykGnj+LyVqk9upMcyFJHsqi1M9m5VOqSeCNb4JqTUWDISXGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749620; c=relaxed/simple; bh=MrbDrpIsvZ1dKVLDYervP0Vycy2eBw/58VpDKwA2pz0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EOGwBVX0QUK2qqz7zXBvjSgn90rhPVa9PpOZaCdN7shhf+VhGtyWncXd804q7E8SnzJ2RRS9P3UbbedG4G9VsojLGEsDI4LXakcgL5AdI6qN1gGtH8Qnzpru/ryQsKRu1XIPgZAq3GjfAnHHiDDvi/Qjg2uUGfFsaXDscwD3Sj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=C2F3NajM; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="C2F3NajM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733749617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jVrHbQL/WtPUoVmg5iNOH6KPahEUlaDR0JYKoVLlaPE=; b=C2F3NajMPtD8p+6twXRfD1khsYHWEnnfoLCnAKkSDRfniZjPwHu2aNK9H2KM1wwvDuScL+ xfT0hMeRPnTDP6MyUtSHLt6ehvQOnQrmjRoogtnkTZ1ZbJ3opSg5FqNNM5ZNSR0E4hleJj 8rMtmlXwBBZeyB6FY0zfZ11WPho/qtI= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-113-Xj9i2TuBP7uv__R4AMt9wQ-1; Mon, 09 Dec 2024 08:06:56 -0500 X-MC-Unique: Xj9i2TuBP7uv__R4AMt9wQ-1 X-Mimecast-MFC-AGG-ID: Xj9i2TuBP7uv__R4AMt9wQ Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-434e9e1b4d7so11369585e9.3 for ; Mon, 09 Dec 2024 05:06:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733749615; x=1734354415; 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=jVrHbQL/WtPUoVmg5iNOH6KPahEUlaDR0JYKoVLlaPE=; b=wlp5P27bNH+ZzZvG7E5R7yQGuB8MVB/7OB/vMCd/sYdXno7XJUgq1h/fcgSAPOt5mU 8oixSyxg1sRkMXfsedUk/njo7yU4YiHND1yikb6ft7nPeBSJkHkEgJEVeMulTpyEx4a3 mftjW52n5JauH5mu22YFBaJLpNJWtdvQzW5sw0xatkKr2Dh5OidPZSth7cxOF3UNz//H Tbu5eiG6FeBu1+AAIvxEJY7oy6haikiQvNQaOosbF1FgB3yENrib2UjNd0ytitRQGTgU /JQK/lUTG492TEsVwj056o2nG79ZZa/XhsW12uRXK3Dw6YfFPfk05GY61igSGW2gfJ5Z vVcA== X-Forwarded-Encrypted: i=1; AJvYcCVuiyyeyLoEcBvbY24hmERYOars65zMUsPnZobvZ7jzouXTz5L7ToPdJInUeKAYCmtjicUXXSqIS3UrLg==@vger.kernel.org X-Gm-Message-State: AOJu0YzR+XN4f68PcmYhdvDqt2hjlHRgn0TamdjjvhvdUu+ML40pMzWN vu7y62AM2Uv1UiL9GmEOloG7KrP/p/U2CVhbMDIEvtQnKnRlA+xjPwN7o41p4gXyNxvK3AXAqbY ItcxMWUenz3qLU1EBn7TgwyxYtKLPcELxFbMMenWk6CEt0UEVHQwj/wxice9t X-Gm-Gg: ASbGncuOh2uvICOXS0Xdk8pDrL/23v4SwNfAduN7yvyuRJU602zjuMr5jONhSe9R85r hZhn2lNP7qpFcvuULdlXeUDVTV5IGEa5r+/36pYAIQ3Z3LLlD+F/JO4Tew67cnCP54LCrJd8By/ vuL4nmAlWQstk0EZ91e0DX+l/6R/RKABrYcqT/VqEyufiqTwA770RYpoi0pvEOlHvc+n0f8Zrtt jjPuwxXsNCehIeFobgZH2JSsRYdwR/gMubq/BThCiu2a9AQfgWggC7vjbAMpX6bCp0vitndKIlP 5PeH7VjN X-Received: by 2002:a05:600c:3544:b0:431:60ec:7a91 with SMTP id 5b1f17b1804b1-434ddeade70mr103094915e9.2.1733749615350; Mon, 09 Dec 2024 05:06:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8dWBtsXMwPpsQh4FEW+o80sVo3gsVutdK8rZwCICXTNWn24DfDXUekpZhDfdomYwt5/+rkA== X-Received: by 2002:a05:600c:3544:b0:431:60ec:7a91 with SMTP id 5b1f17b1804b1-434ddeade70mr103094435e9.2.1733749614932; Mon, 09 Dec 2024 05:06:54 -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-3862190965asm13200127f8f.82.2024.12.09.05.06.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 05:06:54 -0800 (PST) From: Philipp Stanner To: amien 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 , Mario Limonciello , Chen Ni , Philipp Stanner , Ricky Wu , Al Viro , Breno Leitao , Thomas Gleixner , Kevin Tian , Andy Shevchenko , Mostafa Saleh , Jason Gunthorpe , Yi Liu , Kunwu Chan , Dan Carpenter , "Dr. David Alan Gilbert" , Ankit Agrawal , 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 v3 04/11] net/ntb: Use never-managed version of pci_intx() Date: Mon, 9 Dec 2024 14:06:26 +0100 Message-ID: <20241209130632.132074-6-pstanner@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241209130632.132074-2-pstanner@redhat.com> References: <20241209130632.132074-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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); From patchwork Mon Dec 9 13:06:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 848503 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BB7C1ACEB5 for ; Mon, 9 Dec 2024 13:07:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749626; cv=none; b=haq0WEbRmf/KS4T1I2Bmayoisci+Dtt191UDpKYVqaBKlSbZhTwwbRt57FgNtIaOM60JyIu36O5++eu/KviqEZ7y+3bOrcsChTtzQ7lhIkuIJm+6puhxWmLNt9Ad1xVqNQtRJrpaU/P8zw1rbh0vWhEbps4lZ99tfzX8tu7typY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749626; c=relaxed/simple; bh=p0/gWxUTpmVAZUhoNYoMEndzzz2nBwZ50lbcwipiIRI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qQAgxQ2Kc0BYXuohS8sMETRoE/ibmS0a2p0mLfSK0HGDPSxzB/xBRJt40NQ64R5QmUTPn5TNVMIWZ+KeYDqGo+q3ZCnO1HCKEZSRm+Vy4UIuxOnut5IJe5D2UoHkPWjISx47E/KY9++1bMXzTEHFgu0lBsSQGeCI6QkhcMNTKnk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=jP0F2H5k; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jP0F2H5k" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733749622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iGrvh/xDUNx0Zym0wN3Xe7A7dJtO5ZhSWVvmuSF27ww=; b=jP0F2H5kfj0VHUnncCJ7umywp1CFjdcnSCGPwHy7K3guRx/Z56aSMpOq7zMmmG8z1yZDk3 wBOVx02MFye2AQEo7heCKeT174LD0x8W7tCzfv+I7uXsr5i8vR4KyieLJF3YAoRT1BKfSN 21kaaMuRlHN9jU9VoKbqOmzN1Kpc5BU= 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-482-pDFWrDNkMHa5HgCKFwiJsA-1; Mon, 09 Dec 2024 08:06:58 -0500 X-MC-Unique: pDFWrDNkMHa5HgCKFwiJsA-1 X-Mimecast-MFC-AGG-ID: pDFWrDNkMHa5HgCKFwiJsA Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-385e49efd59so1691283f8f.0 for ; Mon, 09 Dec 2024 05:06:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733749617; x=1734354417; 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=iGrvh/xDUNx0Zym0wN3Xe7A7dJtO5ZhSWVvmuSF27ww=; b=Fw0IXlrHeziUlxBFiqcrSk8g1Rla94eJOpu3M8JfFoDBfZitahK7K+sSTByrqZZKmP L+byN+dZUM4CxkVr1tSMT0marHfylf2v1xvnB/nUHvgKbaJI13MFRWIWcVJNzWY86bus qLi3MiMDq06obKAwdKE6i2Z9zgQ4sILZh1sAKDJXtOAN0nBbAifonNkujMLcA7Yjmau4 8/4hMx0jbXaCBMALtuluZ+IUcIBt39naViSYgwnanNwHGywIa6BAJ++xh+NEMKrMIckz crA6TKhvBD7hSLEQ3Dq3K+7HM7en6Tm0rn30UpUhQaZONcFP1mgQgbtItcYPqzpkNh+z uABg== X-Forwarded-Encrypted: i=1; AJvYcCW7pwkoicdZvDSz89hDa12UOtL8WeHKbGwwbXt9cRZETQJIdRCMuztVAwgFq+hpEBpACx2CVy3F+sQGhw==@vger.kernel.org X-Gm-Message-State: AOJu0Yzf6KNxKa+q5fdYU5RnjzIwFkIiHc7kPGfCvTMthmgyqtiDdabH PdvigeluF/QQzhY3Uk/lx+sbLUP3EErAambmZzjKyJlO4ThvcsNiUDZcx1hy4tbaS00xWvQOAF1 LbyfsaQVMBuNdhyzXTfzaHw1VqP0yNmWjfMM1EOjAtQlRPB/I0GjTufO+R6ix X-Gm-Gg: ASbGncsmjt595K5RcAEY8rmpbf2+pzi130cpXq1V/hSYBXZ/f3wBupx8TPaeNaHf10p 22aq0Aiw5jTEF+2qeHbMFJTiz9WzZbLN5fNAg1XhpAv3qUzPtek0dz9TUbGDZaNcTbP1kzRP2Rv MUoVooUhUW8FuHgu7rDsdstsXHBMMM5wUc3lljk0G8j1KDx57Jz5j2avdjwMp+eucEQvcYu/j/c Et8VOs8k2Acp9oVVmhuSrlQrclsfR8YXnsUhTD1BDpdWYSJ5He+diMFl4xoHLnsGEYV4EdjmJ+f yfBt98bV X-Received: by 2002:a5d:47c9:0:b0:385:db11:badf with SMTP id ffacd0b85a97d-386453d6c46mr225649f8f.22.1733749617416; Mon, 09 Dec 2024 05:06:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+w+VXnhTGgYCQrqoxE7Q0eQycE2/xL59lBRJp9LXmIJ3oiAACyABfaofCQ1IoSgKVucKxLg== X-Received: by 2002:a5d:47c9:0:b0:385:db11:badf with SMTP id ffacd0b85a97d-386453d6c46mr225568f8f.22.1733749616959; Mon, 09 Dec 2024 05:06:56 -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-3862190965asm13200127f8f.82.2024.12.09.05.06.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 05:06:56 -0800 (PST) From: Philipp Stanner To: amien 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 , Mario Limonciello , Chen Ni , Philipp Stanner , Ricky Wu , Al Viro , Breno Leitao , Thomas Gleixner , Kevin Tian , Andy Shevchenko , Mostafa Saleh , Jason Gunthorpe , Yi Liu , Kunwu Chan , Dan Carpenter , "Dr. David Alan Gilbert" , Ankit Agrawal , 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 v3 05/11] misc: Use never-managed version of pci_intx() Date: Mon, 9 Dec 2024 14:06:27 +0100 Message-ID: <20241209130632.132074-7-pstanner@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241209130632.132074-2-pstanner@redhat.com> References: <20241209130632.132074-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. cardreader/rtsx_pcr.c and tifm_7xx1.c 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 --- drivers/misc/cardreader/rtsx_pcr.c | 2 +- drivers/misc/tifm_7xx1.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c index be3d4e0e50cc..e25e6d560dd7 100644 --- a/drivers/misc/cardreader/rtsx_pcr.c +++ b/drivers/misc/cardreader/rtsx_pcr.c @@ -1057,7 +1057,7 @@ static int rtsx_pci_acquire_irq(struct rtsx_pcr *pcr) } pcr->irq = pcr->pci->irq; - pci_intx(pcr->pci, !pcr->msi_en); + pci_intx_unmanaged(pcr->pci, !pcr->msi_en); return 0; } diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index 1d54680d6ed2..5f9c7ccae8d2 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c @@ -327,7 +327,7 @@ static int tifm_7xx1_probe(struct pci_dev *dev, goto err_out; } - pci_intx(dev, 1); + pci_intx_unmanaged(dev, 1); fm = tifm_alloc_adapter(dev->device == PCI_DEVICE_ID_TI_XX21_XX11_FM ? 4 : 2, &dev->dev); @@ -368,7 +368,7 @@ static int tifm_7xx1_probe(struct pci_dev *dev, err_out_free: tifm_free_adapter(fm); err_out_int: - pci_intx(dev, 0); + pci_intx_unmanaged(dev, 0); pci_release_regions(dev); err_out: if (!pci_dev_busy) @@ -392,7 +392,7 @@ static void tifm_7xx1_remove(struct pci_dev *dev) tifm_7xx1_sock_power_off(tifm_7xx1_sock_addr(fm->addr, cnt)); iounmap(fm->addr); - pci_intx(dev, 0); + pci_intx_unmanaged(dev, 0); pci_release_regions(dev); pci_disable_device(dev); From patchwork Mon Dec 9 13:06:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 848502 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 546A11ACEC1 for ; Mon, 9 Dec 2024 13:07:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749631; cv=none; b=rxksh1AgbwdSKkyS0mcSA9CAFegjt1K1ZS3B8cATSJupI1GhuM1IU1LNZAFPM777/GJFktQJHw+ChWIPbp266/7K1+ZkV8gqGKvCYC3D1nT9ut6Xa8knhSMvI8INpgqS6Q2KJ10r5l6233BahgjOcEFzHGkEsnW4reAwnkxg86E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749631; c=relaxed/simple; bh=wJE9vV/l3hdW8HDPZeW2FSJ+9CxTJ0aSSSqG6rS2R+8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iIIGrdmAXwcha+DCLtbe5vpkUy0BIETVIigWInsiv4IUiHWqpHE5dxPivTr8QeNBoaxRlfssEWaYKzok26kPfdsqAuUPU3mjZGzj/gzO4h2IzEBuC5D5JgbeEDyPNrSb1efgsUYTSmMCjCLAPtUDzwZN1g8SK/b3XgsGIB3WnPA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=LvxEDuGZ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LvxEDuGZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733749626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nnuXTvhYTlwCBDrOS1s2G6F9Hq/4HeIeK8aJfi4Wc90=; b=LvxEDuGZHhsT9Sloe6LnuhMee6+/DTLqPfay58Bi5xhZc3kegX1wBhsoyj5vO8TcPDJy4S sods/SEmPWNxH1Mwz+Ia6uOYdBmL7O+3R9iyWEHjO7r+K0RXJ1jSIJYI72erIOWNJenYHz gHHqgDms1hMrey10ajnQihV+hlVxX1g= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-588-gN3iwKZcMFqQqeICv_dNJQ-1; Mon, 09 Dec 2024 08:07:05 -0500 X-MC-Unique: gN3iwKZcMFqQqeICv_dNJQ-1 X-Mimecast-MFC-AGG-ID: gN3iwKZcMFqQqeICv_dNJQ Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-385df115300so2533962f8f.2 for ; Mon, 09 Dec 2024 05:07:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733749624; x=1734354424; 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=nnuXTvhYTlwCBDrOS1s2G6F9Hq/4HeIeK8aJfi4Wc90=; b=qDqhTxiOh8i58iit/2r5Py5BT2WcetZgHnJqs8MDqEQrwqUAFLyx0XLliADur3zsWQ rfKA7Ri913ZBUOe4NtAAGE08cY8IbRsnr5J00o28yREdLxxMzNT/up6AyLtXpEyJ320X fCcYjLbM2RJNl4Y1eAPpCaIKbizLtplNCQ48XAFnKIz+D9QYzgQJ3nC6Mp83CCKEyOz0 Lya0vBHS38dLGJBROhrD0Znvz9O4G5h+dUHs9gCc6sTpnuXMZeM0VBkqP+rJKFcYPbsG 4ihwDvImGaKWVqVBorqWUNXaZJ6XfvZ2GmL1JgHz1pGI49m/SYyUBgwifwwglH5pGkOE V3WA== X-Forwarded-Encrypted: i=1; AJvYcCVjuMY4PwujLPG9v+Kngecdvnjv+8ssWY+BZDZk+6nGPjgznb9+OlzA3aFweGKEBaDvbmmgDBp3NLjfJg==@vger.kernel.org X-Gm-Message-State: AOJu0Yws31HD5ocIPUlRBSWUbIqYE/XaLuPJeTRvyXXnPZNyt6bWpKj0 szEL2liJmOdgLXRSg69icYKVzePDrNMGGLdbC52z2QzCdnsd+l9Fq+OpNPFnjupFTdYXYrvRSE8 wMv9Y+3v/RlurJ6GD/K5T2hAU92mAho6YXMOk2TZbzM1qkG6Q+meK45OOxqQY X-Gm-Gg: ASbGncvrg4RD1tGQfuilxPMbD0C4eIbXgV5ILevElKTiMNfcYWNo+S30CNKdH++ICvA 7BYJ4Jl9gtG/hlcdl4DUq2rAIeNCXCfdKQgWlUnN8/8qWN4au/j4VGLho3EEnM/+QH/66uJu0Pg hKjLk/WmsMRNNPDloSVIoDIzE/wImclzDMX28eu5+Z+qrGb02VQktBVsM8XFHXtItaoJOk2pWEB Kf5bwcRI7XHojjB35Y/lJJSshqzAGDHsQzk+FZjf69FH1s9cTPVQX9OSKItpID/csDwkGj9iuDj x2uW3qP4 X-Received: by 2002:a05:6000:a07:b0:386:1ba1:37dc with SMTP id ffacd0b85a97d-3862b3d02a7mr10541540f8f.47.1733749624057; Mon, 09 Dec 2024 05:07:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IED6lK+xP3ASai9pzso97+PoKUV4QmBIbg3KzJDkAOewaSmInet03lP+u9hg0Iot8N8fifU+Q== X-Received: by 2002:a05:6000:a07:b0:386:1ba1:37dc with SMTP id ffacd0b85a97d-3862b3d02a7mr10541452f8f.47.1733749623572; Mon, 09 Dec 2024 05:07:03 -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-3862190965asm13200127f8f.82.2024.12.09.05.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 05:07:03 -0800 (PST) From: Philipp Stanner To: amien 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 , Mario Limonciello , Chen Ni , Philipp Stanner , Ricky Wu , Al Viro , Breno Leitao , Thomas Gleixner , Kevin Tian , Andy Shevchenko , Mostafa Saleh , Jason Gunthorpe , Yi Liu , Kunwu Chan , Dan Carpenter , "Dr. David Alan Gilbert" , Ankit Agrawal , 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, Sergey Shtylyov Subject: [PATCH v3 08/11] ata: Use always-managed version of pci_intx() Date: Mon, 9 Dec 2024 14:06:30 +0100 Message-ID: <20241209130632.132074-10-pstanner@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241209130632.132074-2-pstanner@redhat.com> References: <20241209130632.132074-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. All users in ata enable their PCI-Device with pcim_enable_device(). Thus, they need the always-managed version. Replace pci_intx() with pcim_intx(). Signed-off-by: Philipp Stanner Reviewed-by: Sergey Shtylyov Acked-by: Niklas Cassel --- drivers/ata/ahci.c | 2 +- drivers/ata/ata_piix.c | 2 +- drivers/ata/pata_rdc.c | 2 +- drivers/ata/sata_sil24.c | 2 +- drivers/ata/sata_sis.c | 2 +- drivers/ata/sata_uli.c | 2 +- drivers/ata/sata_vsc.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 8d27c567be1c..f813dbdc2346 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1987,7 +1987,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (ahci_init_msi(pdev, n_ports, hpriv) < 0) { /* legacy intx interrupts */ - pci_intx(pdev, 1); + pcim_intx(pdev, 1); } hpriv->irq = pci_irq_vector(pdev, 0); diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 093b940bc953..d441246fa357 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -1725,7 +1725,7 @@ static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) * message-signalled interrupts currently). */ if (port_flags & PIIX_FLAG_CHECKINTR) - pci_intx(pdev, 1); + pcim_intx(pdev, 1); if (piix_check_450nx_errata(pdev)) { /* This writes into the master table but it does not diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c index 0a9689862f71..09792aac7f9d 100644 --- a/drivers/ata/pata_rdc.c +++ b/drivers/ata/pata_rdc.c @@ -340,7 +340,7 @@ static int rdc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) return rc; host->private_data = hpriv; - pci_intx(pdev, 1); + pcim_intx(pdev, 1); host->flags |= ATA_HOST_PARALLEL_SCAN; diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 72c03cbdaff4..b771ebd41252 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c @@ -1317,7 +1317,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (sata_sil24_msi && !pci_enable_msi(pdev)) { dev_info(&pdev->dev, "Using MSI\n"); - pci_intx(pdev, 0); + pcim_intx(pdev, 0); } pci_set_master(pdev); diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index ef8724986de3..b8b6d9eff3b8 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c @@ -290,7 +290,7 @@ static int sis_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } pci_set_master(pdev); - pci_intx(pdev, 1); + pcim_intx(pdev, 1); return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, IRQF_SHARED, &sis_sht); } diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c index 60ea45926cd1..52894ff49dcb 100644 --- a/drivers/ata/sata_uli.c +++ b/drivers/ata/sata_uli.c @@ -221,7 +221,7 @@ static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } pci_set_master(pdev); - pci_intx(pdev, 1); + pcim_intx(pdev, 1); return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, IRQF_SHARED, &uli_sht); } diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c index d39b87537168..a53a2dfc1e17 100644 --- a/drivers/ata/sata_vsc.c +++ b/drivers/ata/sata_vsc.c @@ -384,7 +384,7 @@ static int vsc_sata_init_one(struct pci_dev *pdev, pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x80); if (pci_enable_msi(pdev) == 0) - pci_intx(pdev, 0); + pcim_intx(pdev, 0); /* * Config offset 0x98 is "Extended Control and Status Register 0" From patchwork Mon Dec 9 13:06:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 848501 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50E731B0401 for ; Mon, 9 Dec 2024 13:07:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749635; cv=none; b=uj+GyVtM/cXwmHZSmEytmcY3t/KEgw/pfuSrdYk4kTPZ1U3md3snSIw/LLeo0W0wLHR73lyzU+AGkh67nhgow4gs9+tjZxQ8U580a/uiCusR5bxiPKDl3OKDSI63cnAoEHEqgtQgXI0RM0HWq9D8KkmBIpnu91bVEfmayheOjcA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733749635; c=relaxed/simple; bh=kEzRZlYHQ35CA9CnBRQZ7a8YwaQDWA/y9wHnTg2Gq0Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G2T9qJNP1WuVmUJP6G4T2TBFVujazIZxMcuc0CY4EcWMtEr69DrQ803Hem/qfIEyleY7MBvbaBBJXVkJ4hQ1MLMJv2obULAH4GJxPS50tuZcpmZhJ89b3XlN2HKVMNUwGHrXVIw2HCocj598rLhAUwmqMlVTmve1nzSSLEPlaDE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Uk7DOXS0; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Uk7DOXS0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733749630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cg5FDrf0+9NG9f4wa7LEIeg49zn7uGzDf8HKpIKXKbU=; b=Uk7DOXS0pKDwwgrUE7AoI6sJGb49Otm4W9tOm3pILEAqne+s1qpqntlah4kIpK7x2VaJ44 lAqhpTMAbbgU1w+D0Npa5DvbNw0OQ0rBUq5dR+o0h1809b9tvfiN/j80oF4PdL9VaBw6J7 UPcjJbCCLDpyiY6H6tLYsUjktJBR8o8= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-689-uznvo6r9MlSomhze0Y4b9w-1; Mon, 09 Dec 2024 08:07:09 -0500 X-MC-Unique: uznvo6r9MlSomhze0Y4b9w-1 X-Mimecast-MFC-AGG-ID: uznvo6r9MlSomhze0Y4b9w Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-434edbbc3a7so14951205e9.3 for ; Mon, 09 Dec 2024 05:07:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733749628; x=1734354428; 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=cg5FDrf0+9NG9f4wa7LEIeg49zn7uGzDf8HKpIKXKbU=; b=kwR0brG5btEfewUvcEa0XHUOXONE91p42XunwTwpCZnOLSgY4rNal46mVQ+Vkw73rL Zcp0/JLVzUwPNUFJT8NC0SJaI0UHpA8JclaTxlcrzumCXydKfkH/CDw4ki8n1ZJG0MjL nMgbuy2i/xDtxKI5AjKk88bIL4rYRxhwLE3ra6UDMVdp07TXXPmFlOLonouQqZE5e5RA ADbEBbGzDTD1d5Bd7KVI5GjuTtweqbPO/eY5nlXAhdM1qCgqqG/k12RBxnh3Whn0GbPG rZ/ceZo8qtGxMce3aRUNAVKeubvbe0umh5kUWQ6IOi6rZG/SxXv2qaw6YL562lsbAacX oNZg== X-Forwarded-Encrypted: i=1; AJvYcCXXwmlj9RUMGk22ZuMr9mv+4lWGNVLJT4H6mi1vmK5L1MQELubI/uFc5dafc2Xmka+zCXL+su8xiws2lQ==@vger.kernel.org X-Gm-Message-State: AOJu0Yz5t7BcXnZIMjp8M1nqMs0ZH60Y2lTe0eNaaCPU1ChAkUzDjWMT /ja/YHy5Aw4eN/VXhLB1VTeTpmMUEJEdZuDzabaeV2nP2maagcor5awNj2//L7Nhuf7o8cuF60o cW3hEnXGniIWMrwALFCEXzPhNJ7r2aE4AVj8qpERLAN/RlBF9zYGN8KOxNWno X-Gm-Gg: ASbGncsA2LjSTW/WzTC0M7eloH1OpRvYmMOhtVTIhHk6YBjFrTd4IkghXvIPm5KD+Wp kp3/CTX63teiJ9cgKL160rLGGgQD26ppTWiHLqOBmjQ+e8dbaAwQdPn9PUaKuBEux5q2u+TsvjE fypialPElg//yS8LBX4KKnR2+qjeLQuAAcIOT2S4qOtZ6e2KeUb6kr8zDj29T8k/3atWGGQ3cDv hK4vsEq8FM+EBEDVUmgg02ZFnoQPr7vGf6BnbSS+BiJ1Y1PHYEBEQeE9iwOjNVUHOp7yi0JfWRM xKUggZeJ X-Received: by 2002:a05:6000:2d12:b0:385:faec:d94d with SMTP id ffacd0b85a97d-3862b3e2f99mr6786218f8f.51.1733749628290; Mon, 09 Dec 2024 05:07:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzvkT5DctzF6sU2GBgKgYj4TZMfZMHtf63D+x4hcRmPdkPLtxCBfCUCCjCewKM8z5+rRuxWg== X-Received: by 2002:a05:6000:2d12:b0:385:faec:d94d with SMTP id ffacd0b85a97d-3862b3e2f99mr6786186f8f.51.1733749627860; Mon, 09 Dec 2024 05:07:07 -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-3862190965asm13200127f8f.82.2024.12.09.05.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 05:07:07 -0800 (PST) From: Philipp Stanner To: amien 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 , Mario Limonciello , Chen Ni , Philipp Stanner , Ricky Wu , Al Viro , Breno Leitao , Thomas Gleixner , Kevin Tian , Andy Shevchenko , Mostafa Saleh , Jason Gunthorpe , Yi Liu , Kunwu Chan , Dan Carpenter , "Dr. David Alan Gilbert" , Ankit Agrawal , 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, Basavaraj Natikar Subject: [PATCH v3 10/11] HID: amd_sfh: Use always-managed version of pcim_intx() Date: Mon, 9 Dec 2024 14:06:32 +0100 Message-ID: <20241209130632.132074-12-pstanner@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241209130632.132074-2-pstanner@redhat.com> References: <20241209130632.132074-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. All users of amd_mp2_pci_remove(), where pci_intx() is used, call pcim_enable_device(), which is why the driver needs the always-managed version. Replace pci_intx() with pcim_intx(). Signed-off-by: Philipp Stanner Acked-by: Basavaraj Natikar --- drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 4 ++-- drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c index 0c28ca349bcd..48cfd0c58241 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c @@ -122,7 +122,7 @@ int amd_sfh_irq_init_v2(struct amd_mp2_dev *privdata) { int rc; - pci_intx(privdata->pdev, true); + pcim_intx(privdata->pdev, true); rc = devm_request_irq(&privdata->pdev->dev, privdata->pdev->irq, amd_sfh_irq_handler, 0, DRIVER_NAME, privdata); @@ -248,7 +248,7 @@ static void amd_mp2_pci_remove(void *privdata) struct amd_mp2_dev *mp2 = privdata; amd_sfh_hid_client_deinit(privdata); mp2->mp2_ops->stop_all(mp2); - pci_intx(mp2->pdev, false); + pcim_intx(mp2->pdev, false); amd_sfh_clear_intr(mp2); } diff --git a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c index db36d87d5634..ec9feb8e023b 100644 --- a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c +++ b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c @@ -289,7 +289,7 @@ static void amd_mp2_pci_remove(void *privdata) sfh_deinit_emp2(); amd_sfh_hid_client_deinit(privdata); mp2->mp2_ops->stop_all(mp2); - pci_intx(mp2->pdev, false); + pcim_intx(mp2->pdev, false); amd_sfh_clear_intr(mp2); }