From nobody Mon Nov 25 16:38:41 2024 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 851B016E86F for ; Fri, 25 Oct 2024 15:00:41 +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=1729868444; cv=none; b=QDHybRi7IlqG3YlBc372aJZ6skvbEjxzcstB319+3Fx7MEtmDnkL9e8HsJx62P7nEl3Sdvq8qL4c3Jt31u0simbQAgKRw8V49hFQSCXXCxZNttNgvx9e/59gQc1AfcFm4QlTok+G4SgRzKmxz/IrA8WIzTr5qUVFx+7KHqSxQVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868444; c=relaxed/simple; bh=pzHm+p7iOQ3ZHeJddCbAsTb72gDaFZfayku/dAdnQvc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uMNaEUPEDN4Xj4ybZfBBTy4Lp0WfkUSYeazLZ7MzvjTfe7nanHJ2KprFKvG7OHBcTB2hIGBmuqUfBc6E6ME/grBlh2Vz4DlIyuBPiQFH/eiRJD3chXcq1F/z24ilF3NfDKYNqpTt5mKbqxWatQv9HKGrto5ne8yRkpyXJ/905C8= 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=JPGu2HMa; 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="JPGu2HMa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868440; 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=y8B9LV+ler/WieU+IGPE+8OX97zcf6y+ob4ao9vxZG8=; b=JPGu2HMa0VmJkvbZ1032ccnLrZwu9+fuQjTZ13+CTCZif5BmgbWrK6MgZtmNBiGWVAZxCs Aq7U9odEeV56faYonRTPcfiezURKGm7MeB4j6XjNw0DweaSbDkMkeeQE0TpVm3pakKHyyr 4WTGfYPgzJRAdKBACfPxSPc1frCPxOU= 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-141-PPz2Lsu5NR2e5T0SQDiTyA-1; Fri, 25 Oct 2024 11:00:39 -0400 X-MC-Unique: PPz2Lsu5NR2e5T0SQDiTyA-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d5ca192b8so1178859f8f.1 for ; Fri, 25 Oct 2024 08:00:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868438; x=1730473238; 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=y8B9LV+ler/WieU+IGPE+8OX97zcf6y+ob4ao9vxZG8=; b=ZMKjNYPFR59tZ6y3SJAByjb9n7mm6V4j496IID/KaoiJhgc2duimWhV0uNV0qV5i1i IGOW9wlSqAsGKyF5H3n5/oi8s1TneNB55QxoZ7a4u8gHFfT1LEikqemkPkMuolL/LyNE 42vOGq6XivR1Bz4TlBG8cRq049Zv1ZEnbrUmVt8kXx4vUuTBUu7mD829+ENwBGoVpyUi b0S4/dyGxUFA89Tb7AptAILp51/LQ5MvAn0shA0tgAuiprvQyKXFLH1mPxA6J1hH92CU 2m5G/D5UOvUehaUJHgtiktjI5W9R7VsTBWf5+9Rq8Y+OqsfA6TrpE11TkchQXX/ZOTQr 5iBw== X-Forwarded-Encrypted: i=1; AJvYcCVpmC+7HUYnk1xT6ZzrHhw6ziP2lOJw/vdjeuEkdq1NLiD15CpdIX6H//vyibh1/SnDZeLENaEwbEPqLPY=@vger.kernel.org X-Gm-Message-State: AOJu0YyoLeYFS8UkVYQAfyz2KFwwIeyhSxo12EQgwD9ooOo71TaGTICr dIuxU733/bA01pJSETZ6RhEvfIIbz4vJ3I2J2U/PK65cyLZp+3jtkVVCiMirZirOL6kRouhwP6o XRGFIlVHmiGh5X31sZxlXDM735mGOFpPkBxhW1+aOCK5T1xdWcqt+SiabxEC0Cw== X-Received: by 2002:a05:6000:d84:b0:37e:eee5:80dc with SMTP id ffacd0b85a97d-3803ac6704fmr4258051f8f.28.1729868437462; Fri, 25 Oct 2024 08:00:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0kR0T6tO4HMLrjOiOdPK2NT4nWQw4oUfgmMiDyLMaWTYTtq+bTSQKDKbrlWpwhU7sEMawvQ== X-Received: by 2002:a05:6000:d84:b0:37e:eee5:80dc with SMTP id ffacd0b85a97d-3803ac6704fmr4257961f8f.28.1729868436829; Fri, 25 Oct 2024 08:00:36 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:36 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 01/10] PCI: Make pcim_request_all_regions() a public function Date: Fri, 25 Oct 2024 16:59:44 +0200 Message-ID: <20241025145959.185373-2-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In order to remove the deprecated function pcim_iomap_regions_request_all(), a few drivers need an interface to request all BARs a PCI-Device offers. Make pcim_request_all_regions() a public interface. Signed-off-by: Philipp Stanner Reviewed-by: Damien Le Moal Reviewed-by: Ilpo J=C3=A4rvinen --- drivers/pci/devres.c | 3 ++- include/linux/pci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index b133967faef8..2a64da5c91fb 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -939,7 +939,7 @@ static void pcim_release_all_regions(struct pci_dev *pd= ev) * desired, release individual regions with pcim_release_region() or all of * them at once with pcim_release_all_regions(). */ -static int pcim_request_all_regions(struct pci_dev *pdev, const char *name) +int pcim_request_all_regions(struct pci_dev *pdev, const char *name) { int ret; int bar; @@ -957,6 +957,7 @@ static int pcim_request_all_regions(struct pci_dev *pde= v, const char *name) =20 return ret; } +EXPORT_SYMBOL(pcim_request_all_regions); =20 /** * pcim_iomap_regions_request_all - Request all BARs and iomap specified o= nes diff --git a/include/linux/pci.h b/include/linux/pci.h index 573b4c4c2be6..3b151c8331e5 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2293,6 +2293,7 @@ static inline void pci_fixup_device(enum pci_fixup_pa= ss pass, struct pci_dev *dev) { } #endif =20 +int pcim_request_all_regions(struct pci_dev *pdev, const char *name); void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxl= en); void __iomem *pcim_iomap_region(struct pci_dev *pdev, int bar, const char *name); --=20 2.47.0 From nobody Mon Nov 25 16:38:41 2024 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 C9B78185B7B for ; Fri, 25 Oct 2024 15:00:43 +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=1729868447; cv=none; b=djk0kUCwp+hGekMYNDzCncpGH9tqKP26ciIcxCXPvURMFFOfqRvyzVF8PH5iG9jH0pUJbwkrtuMwA1NyB+07dijRg+arKu/7kPW6vn4IIlQoGyNl/66vNnxpx8nubg6Nq8for4uQr2iNkSL+0bMDDR3Npg6i4hVWyWa2MY3jYd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868447; c=relaxed/simple; bh=s6xBjYgC8JsEjVYTXZALRaY3DljRr0l2UeRg0HzxlUs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nJtbS72V4axtsscwvKldOsI7yIELCn8ujoahDqw8ngfOFaSUJExKRDWxK+IFF+98D4Ba177cFTFJGbbo2L6/aXbSIvq6gFpDagnQz9D3rKBi9samu9qBMGgGcl5duADLj8TazO4KUXu7Wey5lz/Dj1nwNsPhB1o/We6edpXlb0Q= 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=LYLss4zR; 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="LYLss4zR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868442; 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=ryss9fvWehXfEU+PDJn7zlGdxW8bFi37+f8Je+z7dQs=; b=LYLss4zRzRg2Bi4zIc0gF+BDtc2tiiJKRudJ1rVGOPa3j1n2kFEIzGOGyDvCM9vyJ9+796 IWqf/yvdoOB2FgMl3fm+4TcBtZz6ONkXBIZS+d63Cl8P1Eyj5G7LyA/x5X8dILoKfpnZ42 rsrxTSDQkRtgeYibysNh+NYD8y/2YF0= 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-433-p4Og4kEXM0qyXdxZeWOHvQ-1; Fri, 25 Oct 2024 11:00:41 -0400 X-MC-Unique: p4Og4kEXM0qyXdxZeWOHvQ-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d432f9f5eso1117808f8f.0 for ; Fri, 25 Oct 2024 08:00:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868440; x=1730473240; 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=ryss9fvWehXfEU+PDJn7zlGdxW8bFi37+f8Je+z7dQs=; b=nXSM0NFwqlQhiSfMOsht1EfB6eCwbA5aOyHRrbxlWxiq21oKC0pAdPFaCQvtyw/cZJ jYm7/ZN/k8X6SfZVBZnEbOVaPb/XeELwjJBvERu5q2ojkVkVLjJNe3jNPxCkOc1xg1VK zdRDwgrq8LGhPlxoelB0qwa6NAnYzRA/HzezCLfcrnk9k0pvnjRDnxzdSj7gf8Xhg49W YVuo+lshVLeDZ4vfHPvo4tSB8jNEAViK40uSfga+jyJHc3LrzHws5mcELGnpOV2KyTyR 8iLqIRT2ziO5qAXygul5Vg+/CHNOLzRZGft8kitlW1dt73RchqnEUTKqhyBVojCfN4Xq 3vCQ== X-Forwarded-Encrypted: i=1; AJvYcCW6yQUaYRR53+AbuCPDLZZc2ROoYGY3MvDeeLZqZqVIq10rO/lia2S5ywsJ/e9J0mQWa6p68P5ve8ccPqs=@vger.kernel.org X-Gm-Message-State: AOJu0YwhvCY1kI0piaHjN24mbjgpehSeRtlEtaFjSrZOjZjFj+cqYG8a 2RVQ2N7B17iM5CNLkhdGMVeASJAqsuK8JL+ag8CEnh7a/oWnHgQpwf6zfR84QSF8BKkBySz+Ayj ztttgssyBU5il47w06zQFQObaOe/k+PS8oz9yfn9axLoM5cU06LXDscMJQbsIqQ== X-Received: by 2002:a5d:56c2:0:b0:374:c17a:55b5 with SMTP id ffacd0b85a97d-37efcf06dc1mr6436979f8f.14.1729868439446; Fri, 25 Oct 2024 08:00:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8ckOXkNlZIey2we3esP6YdjimmyCdm/ffeP6OkAIjJrVOU9m50FFPLlquaywIvtz5sXMgiw== X-Received: by 2002:a5d:56c2:0:b0:374:c17a:55b5 with SMTP id ffacd0b85a97d-37efcf06dc1mr6436886f8f.14.1729868438713; Fri, 25 Oct 2024 08:00:38 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:38 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 02/10] ata: ahci: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:45 +0200 Message-ID: <20241025145959.185373-3-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_regions_request_all() and pcim_iomap_table() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Damien Le Moal --- drivers/ata/acard-ahci.c | 6 ++++-- drivers/ata/ahci.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c index 547f56341705..3999305b5356 100644 --- a/drivers/ata/acard-ahci.c +++ b/drivers/ata/acard-ahci.c @@ -370,7 +370,7 @@ static int acard_ahci_init_one(struct pci_dev *pdev, co= nst struct pci_device_id /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ - rc =3D pcim_iomap_regions_request_all(pdev, 1 << AHCI_PCI_BAR, DRV_NAME); + rc =3D pcim_request_all_regions(pdev, DRV_NAME); if (rc =3D=3D -EBUSY) pcim_pin_device(pdev); if (rc) @@ -386,7 +386,9 @@ static int acard_ahci_init_one(struct pci_dev *pdev, co= nst struct pci_device_id if (!(hpriv->flags & AHCI_HFLAG_NO_MSI)) pci_enable_msi(pdev); =20 - hpriv->mmio =3D pcim_iomap_table(pdev)[AHCI_PCI_BAR]; + hpriv->mmio =3D pcim_iomap(pdev, AHCI_PCI_BAR, 0); + if (!hpriv->mmio) + return -ENOMEM; =20 /* save initial config */ ahci_save_initial_config(&pdev->dev, hpriv); diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 45f63b09828a..2043dfb52ae8 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1869,7 +1869,7 @@ static int ahci_init_one(struct pci_dev *pdev, const = struct pci_device_id *ent) /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ - rc =3D pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); + rc =3D pcim_request_all_regions(pdev, DRV_NAME); if (rc =3D=3D -EBUSY) pcim_pin_device(pdev); if (rc) @@ -1893,7 +1893,9 @@ static int ahci_init_one(struct pci_dev *pdev, const = struct pci_device_id *ent) if (ahci_sb600_enable_64bit(pdev)) hpriv->flags &=3D ~AHCI_HFLAG_32BIT_ONLY; =20 - hpriv->mmio =3D pcim_iomap_table(pdev)[ahci_pci_bar]; + hpriv->mmio =3D pcim_iomap(pdev, ahci_pci_bar, 0); + if (!hpriv->mmio) + return -ENOMEM; =20 /* detect remapped nvme devices */ ahci_remap_check(pdev, ahci_pci_bar, hpriv); --=20 2.47.0 From nobody Mon Nov 25 16:38:41 2024 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 62749166F23 for ; Fri, 25 Oct 2024 15:00:46 +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=1729868450; cv=none; b=ZYnc2q+q+8Esp7lmbAVE+lenuEUIKOGaC0cryXuvkOr5ZgG6pgaNLuMogit7cYO/o9rPolpx7PHN4OCxJW1WBei48Kk5+Ia4c14PJT2aNfTOOU+wr0Z7H64sH7uP74GtVu4tqn/+V/1TlVUSUrv9T33bkOzF8z7QnwWNVx8Xcss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868450; c=relaxed/simple; bh=YCSleCRL8+zgmB0F5bhpOuGHDhDr1YVS5o/lIBwlqhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=baEkGvho+XjQHDjNQg7RVvjxnbXIvqgIe2z/8/cDkGlPJZpzSb0A9JwpyANIfIGUeo+xkRkLhNYfuIOAmrVg40ptWbTBNqUa/7ellbJpY3UNJ1qR7z92PTrrOW19tkLYBDk3IOoyNQty9P4iRxpfsI9lN10LkQowYgZOmrfUSXQ= 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=KA6neiaP; 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="KA6neiaP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868444; 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=W8Pv00ipT6Qdh9I20/5aALEzhWkgYoXaIfeUPDxIxig=; b=KA6neiaPBqnoRKFTAcRAYcFH+6JOEEpN0zwJqx1xLw13CwhzwHGwkYX5r5O7kggy6e6pNp ZImS6zBaS+ntVdOWu6KUcTQnWlVSD6puwTGL7vqyit3aX9Bm7LDaRuAn/F14FBMqHhOajy ZUmw5qNfkhvcFmdCtcQ0Neclq01aa7k= 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-54-XTJwOMmyOCGeMMpDql2rxw-1; Fri, 25 Oct 2024 11:00:43 -0400 X-MC-Unique: XTJwOMmyOCGeMMpDql2rxw-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d5116f0a6so1025064f8f.0 for ; Fri, 25 Oct 2024 08:00:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868442; x=1730473242; 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=W8Pv00ipT6Qdh9I20/5aALEzhWkgYoXaIfeUPDxIxig=; b=GshWkM/1Hvqso47s1GO2QH/fDGuKy3p8JIVORWRN9bxH9GWG2hiHZhGvxzuTQP0tuQ fOSAjD2WR0oBZdQdaWAYg1r5OrHkYTJcxHMbhxCUNcKpTo83PwO5wMMfve7xAColXiSD WBI8+xP4wgDL5G6Hmmgj5r0/T4i3eo45y2yvRj8zpO2bn39XmHBtENwIdgDPdUQMKOvZ ikpWz62X3RJw+73HRBKThkKASRYWR7r4t0+ZsEgCMMNR9oqJ9WDfKwE8LbhsHGby7Hp4 fKyOtLOP+5is/Wci64b2Ksm9QpVDOp2vM5nBRejxL85IKoCnTzQrGdt4hh8ydVWdC71y Xn4g== X-Forwarded-Encrypted: i=1; AJvYcCW0kmTJl4JvjTb8kzD2ZzwPTxxrcYqSbvNfXOAYr7g0HcqkzgDceEwlHU18UEUw9jG5xjeuNNZfWKbJobA=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+HNDwdCjhajTlec24ytz1GyGeldkaxINduIpmKPMj8iccrc/e 1RsXHHxQn8aVSt3spnKFUuexRfPN+0NKQqpFGKp0Gy9Dj2UlWoKoP5UttyId8XKQDjIwwkpC575 L0jJN5kLQy+ZQSXTxa7eKZ2SjIR8jiR1GKGak8b4XPWrFUyqF5GVGXoXd4Nr8PA== X-Received: by 2002:a5d:6604:0:b0:378:89d8:8242 with SMTP id ffacd0b85a97d-37efcf15f2amr6047611f8f.26.1729868442462; Fri, 25 Oct 2024 08:00:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFseA1GnH6pKk4l885xPTSVzTwbgSgavQh+OieTeQi98Ek+SEn6EQGbHopZP84s8uTkOnT8ug== X-Received: by 2002:a5d:6604:0:b0:378:89d8:8242 with SMTP id ffacd0b85a97d-37efcf15f2amr6047433f8f.26.1729868440625; Fri, 25 Oct 2024 08:00:40 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:40 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 03/10] crypto: qat - replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:46 +0200 Message-ID: <20241025145959.185373-4-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_420xx/adf_drv.c | 11 ++++++++--- drivers/crypto/intel/qat/qat_4xxx/adf_drv.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_420xx/adf_drv.c b/drivers/crypto/= intel/qat/qat_420xx/adf_drv.c index f49818a13013..788a11cdb34b 100644 --- a/drivers/crypto/intel/qat/qat_420xx/adf_drv.c +++ b/drivers/crypto/intel/qat/qat_420xx/adf_drv.c @@ -129,16 +129,21 @@ static int adf_probe(struct pci_dev *pdev, const stru= ct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask =3D pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; =20 - ret =3D pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret =3D pcim_request_all_regions(pdev, pci_name(pdev)); if (ret) { - dev_err(&pdev->dev, "Failed to map pci regions.\n"); + dev_err(&pdev->dev, "Failed to request PCI regions.\n"); goto out_err; } =20 i =3D 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar =3D &accel_pci_dev->pci_bars[i++]; - bar->virt_addr =3D pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr =3D pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret =3D -ENOMEM; + goto out_err; + } } =20 pci_set_master(pdev); diff --git a/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c b/drivers/crypto/i= ntel/qat/qat_4xxx/adf_drv.c index 659905e45950..115eabfd1f6b 100644 --- a/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c +++ b/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c @@ -131,16 +131,21 @@ static int adf_probe(struct pci_dev *pdev, const stru= ct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask =3D pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; =20 - ret =3D pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret =3D pcim_request_all_regions(pdev, pci_name(pdev)); if (ret) { - dev_err(&pdev->dev, "Failed to map pci regions.\n"); + dev_err(&pdev->dev, "Failed to request PCI regions.\n"); goto out_err; } =20 i =3D 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar =3D &accel_pci_dev->pci_bars[i++]; - bar->virt_addr =3D pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr =3D pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret =3D -ENOMEM; + goto out_err; + } } =20 pci_set_master(pdev); --=20 2.47.0 From nobody Mon Nov 25 16:38:41 2024 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 0A53720BB2D for ; Fri, 25 Oct 2024 15:00:50 +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=1729868454; cv=none; b=jFN/zNbmviTe1LhdJh5OTnvY6CYfB8wD3g/4wogd1mlYUL3xyw6mTHDxkHpIFxzLDKiOLwVAJxC1Ma5xKq2YK8pjECA3HimddC5rW8tgYjgvtI1ZUP0frFPKeNkyEMkNUAzVnsZrPpFwdGv5FlM/ktfiSndHMK+AhWPiJwrdmjI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868454; c=relaxed/simple; bh=sVXXOvwhjUtLTRw/diUu9Q79ppS0cnZqeXoEIt69lpI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d/SQ9EJftFeeo6G/BSBdZ/qeCCulXtdzfIqyHvLbWt0M2bQYiWS2S5shwW3yhWDyw4EX8KpUjiMUzxRLxKugHW5vjK4zCnkF1dT16t2Wrq5a7j5PgOVJTCsdSOvbqu/8nu02e4a3gG3H34i926jsa640rpqSfsnVOTSAMmrm8mA= 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=eZXR4IAd; 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="eZXR4IAd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868449; 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=NcVaObSC/M1H9Whyn9Sm9wUdy5PG5I9wFKqHVmMGOas=; b=eZXR4IAd7h60azXsQ/2SPw5kVgbKD2I+aFAQ8KyEea+nYwJcyjdIo8FMC3WLmYpSPHFagI GDgWOMJWP5NIC7xdmhWbuVIkumEBPYroOBaJtopjXBjfWIJ1aAe3l8+vf68k5ZFkJ3+EsI JlOb+bsLomgLmnQN8QQZuFxQNWOS5AA= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-440-OqxFgQ9WNJqRI2Wvd3fY2g-1; Fri, 25 Oct 2024 11:00:48 -0400 X-MC-Unique: OqxFgQ9WNJqRI2Wvd3fY2g-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-431604a3b47so15134445e9.3 for ; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868447; x=1730473247; 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=NcVaObSC/M1H9Whyn9Sm9wUdy5PG5I9wFKqHVmMGOas=; b=nHRqRULagw+UC15FJmkGtGzHC/HYKrGIG5QlDWJ0X+tmS04QsZB6WoDFR3L+VLTzF4 /btbMqSA/OH9a5axs4Kz1219q7WFe4fO3HM4pw28vEvg2nTEYhBR/8VMKKugoD1c97Vd xSr7U03sNt/PdQavrQHaS+YARdPr6c5H0iMUR2XMbjEaLUB794V+nIDF9zei/0q/LVxI 6a3mpDbv6Na76DQVuve5aTbCHWcVBuwZZ2i/ILuiFL8SZ1hKB0gbTc/mUeLzLUHAyN8X r3ZjWPUHFHhuH0AX4w+oRJA4moNukNtVIhJvoIeYspEbF+p+bsURhUyvZi3RZaXVeL1D q4Og== X-Forwarded-Encrypted: i=1; AJvYcCVIv740gE0j/c/0YJ+wmR9p4yU2u0mYdn3EXjfI1UlI1+kwXxG6FkUyyb776izdcQHAfHdHMIApwT2CiPc=@vger.kernel.org X-Gm-Message-State: AOJu0YzLnQoficegHrdQdhsuqCLC+/m/yRMgtCEoi09W2I7FWcnyqaJW rps4flcm+6j5whbjtzchd15P3PrVZRikPS3+OqhlUh+hTX8xs8Vfbh96125N6+LnMz2ntsEB7EX Ilg0D/NoEOegq2LK+KGoePiT3BpxwFR9QfDB4wfBnFBmEhGihSD8HixJwaJP4jA== X-Received: by 2002:a05:600c:4e8e:b0:42f:310f:de9 with SMTP id 5b1f17b1804b1-4318c6f4de2mr45987965e9.15.1729868443309; Fri, 25 Oct 2024 08:00:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETR6RVW3pZ/du4LX4l4NN++/CwsutB2RaWnFX7zlgkal/P+HVGYPqgvnEtlOctQmPceTz6BA== X-Received: by 2002:a05:600c:4e8e:b0:42f:310f:de9 with SMTP id 5b1f17b1804b1-4318c6f4de2mr45987205e9.15.1729868442534; Fri, 25 Oct 2024 08:00:42 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:42 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 04/10] crypto: marvell - replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:47 +0200 Message-ID: <20241025145959.185373-5-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Bharat Bhushan --- drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c | 14 +++++++++----- drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c | 13 +++++++++---- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c b/drivers/c= rypto/marvell/octeontx2/otx2_cptpf_main.c index 400e36d9908f..94d0e73e42de 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c @@ -739,18 +739,22 @@ static int otx2_cptpf_probe(struct pci_dev *pdev, dev_err(dev, "Unable to get usable DMA configuration\n"); goto clear_drvdata; } - /* Map PF's configuration registers */ - err =3D pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM, - OTX2_CPT_DRV_NAME); + err =3D pcim_request_all_regions(pdev, OTX2_CPT_DRV_NAME); if (err) { - dev_err(dev, "Couldn't get PCI resources 0x%x\n", err); + dev_err(dev, "Couldn't request PCI resources 0x%x\n", err); goto clear_drvdata; } pci_set_master(pdev); pci_set_drvdata(pdev, cptpf); cptpf->pdev =3D pdev; =20 - cptpf->reg_base =3D pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM]; + /* Map PF's configuration registers */ + cptpf->reg_base =3D pcim_iomap(pdev, PCI_PF_REG_BAR_NUM, 0); + if (!cptpf->reg_base) { + err =3D -ENOMEM; + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", err); + goto clear_drvdata; + } =20 /* Check if AF driver is up, otherwise defer probe */ err =3D cpt_is_pf_usable(cptpf); diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c b/drivers/c= rypto/marvell/octeontx2/otx2_cptvf_main.c index 527d34cc258b..d0b6ee901f62 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c @@ -358,9 +358,8 @@ static int otx2_cptvf_probe(struct pci_dev *pdev, dev_err(dev, "Unable to get usable DMA configuration\n"); goto clear_drvdata; } - /* Map VF's configuration registers */ - ret =3D pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM, - OTX2_CPTVF_DRV_NAME); + + ret =3D pcim_request_all_regions(pdev, OTX2_CPTVF_DRV_NAME); if (ret) { dev_err(dev, "Couldn't get PCI resources 0x%x\n", ret); goto clear_drvdata; @@ -369,7 +368,13 @@ static int otx2_cptvf_probe(struct pci_dev *pdev, pci_set_drvdata(pdev, cptvf); cptvf->pdev =3D pdev; =20 - cptvf->reg_base =3D pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM]; + /* Map VF's configuration registers */ + cptvf->reg_base =3D pcim_iomap(pdev, PCI_PF_REG_BAR_NUM, 0); + if (!cptvf->reg_base) { + ret =3D -ENOMEM; + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", ret); + goto clear_drvdata; + } =20 otx2_cpt_set_hw_caps(pdev, &cptvf->cap_flag); =20 --=20 2.47.0 From nobody Mon Nov 25 16:38:41 2024 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 278781862AE for ; Fri, 25 Oct 2024 15:00:48 +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=1729868452; cv=none; b=mqCdkSSXVhJK7xbIjAYykUkXjnjiG+WdOYY7YglCDzlT3K8OidUMPcSLfyMm86dfPwKu+Nb8YoQUcVzSx2cOAVGWEqe/fPA1R+y6OMnskm1VRkAdCM8O/mIMb3AngQsFvvYrm59lY4okBnv6zsokw+KYadQ3wuVUWXahqSURM2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868452; c=relaxed/simple; bh=J3pG/0Gfw8HnALwZ/Br+hrSE4pEfpHhtl4LqImtqkrM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eqiRFAJk881uI/jjsq5xwd3UvKJIwtPz1ez6qxAZ2zboDx82LYmiRqN9E5cH101gZ9YsTsQnqTXa6cVXKwwUyMb6IpkR9kiWGd/kreCZoYCaRmAUaxazNibTopgJ0yyATuV4TKFO7Emg47bkif/ISqcEJkGrqK4B+GaNr/e+iVE= 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=O387BUbs; 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="O387BUbs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868447; 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=tLUy2S875DNBeHIOQOxEOE4p7AHnezc+a90RKtjms08=; b=O387BUbsjQOgSoWMKA1dpDjBJRdsgcWhzZHbzO0jRZKgXl5/HBALr7q8bjRHk6NnSjBnIw YbI2xJy0o94zN7ZnUaA5qVRFUHYThikaXu+LQUVJiDV3AjZytcBYkEnA08gd0un8QIMekg dLoBwgqdHdnk/mbHVwS1SfEQ53pbeOo= 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-76-4yEObYlGP4-JmAL_0CnAaw-1; Fri, 25 Oct 2024 11:00:46 -0400 X-MC-Unique: 4yEObYlGP4-JmAL_0CnAaw-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d432f9f5eso1117912f8f.0 for ; Fri, 25 Oct 2024 08:00:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868445; x=1730473245; 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=tLUy2S875DNBeHIOQOxEOE4p7AHnezc+a90RKtjms08=; b=DPMSjXkoqu7CBVUC75Dk9uJqDNO+QNLoNR+hZ5IyKL/33YN2Q9SPVEm8Qi2q2OPgsm g9JfOtav+Wz9mmGJnnKxalK4qzYVrR87/vJMR9juB1cIwnFrZqnKplymhynuz11liIWi rba9OHmVk+ZLE6+Q3UJT49o1o8z2qdxX3YvsQiLghYIym5742C5r0masEqVjeEgarKjU Pe+DcC0Nbpg+vP/w4YsHWGZq3ToRC+55UWmLydUnh8AoWKqgNpnXDNwgUdAWF95RMsOP tEHQ8F3/gVkoHxbPgF6l6Ti5yd14+zwwX0ja4H9OHfIzw3Z4oqdn48iIYDd9Koj8Cuy/ wW9Q== X-Forwarded-Encrypted: i=1; AJvYcCWWoSHhXi1h5iZWOhM4C7ykmCdVnN1AjK7sj4LQ8TXk964tP/7bKr1cJdfRDahL+nKMrVmyQcCMjjG7yg8=@vger.kernel.org X-Gm-Message-State: AOJu0YxtWivTL3cKAv+4uruOfPyf890fBjDm3/E2tr2/FpUm+nHETgsx keEPf4stLcnpVGetfcv4T2wqKz0GZn8qsmUweUziIIeOD7Q8Ydxs2203o/EaztlkJ6RuCwV42sr I+QxMU6wcYxoZjP4BkrbYuU5B2nnjxOkV//tz4ufKZXz8sOOjPC6vSYBNFoOiww== X-Received: by 2002:adf:8bda:0:b0:37c:cc4b:d1ea with SMTP id ffacd0b85a97d-37efcf93402mr6344478f8f.53.1729868445221; Fri, 25 Oct 2024 08:00:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6ZQPMgpVCbtBrqjfejgU4ALi6/qBZHusO5I0iFUt9VWaUU2evS88UKp9GOeAkaETKTdLQgA== X-Received: by 2002:adf:8bda:0:b0:37c:cc4b:d1ea with SMTP id ffacd0b85a97d-37efcf93402mr6344361f8f.53.1729868444438; Fri, 25 Oct 2024 08:00:44 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:44 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 05/10] intel_th: pci: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:48 +0200 Message-ID: <20241025145959.185373-6-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Alexander Shishkin --- drivers/hwtracing/intel_th/pci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/= pci.c index 0d7b9839e5b6..e9d8d28e055f 100644 --- a/drivers/hwtracing/intel_th/pci.c +++ b/drivers/hwtracing/intel_th/pci.c @@ -23,7 +23,6 @@ enum { TH_PCI_RTIT_BAR =3D 4, }; =20 -#define BAR_MASK (BIT(TH_PCI_CONFIG_BAR) | BIT(TH_PCI_STH_SW_BAR)) =20 #define PCI_REG_NPKDSC 0x80 #define NPKDSC_TSACT BIT(5) @@ -83,10 +82,16 @@ static int intel_th_pci_probe(struct pci_dev *pdev, if (err) return err; =20 - err =3D pcim_iomap_regions_request_all(pdev, BAR_MASK, DRIVER_NAME); + err =3D pcim_request_all_regions(pdev, DRIVER_NAME); if (err) return err; =20 + if (!pcim_iomap(pdev, TH_PCI_CONFIG_BAR, 0)) + return -ENOMEM; + + if (!pcim_iomap(pdev, TH_PCI_STH_SW_BAR, 0)) + return -ENOMEM; + if (pdev->resource[TH_PCI_RTIT_BAR].start) { resource[TH_MMIO_RTIT] =3D pdev->resource[TH_PCI_RTIT_BAR]; r++; --=20 2.47.0 From nobody Mon Nov 25 16:38:41 2024 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 3BCE420D512 for ; Fri, 25 Oct 2024 15:00:55 +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=1729868458; cv=none; b=V9wRQgK/3uTS2R3RCgzuCxPvXitgIJvgycy0aCUomJjQGAtV+UX958MEttnkLkCpVoD/M1t9h3dYA8lA8ExlqJ1q3bqL5BtTKhnXXa2WDK6yD43imBfNfuKCutS6OpEn8nmRhQcupls32Bper53hOTkWhODj/Cw2N56BkCbChlg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868458; c=relaxed/simple; bh=fUViQ0wuhaRh1Z4rYxnCtcfkzxZviFoQ/oXZmPMz6Rg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AgAPshQNmUct6gkVCkO5g1iTyMjBWnOv6FvLgSiMj2ga3HtTtBdz45W5/h0jppN7Q8f0BWKpfpJcA/GaCGuXvHFMdFtLCM5ZQAzmUWppnG2G97DiNaSnnnJb7J0rBr87+SCkGmoyZCI59TyGPM9DVJKqNWN7SylzI75b7DUtmlY= 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=JpW37LVf; 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="JpW37LVf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868454; 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=2pA/Y9KFQGL5eKPmyYHAWaMItiz6sKe/fm026vyTOII=; b=JpW37LVfOAmR563tcLs00abiiyWwXlNCDtU437nq1AF4Tz9wzDqXuR/GlxGJX7Qftm+DBQ uV08I0s/yhxEiSv7o24UWnhKDdUfD4A9RqZzWRCfgdL1vf06/lLzZP/eCiTC+aEMHeEHA7 iZsnJszHG1hD+fTV5fZ1PTolWFXPRlA= 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-581-jxxGSd0YPi2blIz3kTUSWQ-1; Fri, 25 Oct 2024 11:00:51 -0400 X-MC-Unique: jxxGSd0YPi2blIz3kTUSWQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d533a484aso1612420f8f.0 for ; Fri, 25 Oct 2024 08:00:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868450; x=1730473250; 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=2pA/Y9KFQGL5eKPmyYHAWaMItiz6sKe/fm026vyTOII=; b=VUN0/NLKfCxb9fYLKvdcK0IMape8cpb4a4la9eJh4KPQWdZozAcIdsUjlW2wVSP1Z0 1bGHkdy8ysSu8WIrt2u0qje8Od3rUyhCp0B036BqUJ2JIu3sOWl8mVWqMpnVTLxpvx2U ubYMX1mibKTubjHkicEClxPLkd6m9WKawjDHH6vbJT0+ZqWuiLWuVRzcEaC0iTb+JXts PTk5+TrpdFRnVvIxd0FFaVOIIBJY/kCkCSDztX+9mw7i0hwY2lox32woNNo5mb+zzB8g GisLpA6gY/osyhf4gZt1p+4AGNK9pn252PrzzYARSkpUM52iuN1cZAUaDibwi2iF6gWm UPJQ== X-Forwarded-Encrypted: i=1; AJvYcCUgydodRTq+5wkELUttmibq3zYi5T6RzQzgNeRzRrP10MZVmnucKQR2DEW7yTJOdJ6fqGezKHeJsDhtEJo=@vger.kernel.org X-Gm-Message-State: AOJu0YyxrFL+keOkk8Lfhs5an4uzs1dG9ASwYnn1wxpxLCBWmi6/WWYb K4QEmg2e+WzxArUaWZF0YLYtrawybx9Z/RLrklTcUTHWhpWeVavHGI7N+nv/LbtpgejlFRJGkHS BSB9t2ua+azHGOfs5rT//9JIWj7BvSEUaPBC5VwVpSj/viK1TD2PTa4iyUlM2DQ== X-Received: by 2002:adf:f5c3:0:b0:37d:2e74:2eea with SMTP id ffacd0b85a97d-3803ab671c1mr4935721f8f.5.1729868448916; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrImwuTr8UU6hSynSFO/Qk6OWlhES0U2PEH7e6DuZZMiwqG+LsgRJgOGFwOY24fOpFVbrN7g== X-Received: by 2002:adf:f5c3:0:b0:37d:2e74:2eea with SMTP id ffacd0b85a97d-3803ab671c1mr4935358f8f.5.1729868446141; Fri, 25 Oct 2024 08:00:46 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:45 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 06/10] wifi: iwlwifi: replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:49 +0200 Message-ID: <20241025145959.185373-7-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Kalle Valo --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/= wireless/intel/iwlwifi/pcie/trans.c index 3b9943eb6934..4b41613ad89d 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3533,7 +3533,6 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev= *pdev, struct iwl_trans_pcie *trans_pcie, **priv; struct iwl_trans *trans; int ret, addr_size; - void __iomem * const *table; u32 bar0; =20 /* reassign our BAR 0 if invalid due to possible runtime PM races */ @@ -3659,22 +3658,15 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_d= ev *pdev, } } =20 - ret =3D pcim_iomap_regions_request_all(pdev, BIT(0), DRV_NAME); + ret =3D pcim_request_all_regions(pdev, DRV_NAME); if (ret) { - dev_err(&pdev->dev, "pcim_iomap_regions_request_all failed\n"); + dev_err(&pdev->dev, "pcim_request_all_regions failed\n"); goto out_no_pci; } =20 - table =3D pcim_iomap_table(pdev); - if (!table) { - dev_err(&pdev->dev, "pcim_iomap_table failed\n"); - ret =3D -ENOMEM; - goto out_no_pci; - } - - trans_pcie->hw_base =3D table[0]; + trans_pcie->hw_base =3D pcim_iomap(pdev, 0, 0); if (!trans_pcie->hw_base) { - dev_err(&pdev->dev, "couldn't find IO mem in first BAR\n"); + dev_err(&pdev->dev, "pcim_iomap failed\n"); ret =3D -ENODEV; goto out_no_pci; } --=20 2.47.0 From nobody Mon Nov 25 16:38:41 2024 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 29B0720BB5F for ; Fri, 25 Oct 2024 15:00:52 +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=1729868456; cv=none; b=PFeWf9Sor62/YU+Oi31SBSVx2N0Wum5h239Gnb5T3L17vY/0Fdn0kuBqooxmOtav8ptw2jHSeeBmD6XXnsClfLHpdU6BhUHd8tYMDGy0fUGJDexZYtvJeQIjb49MjIoP45O078atYOgjyvTHgb3w0ubAw7aegNCrZkgdyMDk2nk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868456; c=relaxed/simple; bh=KRhL2deOZRHNfuo7/CizyodCPj2p+YqlhuhaNJFSYuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mfVh1TFhwA6sz3smV5P6EuDgToEG3ZVtwFVilNDZhJM3m8g+Hfqr/zXPoNV8+KGY5FeGp/iwHRCE9j6AQcKJPN9D9iko4pL5yKPIfclautaO3Pwo9EAX1Lw5liqp5UBPFtCT1Hy/DZhy3BWJROn0qaB9FsCxv9/lBmgBnlXc88Y= 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=Yku5LACj; 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="Yku5LACj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868452; 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=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=Yku5LACjmO6w+YXDrwUPGJF1wG5gOOZmkjBtFM6wmOTui65w1sfaQNAHIyhUiA6ytziilg w1lA+8r54hIffL18cXIkK/YKmPl7Nz1kk5nDHudlZkCFovAFXo0rs6PLaEto94vRm2Fo80 ynwCxkBz0zv3DlDxC4s2wr9K1NGWyUA= 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-393-aY7zmKM_NqSjWMFDimDozg-1; Fri, 25 Oct 2024 11:00:50 -0400 X-MC-Unique: aY7zmKM_NqSjWMFDimDozg-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d537292d7so1440639f8f.2 for ; Fri, 25 Oct 2024 08:00:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868449; x=1730473249; 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=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=BdJtuF2q3ARTqjMWC4wi+10nmXh+WoLHq8tqW9M+klxTSfO+q2x0CwNPzWSzPAw2/X A6oYNa2VuZfKGV4uFgnsj/b/DPzRszcUNgqQs6e9ZCdxcgEDQRr478PktYHKkMtsHciW 4r+Fox7B9joFQhgimxXEgofY9AuBkznTgR7g9GnLLm5mRfyqig0eog2bR7jJcV5vOMNs oHodmiymFfg3ZIn93+dc8pjen3I5G9g4R+SvIJsKIDtWjAOnVzgMVh7UcZXl30wix9OR 66IyGNqsvsjdjot7Qg2CVBlOJ/+Yaz+mkkIY4N2x8J4W+5kcU2DqNXWu7BgVTnj3sAwV e3Dw== X-Forwarded-Encrypted: i=1; AJvYcCW+NPMvspzU/yoFl8Tc3ygPFRzZGaYsLzeHOJNoQHX8NZ+TD8Pjzrpsdz7cHNVdyQBd4n5wjQQGs1tysUI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy1KW9laoxkGGb/PASXQmHiEc8Qt4cq/+Era4wNuvO4bLo0SAhl acmZVvdoaqwMfYa/28ir1DOXISqgJv54R1+Bd4u90GP2XMLepHkndMoLwxIL7woSMJBZRQ3+kR4 1HwZu6ypLv0OuJJuadL/enUIzzF8M2TWxlyMzTXQRPtzneaA5xbXB1Wr1Xdn5dQ== X-Received: by 2002:a5d:4e08:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-37efcee8c28mr8039793f8f.2.1729868448845; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1JzvMg8cr6yZm3DrYA37QNNdDoszBRAqVfY9P7gwJlqkM8x7H1LKy5SQs7DHzYJeG4eaDSg== X-Received: by 2002:a5d:4e08:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-37efcee8c28mr8039706f8f.2.1729868448084; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:47 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 07/10] ntb: idt: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:50 +0200 Message-ID: <20241025145959.185373-8-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Serge Semin --- drivers/ntb/hw/idt/ntb_hw_idt.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_id= t.c index 6fc9dfe82474..544d8a4d2af5 100644 --- a/drivers/ntb/hw/idt/ntb_hw_idt.c +++ b/drivers/ntb/hw/idt/ntb_hw_idt.c @@ -2671,15 +2671,20 @@ static int idt_init_pci(struct idt_ntb_dev *ndev) */ pci_set_master(pdev); =20 - /* Request all BARs resources and map BAR0 only */ - ret =3D pcim_iomap_regions_request_all(pdev, 1, NTB_NAME); + /* Request all BARs resources */ + ret =3D pcim_request_all_regions(pdev, NTB_NAME); if (ret !=3D 0) { dev_err(&pdev->dev, "Failed to request resources\n"); goto err_clear_master; } =20 - /* Retrieve virtual address of BAR0 - PCI configuration space */ - ndev->cfgspc =3D pcim_iomap_table(pdev)[0]; + /* ioremap BAR0 - PCI configuration space */ + ndev->cfgspc =3D pcim_iomap(pdev, 0, 0); + if (!ndev->cfgspc) { + dev_err(&pdev->dev, "Failed to ioremap BAR 0\n"); + ret =3D -ENOMEM; + goto err_clear_master; + } =20 /* Put the IDT driver data pointer to the PCI-device private pointer */ pci_set_drvdata(pdev, ndev); --=20 2.47.0 From nobody Mon Nov 25 16:38:41 2024 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 AB1C820F3D4 for ; Fri, 25 Oct 2024 15:00:56 +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=1729868461; cv=none; b=gj/ZXhcOYZ735DbwBXTiDgYgmoK20w5gB+gVxtJLEAAQaqrsmaVeDqPdotb66ziBoWwHN50wvXt7ptgaESBK5Eb4U/whNmtK1fbYSwe49wp61nmkQCeW0wxpAr4SUdS8Bpu1xWOCyhfy3YFb7PuUy/e4v2zSpbgEmiHSKn4XWuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868461; c=relaxed/simple; bh=RRyy0x2PiBX++bfjCGlA/9AZOm7xwGM5wtpW6IKXyVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DluClwXkA1okZxn8+dN+hZ08BoOFHG81+rAZyrHoMtyU3QK4tvsAFSNW0PGNQSdN+9Q8xWUbVQVE7RY4sesMtrjzc5N/aALyKaAKlpWh2a0GJjyw4DpZQ8ZvHabzS2olU+PC7dr8kHvAtFu64OqFNyFOyOPe9Mdm3y1wi4rw8C4= 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=SKQ4GU58; 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="SKQ4GU58" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868455; 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=WxQ5Vib/1yt2THpDXWI2rA9CY+VRhy0DxtAlfuLaLe4=; b=SKQ4GU58S1LeeUgmird6w6HpBX0uciMdcsgIB4MX6IsCnhzxB8dB71qXYuADkPedVoKgzr 2+whH9i5XzevMbjACq6oET7MiAz5m7TowcttvjWAej8PsDzoU8KgJBoPtzNj1mwrfa0fUu W2SB/X+31Go7hzaCQh4q3yVaZtkASk0= 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-672-V9M_t0kUMFW6udJwsK0QkQ-1; Fri, 25 Oct 2024 11:00:54 -0400 X-MC-Unique: V9M_t0kUMFW6udJwsK0QkQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d4cf04be1so1031046f8f.2 for ; Fri, 25 Oct 2024 08:00:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868453; x=1730473253; 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=WxQ5Vib/1yt2THpDXWI2rA9CY+VRhy0DxtAlfuLaLe4=; b=gS9fnEPtUzN6OD+F17syCX/AQomvlmh8Lcg0SoJVS/XA4PrgL886UQahxb+RxI5O2w rFLnRRzbMD0y9PQl/i0mR8RucfUAg+o0NrZBLAGuVrIUlR5RwzzHWy4SFj2Io1VbsCwn f8cwPMF8qOGaDJZKXDgCPF6s4KssMRXtb5WNKmjobQF6b+SVTt//IWu6V8BhzmEpEXrN vtUAu0UeGBQPl8dWCB+OBVXA+aIJTdCu3Aan1uxzT1I1+SfHPV9WBiFnn25wRr9Eadmz kJPv6c+Uv0vl14GlpJkcSBbOlbB+7o+1cgflixuKHt7rF2jQny9L2OEmZ4DQEPJMfhYZ oVDQ== X-Forwarded-Encrypted: i=1; AJvYcCUYiu7nZ1PkTtnr4SbhKj6OvOJ6s+CI0PU6WwBrKSWOi3FgQZ8FwZS4d8hZlQZtF9HOdW6IEFtUv+ny/ZA=@vger.kernel.org X-Gm-Message-State: AOJu0YxgnU1jrmlI0/pvSBTRNdsbm5FLCobYcdBJGgYZNViqbPZcvA9A +tp/Gekn4bDDJINiZvQRnp/1K5cToKzBX2r27Vp1srejhsG6sXvkB8j4L6WfPl9226jTmzqKp83 1voKXSEos5R2RpefECV81pv5/ggBooU1gW0k6kYZ9tlWrZrZayRQlqWJQd1Mr4w== X-Received: by 2002:adf:fa51:0:b0:37c:cc96:d1ce with SMTP id ffacd0b85a97d-37efcf1f8a1mr6808557f8f.24.1729868452218; Fri, 25 Oct 2024 08:00:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEa7Kz6+PrKx8KcDC+E98x5hc+UgRFrJFo2Tc4bVFvRSnBAJrHJ7dhWBhof8LHoIINcGd/8TA== X-Received: by 2002:adf:fa51:0:b0:37c:cc96:d1ce with SMTP id ffacd0b85a97d-37efcf1f8a1mr6808341f8f.24.1729868450198; Fri, 25 Oct 2024 08:00:50 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:49 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 08/10] serial: rp2: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:51 +0200 Message-ID: <20241025145959.185373-9-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Jiri Slaby --- drivers/tty/serial/rp2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/rp2.c b/drivers/tty/serial/rp2.c index 8bab2aedc499..6d99a02dd439 100644 --- a/drivers/tty/serial/rp2.c +++ b/drivers/tty/serial/rp2.c @@ -698,7 +698,6 @@ static int rp2_probe(struct pci_dev *pdev, const struct firmware *fw; struct rp2_card *card; struct rp2_uart_port *ports; - void __iomem * const *bars; int rc; =20 card =3D devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL); @@ -711,13 +710,16 @@ static int rp2_probe(struct pci_dev *pdev, if (rc) return rc; =20 - rc =3D pcim_iomap_regions_request_all(pdev, 0x03, DRV_NAME); + rc =3D pcim_request_all_regions(pdev, DRV_NAME); if (rc) return rc; =20 - bars =3D pcim_iomap_table(pdev); - card->bar0 =3D bars[0]; - card->bar1 =3D bars[1]; + card->bar0 =3D pcim_iomap(pdev, 0, 0); + if (!card->bar0) + return -ENOMEM; + card->bar1 =3D pcim_iomap(pdev, 1, 0); + if (!card->bar1) + return -ENOMEM; card->pdev =3D pdev; =20 rp2_decode_cap(id, &card->n_ports, &card->smpte); --=20 2.47.0 From nobody Mon Nov 25 16:38:41 2024 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 6114120F3CF for ; Fri, 25 Oct 2024 15:00:56 +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=1729868459; cv=none; b=iO1kahtZfSL71KDUO7wQPhihXeuqCdsQkaYQaU64R3QhB7UyEkDHoOgztGNtlB5rUMGvtCUTMcCurhuYEHRDvy2OPzfEaDyUsKI6ASAKwXUBY1UTl7WG2ShzGW+reF4umSd/vtQZ8RU/tcWS8kNVjcNf6jdrf5/TAc1ykf3ompw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868459; c=relaxed/simple; bh=x2AO4woPu9H2aNxl2TylFo7TB42POmIv8HM+dl0TTWE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ph2IzisOGLFayPQGDFSMp4UFzxnw/vI++HcUARvwMFJG1XU3LgK7lbPsigtjAObX3fwN7NZfzkZciscALiVsNEWmwPWWP6ysUtbSkijsv4zOeR2phHsqjsz8haKv+n8hi7Uq+QOLVoulbSNNtajQ6o8mwb/BgDeTYsFE5QTsEi4= 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=OlhdjYta; 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="OlhdjYta" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868455; 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=vZ55uYUf11n7K97VlTpkijb2Akz5QQrQmQxQWIeLt9U=; b=OlhdjYta2GD7oF5PEVnAb7w6bqWc2yb4RQQq4GwM8lh0axPXcwrlhNo9YFpwnWGM+SDor8 CZLCrKLRKwAx/tY1yCy8cf1HxssWIoE6XJtdXUuVA4kAxILX9kFt0aQl+5KHqEkxGQN6HA c79JqP5DMWUXlPCf1MDu4U89DUN8Ho0= 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-653-ue1PtvSVMXWjrHb8-l6AvA-1; Fri, 25 Oct 2024 11:00:54 -0400 X-MC-Unique: ue1PtvSVMXWjrHb8-l6AvA-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d603515cfso1009548f8f.1 for ; Fri, 25 Oct 2024 08:00:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868453; x=1730473253; 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=vZ55uYUf11n7K97VlTpkijb2Akz5QQrQmQxQWIeLt9U=; b=cTY8URAE0FX8g+ZMygTvjoExVWOv2ISIa5iOhRIYNVA2he1Fb8Zm10mHlQtkKjKCSt RtvGPynaLKlcu7ZScwtL61H0vAmo+rMqv/US15ARNvd3woRF3isQDmnhn+7XVgePe2Dm aC7BHTDHCPwKstXd7JhAey6Rw5WHP+/OFbQZH25wMuo1QqoJVpuEAbWEmIklkf6oc+l3 HicConEHUPFNDvZQSPQUFuzfpvvc9zw4wkuipO7g2oJOPCHSK3rgx0e9PYIuQH1IUXBV 4ToyRG3svwhVXHljVU8iXlSYCjiWu97nPlrsAW3rwmQJ2rtdqO4V5JbFAhFpuHp0RwsE yxJg== X-Forwarded-Encrypted: i=1; AJvYcCUtE+F3tmbYOgFCSYMmcIOlGeiStEGXhZRgvC/ThHGwo8b+tU6DHOdw182cy+tXD5G9SUhdPgqTPlQsb8U=@vger.kernel.org X-Gm-Message-State: AOJu0YxD8m5DGm4z/dzb5S9Tfmt0NDYZnjeeTneM7H4b+0O0lMA5SXZ/ YpQyCBGiS4lqPuxNNGzNCmgpxK0UEkKYsz5lTdPj9wB0u80GzMm3vCOspVMRA6DC2YiTEigVrKh cIonoA2F+0uW9cHCsVovi2Hfs8DAqpTCGPOjbtqN/ZrKLOQx2mwbNk/q3mUOPFw== X-Received: by 2002:a05:6000:178e:b0:37d:4937:c9eb with SMTP id ffacd0b85a97d-37efcf05ef0mr8444798f8f.21.1729868452894; Fri, 25 Oct 2024 08:00:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHuZZsnRNqLrqF9GwOZcr5qbeM2dWtXIkrXTvrx9EisXT4UszvhL4K4oEeTzFUCaGcEshlLw== X-Received: by 2002:a05:6000:178e:b0:37d:4937:c9eb with SMTP id ffacd0b85a97d-37efcf05ef0mr8444655f8f.21.1729868452087; Fri, 25 Oct 2024 08:00:52 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:51 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org, Takashi Iwai Subject: [PATCH 09/10] ALSA: korg1212: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:52 +0200 Message-ID: <20241025145959.185373-10-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Takashi Iwai --- sound/pci/korg1212/korg1212.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index e62fb1ad6d77..49b71082c485 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -2108,7 +2108,7 @@ static int snd_korg1212_create(struct snd_card *card,= struct pci_dev *pci) for (i=3D0; ivolumePhase[i] =3D 0; =20 - err =3D pcim_iomap_regions_request_all(pci, 1 << 0, "korg1212"); + err =3D pcim_request_all_regions(pci, "korg1212"); if (err < 0) return err; =20 @@ -2130,7 +2130,9 @@ static int snd_korg1212_create(struct snd_card *card,= struct pci_dev *pci) korg1212->iomem2, iomem2_size, stateName[korg1212->cardState]); =20 - korg1212->iobase =3D pcim_iomap_table(pci)[0]; + korg1212->iobase =3D pcim_iomap(pci, 0, 0); + if (!korg1212->iobase) + return -ENOMEM; =20 err =3D devm_request_irq(&pci->dev, pci->irq, snd_korg1212_interrupt, IRQF_SHARED, --=20 2.47.0 From nobody Mon Nov 25 16:38:41 2024 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 3A34920D4EB for ; Fri, 25 Oct 2024 15:00:59 +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=1729868463; cv=none; b=AhNkwKEkTZPnlwCglEhiPJzZsioOvPU4S+bb2b6il5hGp1+T6XAnFEameaO6sku3T5v3++QsTZfLW+FJ3YM9LWaifOgySh+pPx+oKdVTY+ZM4Cgbyjr+Xnl7zNFCa4UaL46j/wxPghQWFUo4ZRt+hgAT/FQNdRLdkM7bTdje8Ns= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868463; c=relaxed/simple; bh=RcTa7mPaWn9S/3FL+we6iyllf4n7RFykRGESqGJxd90=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Kc6gXEOrWEuNeuyNxjytdwrEA5Wkk57A7VXASLwEXHTSr1pwSF1lJEJFWADGeakAkpt9rl0iL6aRQJbudAGZFsByfCyEGdknHKn9XLzLvkeEKi2hhBseYqtaNH4NF2Y2Pr9ICQfpzCLdWu4yNMEicMDWFmsnQ5VxbbaTofaOM10= 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=RqUdISU3; 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="RqUdISU3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868457; 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=AonUKd9JFeAmu2FkelnO1Z47g8svJdBoVMsQtMVmtG0=; b=RqUdISU3do1pwaj63hjQtKPcrL6jcHZeCaC4wm3F3kGaXAwiN3Df5LO2+iytCU4VwhHNgn TInL0oeff8Memm3fSb5NHsJsSXk30ch/NjEEDAbxiWgCe3YM81LuMX1Yeh4niBGmvuVZKS l40MOzQn/dIliY8pUG0A2eKNv2PYZyk= 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-116-YYuo7jAGMTudqvqXEYZwFg-1; Fri, 25 Oct 2024 11:00:56 -0400 X-MC-Unique: YYuo7jAGMTudqvqXEYZwFg-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d4922d8c7so1209621f8f.1 for ; Fri, 25 Oct 2024 08:00:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868455; x=1730473255; 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=AonUKd9JFeAmu2FkelnO1Z47g8svJdBoVMsQtMVmtG0=; b=QCy0yIvduM42GTkcSCbvXqLhteJ3ijnJ8uCu0dRyH/gq5dm1wXDFGrXbwyt3BRGfC5 PjFRmCiwhbtsN554cpfS3oYlJRkp8VM33Y9awu5qaYOzsk+W/VjCr9/bH+asduQnbtOQ 4tBwJqIoJUQbt+vXqKc56owsD3NAfWkQIsXgiyAS/ChYCbAJGdzNOV6zUvrOyGj8XLRU Wj+3AHraDdI1zNiXW/aV09AxibRJVHuPxiiN3isWODd5oXccFVCGQ5ugxfFiI0vuSNtd iyvGghaerqiuvUNgAMFaZvsqR0l6vXjKi2yKD52IledrA2qkvlrGHPylMH/MsLKQdydC +W2Q== X-Forwarded-Encrypted: i=1; AJvYcCXbIfNJe2fjme422B7E2Fj310Wh+2RrIQM4D04XwPOWBkItPyZQXk6x8Q7FsMCGa9RL/tDwEx48qq9cp+c=@vger.kernel.org X-Gm-Message-State: AOJu0YxeDYFNbhNDxbj0XsszNr994Covv8t2jD7WKCPD6wCWoywqgx3V 9VefFzwcq94D55bhdBWDPeCvVld88ZfezZx4AIotDKANYTQfv1syGfvz/jPX+1zVKd2uGgG2n1G E+fQTL8cq6WaJQbiAAZrdieaIVicpPo2tASyu5ecAE9hS5fOWhCOoi2DnTuzzOQ== X-Received: by 2002:a5d:434e:0:b0:37d:4d3f:51e9 with SMTP id ffacd0b85a97d-37efcf7665amr6749347f8f.40.1729868454497; Fri, 25 Oct 2024 08:00:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYS4KQfglA92Gzw16122qjYNkYIWyEgmDdpCu016/6uuxTInLXjVC7AfMuCfkKwlTQ2XYDlQ== X-Received: by 2002:a5d:434e:0:b0:37d:4d3f:51e9 with SMTP id ffacd0b85a97d-37efcf7665amr6749277f8f.40.1729868453962; Fri, 25 Oct 2024 08:00:53 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:53 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 10/10] PCI: Remove pcim_iomap_regions_request_all() Date: Fri, 25 Oct 2024 16:59:53 +0200 Message-ID: <20241025145959.185373-11-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_regions_request_all() have been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). All users of this function have been ported to other interfaces by now. Remove pcim_iomap_regions_request_all(). Signed-off-by: Philipp Stanner Reviewed-by: Damien Le Moal --- .../driver-api/driver-model/devres.rst | 1 - drivers/pci/devres.c | 56 ------------------- include/linux/pci.h | 2 - 3 files changed, 59 deletions(-) diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentati= on/driver-api/driver-model/devres.rst index 5f2ee8d717b1..3a30cf4f6c0d 100644 --- a/Documentation/driver-api/driver-model/devres.rst +++ b/Documentation/driver-api/driver-model/devres.rst @@ -394,7 +394,6 @@ PCI pcim_enable_device() : after success, some PCI ops become managed pcim_iomap() : do iomap() on a single BAR pcim_iomap_regions() : do request_region() and iomap() on multiple BARs - pcim_iomap_regions_request_all() : do request_region() on all and iomap(= ) on multiple BARs pcim_iomap_table() : array of mapped addresses indexed by BAR pcim_iounmap() : do iounmap() on a single BAR pcim_iounmap_regions() : do iounmap() and release_region() on multiple B= ARs diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 2a64da5c91fb..319a477a2135 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -959,62 +959,6 @@ int pcim_request_all_regions(struct pci_dev *pdev, con= st char *name) } EXPORT_SYMBOL(pcim_request_all_regions); =20 -/** - * pcim_iomap_regions_request_all - Request all BARs and iomap specified o= nes - * (DEPRECATED) - * @pdev: PCI device to map IO resources for - * @mask: Mask of BARs to iomap - * @name: Name associated with the requests - * - * Returns: 0 on success, negative error code on failure. - * - * Request all PCI BARs and iomap regions specified by @mask. - * - * To release these resources manually, call pcim_release_region() for the - * regions and pcim_iounmap() for the mappings. - * - * This function is DEPRECATED. Don't use it in new code. Instead, use one - * of the pcim_* region request functions in combination with a pcim_* - * mapping function. - */ -int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, - const char *name) -{ - int bar; - int ret; - void __iomem **legacy_iomap_table; - - ret =3D pcim_request_all_regions(pdev, name); - if (ret !=3D 0) - return ret; - - for (bar =3D 0; bar < PCI_STD_NUM_BARS; bar++) { - if (!mask_contains_bar(mask, bar)) - continue; - if (!pcim_iomap(pdev, bar, 0)) - goto err; - } - - return 0; - -err: - /* - * If bar is larger than 0, then pcim_iomap() above has most likely - * failed because of -EINVAL. If it is equal 0, most likely the table - * couldn't be created, indicating -ENOMEM. - */ - ret =3D bar > 0 ? -EINVAL : -ENOMEM; - legacy_iomap_table =3D (void __iomem **)pcim_iomap_table(pdev); - - while (--bar >=3D 0) - pcim_iounmap(pdev, legacy_iomap_table[bar]); - - pcim_release_all_regions(pdev); - - return ret; -} -EXPORT_SYMBOL(pcim_iomap_regions_request_all); - /** * pcim_iounmap_regions - Unmap and release PCI BARs * @pdev: PCI device to map IO resources for diff --git a/include/linux/pci.h b/include/linux/pci.h index 3b151c8331e5..b59197635c5c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2301,8 +2301,6 @@ void pcim_iounmap(struct pci_dev *pdev, void __iomem = *addr); void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); int pcim_request_region(struct pci_dev *pdev, int bar, const char *name); int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name); -int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, - const char *name); void pcim_iounmap_regions(struct pci_dev *pdev, int mask); void __iomem *pcim_iomap_range(struct pci_dev *pdev, int bar, unsigned long offset, unsigned long len); --=20 2.47.0