From nobody Tue Nov 26 17:28:55 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 7522D208D85 for ; Wed, 16 Oct 2024 12:41: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=1729082510; cv=none; b=scW8iurUFNBvwIVmT3wxt8sPRbYphkaUF5MkJ4oYrYP4qAkEFrCxJk+ZPjXEMOlojGJjt6wRdAW2C+47HXKNSywLJ7EHkcG0o/CycCosjf28RLd/LYBgS7nqMXcuWyqEroP4XdIyAgyUT4Xa6uTdJCORSLdXsVQhrkHqJF959UA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082510; c=relaxed/simple; bh=pzHm+p7iOQ3ZHeJddCbAsTb72gDaFZfayku/dAdnQvc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dWUbvWQDZviTd3sd5j2NCV1y5ovEDD3MS/HYLkqU2iQNSf5WFA9uHJwuzAG8PkkdL0e8wqm8JUMhNq88xTtu1QzR8IGnUQVC53PIuF9VMvv5Itnfz1TGpRYTYmaB7oAUGBnmj53R55G9bcLk2Ec9yZnbxcdLB8V3H+SIHbhxv0U= 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=dP9k24RO; 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="dP9k24RO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082507; 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=dP9k24ROouWtoi0wgUP2ERMPrz1gPIoIj1Tljav8cuabAI6RIcvvhl66LBdkzWAXdwRPck iULxpx38BzaRat+Xc514hijBUnjznUGEZZlQgC+eDw6GZUvIpkQ4cgfBx9ia2xEY78lpYj uIvmgE/tOogNcGu28g8bkmaENtm6os4= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-wqz_QeQRO1S71_-3vDhang-1; Wed, 16 Oct 2024 08:41:46 -0400 X-MC-Unique: wqz_QeQRO1S71_-3vDhang-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-43058dce286so37974815e9.2 for ; Wed, 16 Oct 2024 05:41:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082505; x=1729687305; 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=wXZPvp8XCm0BIdtfJO4TGBjCAuoCfb6udFGAap+cb7dl1L+nFjLm+edPIwFADBJSYZ gq6r7FT5JH+wS0pN9G4u6SJYYDZqKvjAFQrz9+3CbS+I9UDO1W3LddHWt1ARX6FDUO9V ir0E07GAMe+5XG0TTJ8GpVyIW/1pouyZQtjbbZxkuLHiu5hEs4A/V6+FwnKzR/rjJdif favmUdY7mbP1J2jy30zEcgcqBlNjQRy6p7LnPBe8gRmYPNGWSGb1hVRHz/ccKipJ1D9o D21MQ504IxCQk//tJFVKFbrs30JF+ZKkf8J7f8LPFk4Xp863UGA8kCmrG+OW/hex7t+F 67vQ== X-Forwarded-Encrypted: i=1; AJvYcCVpQWn61ovccrW2HvMBoQfhPvz8J2vJRrxAZ7gwehw/0ysgMc6FkPYc2SvCpXpxuU/fOMEy0HEv8YS6od4=@vger.kernel.org X-Gm-Message-State: AOJu0YzmE94pSW8cEIH+cMcT2JGM0SCVxc7ztHpX4eJ/qO+8xpZNsbul Pjwvl238wp3nObmFrZ3LWU/x8GXxxpxROLXpnJQT2lsF9JmVvzK9ugqJ88rycvi8z8MDUmCThaL trRs4G0+NfLkBZH3GimtaaTRUMWzCPew1khjxnpljWB0miXHdJA11dL1GBjDUwg== X-Received: by 2002:a05:600c:5251:b0:430:5846:7582 with SMTP id 5b1f17b1804b1-431255d53a7mr128784715e9.7.1729082504816; Wed, 16 Oct 2024 05:41:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGxF9+2xYoc2iAcnZEJLUiZOKpsxfW9lx+KNsJOv5CduYI06lG5Znx9zhblHV4xRBC8nAdSQ== X-Received: by 2002:a05:600c:5251:b0:430:5846:7582 with SMTP id 5b1f17b1804b1-431255d53a7mr128784405e9.7.1729082504314; Wed, 16 Oct 2024 05:41:44 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:43 -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 v4 01/10] PCI: Make pcim_request_all_regions() a public function Date: Wed, 16 Oct 2024 14:41:23 +0200 Message-ID: <20241016124136.41540-2-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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 --- 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 Tue Nov 26 17:28:55 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 E2F55209689 for ; Wed, 16 Oct 2024 12:41:49 +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=1729082511; cv=none; b=QX0ZFOhL7+4nTzhJwx/K8TCfgULPvnLQvRCsciKH9dLK3GzUVIU6hoJiyJpfDgXAHOBtaAV4lM4VkEPUdVaW7PMxqHY3VOCz9HtahAHh+WvDdPFrrteVmML2dAEtvDGPw22pHgpZwOWLR2xeykF5uUCQG71A4Bbj4++sj+I7KDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082511; c=relaxed/simple; bh=s6xBjYgC8JsEjVYTXZALRaY3DljRr0l2UeRg0HzxlUs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=US3vVoBwGXAPh6nqmBMdB+59lkoUitVuOeAa+H7bmvcd0JHhXD7E96CgcoAXwZSVKl/Vzn2+m2Y2e0QN7EcoiE3xPhaAbQ9v14N+8sq7eVhmqn8CB4NvFiDqv609h21SXA1J6Wp0L4EcU8eB9x5j5yvcUF6HOgSQZYz+pEmIW1s= 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=IbYtlH2c; 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="IbYtlH2c" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082509; 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=IbYtlH2c5oGlfIfXwNsRugA6cfWwb093LrHCRgXcN7OA0ZPcwYTXZFtnpOfdlYpvG5FiYC v7wjAuqWSk6ukQ1hPxAAWmOpcF89Ez+QheySvO16wDDSFukuoPHDQQM/Oj+Yi4j1CWJoa+ MIDV1iCSVxNmiHfxrz/86MV5yIe9N2A= 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-578-JOZtmw6RN7yAA_yWK91UxA-1; Wed, 16 Oct 2024 08:41:48 -0400 X-MC-Unique: JOZtmw6RN7yAA_yWK91UxA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43057c9b32bso42451325e9.0 for ; Wed, 16 Oct 2024 05:41:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082507; x=1729687307; 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=XC2VJ/ncUSZTxLpaU42brclNuRRw2elhc0gM6AMB8UogsFMzcVbtmJM0+bgjab5meG 7rtKa9E7sItd/3YdfIH7s6IgJGyokuFMV0U5YZZxxpgT5Q/kYZwkBan3KSbRUFdlgl+O MGYi4XxAtUIbWO58RK4NhMZWeAsOHzjTyUGCCfSgDmIVDidlNDsRoH0A4hh3wN5GIg8g HzsPCcZbtvGjyji8oJ5jUcZ8ZluakhwS4zwck93+uPJoVZScBLBEJKYh9p/2AlF5A5bo rtWcTwvuecHfCLrF75tW4m97QJ7lG9ymITDzBf7ROtzyNbVH0ev2zjcmL1DvWivcfC/x Eg0w== X-Forwarded-Encrypted: i=1; AJvYcCXe1+Wr81ZHL044kKkJmobBJ3jmm6DsI0CDyEJqoQmikBo7BUdPsEhMO1n71vOWpDbJeHygFZa8cwb3KCw=@vger.kernel.org X-Gm-Message-State: AOJu0YyutAy656CpHgzLEajiBX7umx2cKCEZVeh1WDa+HOnWZHAmkrsE hpGr2ODZNppl3s8pvQptl9zK4tBKUZTZ3yBueCx02tOOiv3ROJZxRpmo9Kou44F6ZCDVEzlfv8h ixhvhOoc9fHJOLXT0ne3q6MbhaGJDa80OCpreNWbCinfdQ0NZe0/71kunxUl81w== X-Received: by 2002:adf:f212:0:b0:37d:5113:cdef with SMTP id ffacd0b85a97d-37d86d5031emr2847087f8f.43.1729082506791; Wed, 16 Oct 2024 05:41:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3g7WDoy0OAOXsVjp/NQI6haQAc/DMZfeX+i4c5TwWAdZww2/S10/ufFMtzSgJ0/qglNahRg== X-Received: by 2002:adf:f212:0:b0:37d:5113:cdef with SMTP id ffacd0b85a97d-37d86d5031emr2847042f8f.43.1729082506229; Wed, 16 Oct 2024 05:41:46 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41: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 v4 02/10] ata: ahci: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:24 +0200 Message-ID: <20241016124136.41540-3-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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 Tue Nov 26 17:28:55 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 E527920B1EA for ; Wed, 16 Oct 2024 12:41:51 +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=1729082513; cv=none; b=XtmL0kEnFaMQ1sAvqSFkEG2fyjPFUAep3oCJkYavmpPYIDmC4HV3Xgl0i2AIt2AHfgbBhMP4IPZzTsStr4Eo3cA2dTJOqvE3Rocs/wkt4/2uaYiwk3wLjmiMGzl0jLzxjfF4yWSIan5QSd/OoBKL59FPQNsW3Fn8v2sz5Up8ObM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082513; c=relaxed/simple; bh=YCSleCRL8+zgmB0F5bhpOuGHDhDr1YVS5o/lIBwlqhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dMQmyAilf9y/O4kb4NyovMd422pG+XtjRWt0x1X7jgeOK05kLsREBOVaQq8xTGrZq1bWLew1Uh1xEs4nEwLpofloHM1+vq1IJJTJWom12ORyddmr745QLP3eZbPCaZR3u/TFLSwZIHiUwohv0ON0lyF3yBf4EoiBY1OwfxoELy4= 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=boXv/bFa; 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="boXv/bFa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082510; 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=boXv/bFauIEA7kABCmjAO3tzhQ3OZitSXInLJi294drjt3kuZytMGlWCiqKicqxb8OKEmC JsrEV7B61C6q88CwzePOo91AFdomXnaE8Pf0pxi8oyHWUVG7QWAeImgRd8BLJMO39jDMsH BCGWdWXw1HzRxTFaKTikDeioTCXx0/A= 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-640-kWXVHjkYPeu-OecXGlYR0g-1; Wed, 16 Oct 2024 08:41:49 -0400 X-MC-Unique: kWXVHjkYPeu-OecXGlYR0g-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d52ccc50eso2698354f8f.3 for ; Wed, 16 Oct 2024 05:41:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082508; x=1729687308; 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=Byd/eWxtLBRMf3cQdAcYPUrZWb7ri19CqBg/hD5pZlQQkv76O97LA7P+8E1BEZjjma CMwCK9fVBhVbPLaHexcrF2v5sI4u2PpSq9l7zBxQFZCXxulPXa4EsT+L74t0b/d+xBoG /tgXiRgRO5Q6ITdZmaFLFKl0+gh+ExqtDIicT4n3OPhNLAUDwPFx2UJ9gyIxs7xQYX8q 8Ko4etI35T7se/kMrO6ZkdW3zH19CPc1Ktmt5QPEvqW9jv3L6CdiXh5fyzVuWqMg4U37 0lbkib5jA3NwTnqNv8vfI9j8b4PiUfT8Wim02hClpnncNW+SyotcqL6ot4fEP+b0Bp8g UOPQ== X-Forwarded-Encrypted: i=1; AJvYcCXZWjBTKpcS+0nnaNagTfqz2PIrlJ60sJCnfG26yO4uXCHbatq2VQsTLMuDPFWwlazBLDdFcTvo0a2D7gk=@vger.kernel.org X-Gm-Message-State: AOJu0Yz6IAObrOJSIXzLKCpMz75dLsbp4Lx5/XqHRhoAgTOcSosD2KwN rEMT3b4sN5j89yl4i9/I6I3C+y2A/C6kS1tiB21jlnSGcp24+1ItEh76VNFbz/+nAURy+YUzSPs m+6MYHG5N4j9SiDrdTtbhKb0Xz+LvFpLsP4o36uPtMTD8EuxFy36+5eXgZskSFg== X-Received: by 2002:a5d:6c62:0:b0:37d:370a:5248 with SMTP id ffacd0b85a97d-37d86d5577bmr2997219f8f.39.1729082508492; Wed, 16 Oct 2024 05:41:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZFf3YMQtDBztciPqJ2fi/zHZMLQU2JKkhwWU7eBvggnRvVoWkn4lFSqQuDt5+GBXjzzR48Q== X-Received: by 2002:a5d:6c62:0:b0:37d:370a:5248 with SMTP id ffacd0b85a97d-37d86d5577bmr2997196f8f.39.1729082508065; Wed, 16 Oct 2024 05:41:48 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41: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 v4 03/10] crypto: qat - replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:25 +0200 Message-ID: <20241016124136.41540-4-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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 Tue Nov 26 17:28:55 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 BF74820C023 for ; Wed, 16 Oct 2024 12:41:53 +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=1729082516; cv=none; b=NUOrMUE6F9D8wxf9frzSZbfPTWmvy97Z4lR1CXowLMpvcRDGnBG6vJ+WYN1PSeXCXW1n9Wr99U4XbcfR9GrDgu50ukps4cPKK40LyehZoB5asbjK7311jfyjjZJGn5nexXs+GWAwigJ2F+E2eFdoZtwQZkW64lYMHb8WkmQAPMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082516; c=relaxed/simple; bh=oVo6QvjNlOPmijXz1zHLQkfiuuBuqfV474IJ4VAK4xU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uyI9VLFpUH2sEsWjC+zaXvmiomaxS41ohmPmdv8vtWDpJfnsukgGXOOZZcyo1NFIgqq+Yw4FG61N2eDP5kXkEZJsVqBGeGKtXjyKRocWOh14Sg2n9yFo7kfQUk4eBfNAyInGKmrpGb/BKjpaBwInKm7VCu8HR2tVnutO1AU7z48= 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=DL0o26JC; 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="DL0o26JC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082512; 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=CkbzS05iowN1f0M3rgo936jPG3Sqbtimq2cAJDorb0Y=; b=DL0o26JCSFFYUmhMrlq+6WKgCoJDJJywC2b+kFF5uChOo9hoRTQRg9q+PG09JwnvAKJGGI AucZiDJZ/GUGO4LEnk8ICHCRbyaobq4Qj1POfuYselY08S/1dhG8cc++8nE/ZXxkBGofCs VMXPqfnQw4MSkHgasclr/SACK+CXnEE= 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-117-IjcG2BEGNt2bUSTGvILb3A-1; Wed, 16 Oct 2024 08:41:51 -0400 X-MC-Unique: IjcG2BEGNt2bUSTGvILb3A-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d47fdbbd6so3063251f8f.3 for ; Wed, 16 Oct 2024 05:41:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082510; x=1729687310; 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=CkbzS05iowN1f0M3rgo936jPG3Sqbtimq2cAJDorb0Y=; b=a0fDddqzvCxfb2WkbKf0M3cLSZllCNPLCubbltm7JD/5foV92JZYphjbM/QHqhyrlw xdyZneLDwm5cIN6c6RO6mPd6ATO5Bac6E6D84FYdfrKkzwbNViSkOGTcQunh+af20jgm hFOFJD0ME9hk+h7UZ14kZgZtlmQe9H4ndcB3zfgBDysZZ9UvBp/gQJap1C+85CIuKfZa 9bXDnVkxsE2Mczf9GHkSZBokmEVuOb6SlAYiIHoQTnr7YaO+B8M7l6/1DKy9fEFE1wt9 AI+6KnSFz4i7sOtzLKf84+zbl04nIJRYDM8uEk2ROX3HDBg7uVUg6mYYXU0OE+g6Fh5A 0raQ== X-Forwarded-Encrypted: i=1; AJvYcCXocriMd25uRhg833QpV/pycBSYdAmBAnlHXXowSsR8VlfrYsLvyvPeeJxbE+qP8VVbzXE91rJ1dxr3tYI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy1oYb3CGgwkTdM8+8VSvfVVyh82+7/HwzlWrk7iX7JeVzW4FpQ TwKfJsvKKNBtPoZVjqELgzPlUoPclIkZbZ7+tY9nBhS2Ai8o6UZTV5O+G18J5pSE5IbgU73DE8s 07D1/+2mZ3Hn1lC2MTTkeT3PohSUg55K7iKmHa82ggUTsyFimwU7MZZmL6npNLQ== X-Received: by 2002:a05:6000:1101:b0:37c:c4d3:b9ba with SMTP id ffacd0b85a97d-37d5519998amr12212237f8f.12.1729082510374; Wed, 16 Oct 2024 05:41:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFK1gqBE/jl0UfBUACkKIQmrpKFH7ZX+GOEOp/3UeRC+ZbEAEi2K3NnzF3HBuuhY4BbNlHnw== X-Received: by 2002:a05:6000:1101:b0:37c:c4d3:b9ba with SMTP id ffacd0b85a97d-37d5519998amr12212213f8f.12.1729082509847; Wed, 16 Oct 2024 05:41:49 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41: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 v4 04/10] crypto: marvell - replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:26 +0200 Message-ID: <20241016124136.41540-5-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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 --- 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 Tue Nov 26 17:28:55 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 514C920CCE5 for ; Wed, 16 Oct 2024 12:41: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=1729082517; cv=none; b=cyukP80PbtAUFfmz8w88QP72RYeCnMPtknpdqI6m2ZJGOGDLvshODHS5h9AWQuodQQPcSVAzuCQoxG59IKbQymBngqi11M4fKCmQNuPDLVqsNEFZ/WLMOqPUSlW9v0MoA1t1PuePa5ItyLbVfMc7uARUo+n7fqx9+XrA97AQmqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082517; c=relaxed/simple; bh=xqbcT0teETgc9gYJIx/Gpdlf6NMW2EiA0uF/aZLVnhM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cbNsx9FrGbiH56uE7LXeJkqEsJOA2Z3L3BkdgkL7yvLn3o6sFT4NDMxdTDbCOyb+uecmJujR2oIQ9qKgp0V6fEmg4BjmdlW6LjpBhiyRPeLvWg8QfpyPDbdL4FW2EAW/lPaQ8AJq1jdBo9eLglmDGR8KsNu1G9lrgpv2e+YSKIw= 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=bqNZCRa1; 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="bqNZCRa1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082514; 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=3HQZvfLDOQXSIlF97X3lGTL3T04sTNcN/H3+TBJ6Tw0=; b=bqNZCRa1unWuIdro9KXrZ1OjnHxkxsa/xlk3LSRNfNNkC8ze4MsviW7PF6tUwzkfIyDRVm F3A9zTprAGzetq6N6mbDQJXRdVKDutB5+0dFH88HFSQank4PZxmPs8C98QTbYIWXyQOqaL OSjk96p4MfwRYtAg/NDKtFocE+Asy8M= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-59-66xsUsOXMLqoZZmpuzLG7Q-1; Wed, 16 Oct 2024 08:41:53 -0400 X-MC-Unique: 66xsUsOXMLqoZZmpuzLG7Q-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d589138a9so2469698f8f.1 for ; Wed, 16 Oct 2024 05:41:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082512; x=1729687312; 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=3HQZvfLDOQXSIlF97X3lGTL3T04sTNcN/H3+TBJ6Tw0=; b=Dmm2Jsz16xKEcZtzKBg5dbiEUjgP06I3TOJFmtBle9L+ZesH9hFLS1vHT2JIChyTOg d8EpFXvmf9Nu0h0uBIe6bIFjXirv3+UPiD1SzRNsyf/AKaD2PYapAPuQ1vKQyEjG3BpG 6yeoE3GuFZg0XBOBeuK8XR6eh4VQU/NtJTmv0pdrr2PPldJjVbx4DfdebicJkJrVcFak JSK3nMFYeXyv+0MNrqBV5AQnlvqO9L049A+V2f+ib9+mF8T2UVYUT+bafXIblq+j4O3Z BmHZxup0dNyOFQ1zD/lnoQy3MHwDoEH6R+KvoyQ4UAZbayjSdE4g2rBTiKGwAzRZDaab d46Q== X-Forwarded-Encrypted: i=1; AJvYcCVtqel/2ox0pfsDe5gOTEtABqrHnbFAkol2HM8OoVL45L+CyoI7wtrteDTTQocunFtqyNqb+QWYqIcCubI=@vger.kernel.org X-Gm-Message-State: AOJu0YyfcwjueGey/nnePJZ1vO5Z1Dxj6zacOsMvLQ4q8zlItdVcigW/ pxPuCaot9W5aBO4OVi7QX2uDR5t8ntkmXjN7QWWLvfLKsnHn8zqWPqF+nFXB9s7Bh+jqTKSbB8D 3EPlvjBpef8HDeFt+oE0fIhgo19hOldEGBSmjjf4hNVCJO/gHSpii0SR+JCiauA== X-Received: by 2002:a5d:5259:0:b0:37c:cf0b:e9e6 with SMTP id ffacd0b85a97d-37d86d5521amr2837755f8f.42.1729082512119; Wed, 16 Oct 2024 05:41:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuuOf1sTYXDilZR7nD/RZHfWfnDIJXaRup8pfdRiWUJNRcHMmBtXXl2psjBzvHRiWx8thnIQ== X-Received: by 2002:a5d:5259:0:b0:37c:cf0b:e9e6 with SMTP id ffacd0b85a97d-37d86d5521amr2837729f8f.42.1729082511712; Wed, 16 Oct 2024 05:41:51 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41: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 Subject: [PATCH v4 05/10] intel_th: pci: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:27 +0200 Message-ID: <20241016124136.41540-6-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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 --- 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 Tue Nov 26 17:28:55 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 09E2E208D87 for ; Wed, 16 Oct 2024 12:41: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=1729082519; cv=none; b=bjxzORQ/pBkYb7qZS1Zd98B/cD8Kdwgz0zjtdY5P7f3WxCNzhGUJrPgKNrcHkgZLwMl6HIlXXjDX9Nu/haGDZrzr3dNWqmZMh13yO/79Cd3zzobWYqlJomFDhFjaNSXCBbPk+UtPUmlvXxIL3seCMP1s7erlVB2dTn0XAwy2v5Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082519; c=relaxed/simple; bh=fUViQ0wuhaRh1Z4rYxnCtcfkzxZviFoQ/oXZmPMz6Rg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cnQzW3e8i38PeURgzWBIRxcmRsP8KprX8BuDqkryl4tNHZV5G3m9UzAklr85I0p7sDUkhLMUYBy4kHikwUV+SI1k/n/TKKE+LC4DX9HLTKdT7le+dBaXUwfq4z7bjcQjP3W5NQUu7bVnvOEQxr+9jtTyP297A3k9216MnMu6ADw= 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=hKvd2VlH; 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="hKvd2VlH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082516; 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=hKvd2VlH4gzCLOb2reP0gr80NUbsMFsRUphaXjcg8ZvSBkRZhnF8v0sXisIvDN4RDD5hZy yDPYgq/KLQO4MjV3sFIOfX93AzeV4+RE++hmIBoEpWlK13VUD3EzNsfRShWTwZMDI8MvVU ECUHp9qvHSR9mr3lRGQVc/QUT0CDcvs= 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-655-E_pIBypzOrCmwBAlcRvavQ-1; Wed, 16 Oct 2024 08:41:55 -0400 X-MC-Unique: E_pIBypzOrCmwBAlcRvavQ-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4312935010fso35995345e9.3 for ; Wed, 16 Oct 2024 05:41:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082514; x=1729687314; 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=BeLD534rJ1WGIkpwBY3R+eOLCB63lnZyQHGZmkHoVT89x2puZlcTOJrsgU78c8LNA4 VeRgzt097qaOrMwbdlww0Dk4ZEr/rS1eIPodkGhrGNnBCznAyHVWB+pDh/tCIK8O+6uB jXvP0ZtzXIOq6RKTGbD3CroBcIKkwUPjDutnlFZB8ss4oa+WvTp17oSUjRvKJU+sRrFG MESmPLSIl7nt7VyJ4OBrRzoB2wBOjPI0JYyVKRRRPixIFWca0SxFDG8/+3z+atwQX6Gm 7Nzaqq4ubVAEup/weLvt/dFSG31meMd6RzsTyfXy1QriZggOnmSQnRGA2N0k9XaOnZnM n/wg== X-Forwarded-Encrypted: i=1; AJvYcCWOeoUqnj2regM8X6KV5fTJlydXPXWB2Y7dFs5Yk/FWhjiGyGSzBsGjW47ODYkqTi9q2zvhusqzM/PrW1o=@vger.kernel.org X-Gm-Message-State: AOJu0YzABHthbuy+Xj5OHXZMfsSxmrlEggNjYp6O5spOsCdEKjtumS+t qaQItVGdaXBi1IgwyUHiJgfNZKqA0b8KLYESMHMyrIyXRCCYacvkHuCNmaRkr39u4fyuE4c2r9F FW3m3k2YutZn+EBM+7miyA3b4zQw3yh89J3avukZYuhkp6EpwkGIPmEiRv9bRew== X-Received: by 2002:a05:600c:3396:b0:431:44c6:9b1e with SMTP id 5b1f17b1804b1-43144c69d10mr51163205e9.9.1729082514061; Wed, 16 Oct 2024 05:41:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHRP/BuTiWCzH6fd4BbV0uMaXkt+guEHku1txQLYMKYVO9MVZ59DOYiHB9WTaV8Ckg5o6YnZw== X-Received: by 2002:a05:600c:3396:b0:431:44c6:9b1e with SMTP id 5b1f17b1804b1-43144c69d10mr51162825e9.9.1729082513565; Wed, 16 Oct 2024 05:41:53 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41: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 v4 06/10] wifi: iwlwifi: replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:28 +0200 Message-ID: <20241016124136.41540-7-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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 Tue Nov 26 17:28:55 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 34A2E20F5CD for ; Wed, 16 Oct 2024 12:41: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=1729082521; cv=none; b=jaQdu98J+WMLb/k83Ah6wkz0TYXTRTrB8yE46TH6x+Y6vJ0VqI0SfAEkL6K7BJDlrBhhtquBzafudleOdJrq2JcOdpj5ZIOz4K7gFY7SQ4AAVkW1trT4t6Jjs3XRqBcxcImBeIvBHqPBfGfWrP/ywe83OEaJi+7c7ZWRRUhC4C4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082521; c=relaxed/simple; bh=KRhL2deOZRHNfuo7/CizyodCPj2p+YqlhuhaNJFSYuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z2dW+fpOyMYUonVT/cgboguGnVU0MVdZCjdSnTZMB1vvisfHEulxq57hd4qlS6nZQiC2sY+GcqrlKk4992aBd7guc1uTjYsNVJORW2tDsEDqtx9KVd898Cd9ywYmfkqUX0XWsXDjk0emEoIUeLy7PBIXYdoYN82cB2d+Rfc9ZG8= 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=i7Etg1eq; 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="i7Etg1eq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082518; 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=i7Etg1eqIc+8Np8yZoUafxLznTv3B7svDH5y41lDw/wi/FRLlO7aDb7UgLAnytFFDuO11n VS6cJgHCjpud0j0VgLcZ6ENUPni9d9o37F8vaIF7h69MOt77DmYY6vY8nEJr/k4o7wFuGg O79jMyWEZovYXJN1TLxxgDzwtXaKOOY= 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-620-ScPx1FKbN7COisDFT8l5DA-1; Wed, 16 Oct 2024 08:41:57 -0400 X-MC-Unique: ScPx1FKbN7COisDFT8l5DA-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d4a211177so3305753f8f.0 for ; Wed, 16 Oct 2024 05:41:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082516; x=1729687316; 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=ifURiZ6LvFKFFWqOSpWrlsny9NQ+NOoOcBKnb8QMXpsCbk6sP6OYx/XM2bj2tmC+tI nGvYUIsfP7wBVCCneYBgrCciUTn8V7M9StRytmsSAlAY5Y8bQ9ygMw5XU+87IrgmYKq3 vMbrbDGjyKbUpCMu6xs3hTqFDRiO/bjTqPQ2t1WtOx443OrodLrE+Hhfu20Fmjlt9TRP +ss3wXwd4LbKq99kP3vWX9pfZ8ric6m+HRgqDJMeuiCD/5y0eiNuD5OUa8HKI8lPPjqT xC1T7NFdp8SRE582EZfnoWmT8G6xdYz2lcgCpBOS0p9+jHzL3tA8WbMaKaA9kK4ASN7G zncQ== X-Forwarded-Encrypted: i=1; AJvYcCU3InhsXw+S0EzP29r+D1jG6rpLXAYs2Fe3KcZaoCra2wmHKNbgFcFaGZF52igjAtLHaDPppT1rzs/uCRY=@vger.kernel.org X-Gm-Message-State: AOJu0YyDnBF7cAxIOyipYjIHTupeUu9wQcZxNkOOm8XyB9t+BQfCKZLu gfOeDpwtq1XjSeeaX0pdk8eD/Eu1AD7U60h7QeEb+YUq9JdlAgD7KHqSCA9K8hfnVFXQfGQ0IFS RA8uiFrlR4XQXwtrRLu+fzwuMG2ac6Od5POLZLeKJuLrLYFRqUoBgzJBmsBpn3Q== X-Received: by 2002:a05:6000:e51:b0:37d:452b:478f with SMTP id ffacd0b85a97d-37d86bb6b99mr2654907f8f.4.1729082515877; Wed, 16 Oct 2024 05:41:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFK2H8/hCpU0cwTi4SjNpk9gLTo3Rp+q9K7qNZEaDsuWbxh1ss7QKO67/oTjHSIwVlBMGEQyg== X-Received: by 2002:a05:6000:e51:b0:37d:452b:478f with SMTP id ffacd0b85a97d-37d86bb6b99mr2654843f8f.4.1729082515414; Wed, 16 Oct 2024 05:41:55 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:55 -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 v4 07/10] ntb: idt: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:29 +0200 Message-ID: <20241016124136.41540-8-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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 Tue Nov 26 17:28:55 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 F1FEE20F5C1 for ; Wed, 16 Oct 2024 12:42:00 +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=1729082522; cv=none; b=OYYmHx0gMalh6ZoNXAzFo4/C6bvjoygx0NIo+Tm1Kap48zOd3yb22IIHLKdAH6mz6W3jPqaXny1aVynE7aQC6kf/x+aTZG0g4C57ZwodNaB0eHUmtWgHUg9whGf8CSxXsZlzq7bUZVKOzfNir7mttAo65RbTVPwCjKlZxaeoBmw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082522; c=relaxed/simple; bh=RRyy0x2PiBX++bfjCGlA/9AZOm7xwGM5wtpW6IKXyVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nVLJ6/EN2pQrw32qMLOvmqyOem9V1IfGlYLKbUMRiBfuLBXP1O/0xNtfPkpyEH75a+mcuGoNmpfxtyDNJoYpKj+9a+SLAHZlE6kw9+BE7Ik1KsWzAwo6hL9o+qe2gWv9AzDTd+i9DWiY6CCpW61gJNxLlzN81XTtdiiPKroMj9s= 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=cNevUTJU; 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="cNevUTJU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082520; 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=cNevUTJUKr8iMqsBFUukQlXA3o/oX6Sk0COTfe51LO54XqsoB0pLirUm9593bngFdS0ZmQ INbwfehcCLO/1uCYs9gVJIXqovNbY+HSRyZygZ+aUXHkFBxp/FvOpDPCGvDelWIc4dvzjH Ej5+/uIufGwRWHNrXuksKLJPqSjT5OY= 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-30-1FVVcYzbMnik4LEZGfXgjA-1; Wed, 16 Oct 2024 08:41:59 -0400 X-MC-Unique: 1FVVcYzbMnik4LEZGfXgjA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4314f023f55so7025645e9.2 for ; Wed, 16 Oct 2024 05:41:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082518; x=1729687318; 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=MERegx2kH1igNS7R4NXEiMytxslcYTMH2wJ0DYjnMWKkOfvI214pNuUZrvR6x11Ehl 9r9WAk4Srfb9X30kUfHnVwwpypggx8WMRZ2Tsn77qP+ksugWbZpRePXImGfNhV6bKBnJ Or/hQQGp/VbhjAGVdA1jaotA5NbQL5XuQ5bEfLKdvOMwvwgTSSgwd6I8Q9q2f9OFLx5P mAYPiUzNxl1x8PaySuy2WYaJ/BoN42P30VyMTZj1JKwG3zSNfFGXV2NW+AIFIAAPs3nZ jsi517iHg96W8uIQ/K6qIA76CfOEjtiFNDgLiV5MBxrUF/ywJstVDo8zTmsrKm4aZLD/ ZSLQ== X-Forwarded-Encrypted: i=1; AJvYcCUjnttVezmI0722PGzS5iryg4+9S6SvAz3n6W+rLmPcaicdJBieALvkMXNS/ioxO26IrKYr+wg0Y4D0gLM=@vger.kernel.org X-Gm-Message-State: AOJu0YwcrL6Am67IvhylMYlGmMIHcBWoIYd8QHgNNncNEGueVP97aEpK TNjg4JuXgVolbMIPVZvDjTDa5x74Xmnk4iN2mkbkjDaBrUSpnzYHYZeLDE2UQa2asFIOh8xxrC+ iaJ+s7+A1bpsiuT/dr5IEa44IzR1KYelCJMJml8a7BazbPOBzCxd0S8ijraaOUw== X-Received: by 2002:a05:600c:3b99:b0:426:647b:1bfc with SMTP id 5b1f17b1804b1-4314a3abe93mr36586855e9.30.1729082517802; Wed, 16 Oct 2024 05:41:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHw2sV/ClbQfdvwspcTkrZNz/VyaEPQ2ipBhPy5Ayv8A5HEwXPUtYjfukoE6IW5o2vvgmQFRg== X-Received: by 2002:a05:600c:3b99:b0:426:647b:1bfc with SMTP id 5b1f17b1804b1-4314a3abe93mr36586155e9.30.1729082517278; Wed, 16 Oct 2024 05:41:57 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:56 -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 v4 08/10] serial: rp2: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:30 +0200 Message-ID: <20241016124136.41540-9-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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 Tue Nov 26 17:28:55 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 B3953210C31 for ; Wed, 16 Oct 2024 12:42:02 +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=1729082524; cv=none; b=C+oKHfv+bROf78k/Y2SXdXRkG/sdroHtzKzB1sZyBcqHhRNROmlOgTl/ZRhWodGyZnxZgjPdEPHoUNWKkMwJfrT6J2nUJj/0Xs+y4ytPzeJNMtEDtZsU973W+G5CJyFVcVHNLW/0pUrzRV2BMZroSdDYhmXIyToGTdFMApMvceY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082524; c=relaxed/simple; bh=x2AO4woPu9H2aNxl2TylFo7TB42POmIv8HM+dl0TTWE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Mr1C19icmkuFyQt6yNqJn9p/9UNue2qgDOKYOmdUYVSDzDkzGnkZo2mG1YIA88HeDgDMqrER4tUnRWmRfR0vNAPCzr/M58fIq6RgRMKYgnlr09GDteANy3JDbfgDXpPFDcXFCg+bTR7H3XMrpmseTsxm35xCObPMaIDCL5zJRVo= 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=IZjFKke7; 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="IZjFKke7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082521; 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=IZjFKke7QQ5MWKoIuvljUYhosj5NUC9UqI8E++6lrY35p3PT7YIkzW2PGUWVXIzTN7Gt8S b+qMD41ZDPNaKtI+Dm+TBTTTd5kGf0OR/P8pg69f8lOfbg4DS2D6D6To4sTbCK/yYcExCf hTU1KGxSGNG790MSAo3peI8EUts6nkY= 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-449-ZNdhmq9ZNQS6SD26_YiT7g-1; Wed, 16 Oct 2024 08:42:00 -0400 X-MC-Unique: ZNdhmq9ZNQS6SD26_YiT7g-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42ac185e26cso41379965e9.3 for ; Wed, 16 Oct 2024 05:42:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082519; x=1729687319; 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=cKCncJvwINQA9RvpqzcBdfFV5Y4USOXYTDJnQu6mjnn4zAfMra/uouirAxh29hOeqx bBxY8XLxiC6IkzuhJtaMU59FinMBKNFw8+1I3MJ/gxjqFPdl+Ouk1M1cAreU5sUacLZy nQ1RtozPlL+HDrRPH799SiVx5zEUNbQtLmCWRZ/hUrFZpGVDdfHEStwaD5o57FiXUfND P8S33jQzydsgxRx2zb0BxyDLR0TWzUakaKD7vgAADZGUhDwt3mu+v/JZL2b34kfmbBgX KKZE/j4LWv8ZB5OjoEQ/loWZAs9k3g2tETBcTYlq4wkuD61ODvpIXf+U7eW5smFR9dmd baIw== X-Forwarded-Encrypted: i=1; AJvYcCWPQK6vGjjHQWN9ATO4is8RdQrTmS52ljGNoR7rrf2ZLAcIzEu3QbbTtMcF8wdT9/4lHGGpuv9a1HtSmG0=@vger.kernel.org X-Gm-Message-State: AOJu0YwLaBCHed/ntRMEsznaUZBixKaY4wcMH0FBcsqvctVCIdvBg4nX Iiv+ekwY7z75/MNnttcFvZZKIa6U9sAyNQhIePisNUM0Wr4ZWb6jvGGJeHhN6MX57+FLu6ewBiQ AycZfDQr9VUy5YpYAWl+esg8A5Ua6rIQqptgRB0Q0lD29rCjhysi+qEE53ry75Q== X-Received: by 2002:a5d:63c6:0:b0:37d:45c3:3459 with SMTP id ffacd0b85a97d-37d86bd5846mr2609115f8f.21.1729082519592; Wed, 16 Oct 2024 05:41:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcG1vuQQi/7uOxIPnqbA8E3aguDL21o7Zrwz4HGATFpZj6nHRtNeHXDvrH6Vz1nzXFwT9WGg== X-Received: by 2002:a5d:63c6:0:b0:37d:45c3:3459 with SMTP id ffacd0b85a97d-37d86bd5846mr2609081f8f.21.1729082519100; Wed, 16 Oct 2024 05:41:59 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:58 -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 v4 09/10] ALSA: korg1212: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:31 +0200 Message-ID: <20241016124136.41540-10-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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 Tue Nov 26 17:28:55 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 84928212F03 for ; Wed, 16 Oct 2024 12:42:04 +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=1729082526; cv=none; b=rLOodbiNH3LpSKk4m6mu1FXM7Kkpj+agW2rhyycF/fdZjWF24PdDFfa0VsHJLRdRtxLhlYowTeQHlYy8r06jlDmIYhTWdQtRSHJ4lJgCiNv8MAzkP/NsnHMW84S4AyxqoPm5lSRpnAmzxLxNAol6az/NixhdLmrekM3Gr954I2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082526; c=relaxed/simple; bh=xeBMFrWniQWPsGN4NVOp7U+TERIRvwx/CXaeZ/U1fmE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lvIya/ufRqKU2hrpsyfBWS28IH/DEPbCkHg/CRm/zDj73p/7ch4s835yH5T4wV59lBkkV0DC2hWMhg8qAAQ8KwiRuQMWkgk1j1YMqi+3nn/XW5JUxKQq9jBKSn7y9w78EevwtbgSkKfS9SSX/dcm0RzCnhzjmuJhW34lJibXZM4= 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=BUk1D4Rn; 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="BUk1D4Rn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082523; 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=ZRGVJdsI4KeDAeg9imgjHK9adQHetOZy1n8XhZE2xHU=; b=BUk1D4RnRjS9fv23GuX2Ay080o8xN2qH6cg3iawOqBvH9JatUXULtHhFQdqV6g9NgSHnsS TwN4dsqIUdSDgYTaP0f7c4sg08CA0YAgKCVtzA56YwK8Ymw9g371J6M7Dgy8nhnpJjiGuk B7DqVxqpin1axOTy0Y+FaEhLoj2vmnA= 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-335-UkvNGBnbM_udhG42Iax-8Q-1; Wed, 16 Oct 2024 08:42:02 -0400 X-MC-Unique: UkvNGBnbM_udhG42Iax-8Q-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43111c47d0bso35478815e9.2 for ; Wed, 16 Oct 2024 05:42:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082521; x=1729687321; 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=ZRGVJdsI4KeDAeg9imgjHK9adQHetOZy1n8XhZE2xHU=; b=Z5r1PPIYhTFgzG3VNUxAkcn8bCWvYN2Bd+nBi37QUnylFDHXJnwa6juIfWR5MMn3pH OE+3/NJt8Eq7aVb0f9N9ROS+wBjkeicMGPJ8WGVvDeOVc7utwgmNipr2Nla02py8MEaV ZoUFikDXwhDW6yBbY8Z/7V2DEC4ZhTSRoBlID2VayPGd4q/9I3fi22ErIo7JSLfIoCGw iGO7mbG2s3GW6ra7YER9n/8K1n2Zu7KKKBcdn6aTZMNNKXPKiXYpY2eLy5xhI9/D0Lzf cmsGZqq3ZV4/pjHjGckFMLnfrOlnxB8e8rvCK1MSpHNj1vgxzG9dHM6wJetJjLAzoU7Z A5cw== X-Forwarded-Encrypted: i=1; AJvYcCUQRzBeJ9xfGExHrkFpxxNgtYf7iaOMtsTUY/RS9Jcc6l8nKTxWOG6Un1BdnfhoKH7zs68vQy0LJ6OOedQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxzGhACkDybXa+3lFBJUYWDxfYrwGeGt/KBFtW/ZI8FSA5AepHa Tk1l9gx9gRNgpHm9ETZ64vVBK7hpuQlinJFy1qtX1XWmRwc7OeJjP5v2CKY6XanBi5s4CsEWKSd XjvjkcRLFPe5Yw3RQmRS8ZsEDBglTcJ9no0foRh7AEct5eTcv5bb+STOPeaxZlA== X-Received: by 2002:a05:600c:4455:b0:431:5522:e009 with SMTP id 5b1f17b1804b1-4315522e18bmr6220055e9.12.1729082521396; Wed, 16 Oct 2024 05:42:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGE3P1Sf2DjAjua7QaSHPu6bkCGVM+tumEiRjRf2AVFHTw3nylGoruyKCB/DirRoG2V4OxriA== X-Received: by 2002:a05:600c:4455:b0:431:5522:e009 with SMTP id 5b1f17b1804b1-4315522e18bmr6219795e9.12.1729082521006; Wed, 16 Oct 2024 05:42:01 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:42:00 -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 v4 10/10] PCI: Remove pcim_iomap_regions_request_all() Date: Wed, 16 Oct 2024 14:41:32 +0200 Message-ID: <20241016124136.41540-11-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-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() had 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