From nobody Wed Oct 30 22:15:22 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 9F0EB1B9B56 for ; Thu, 1 Aug 2024 17:46:31 +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=1722534394; cv=none; b=jAMAvAhYrJDfcLwRDqIofHggweV3xYlhd661MsEsER32yyN+JVjgQnJ0fpmAI6UakcpEY0ckkEgD3iNfR5YHRgu3JrR1kfKaXbXma8o9sPvLYV6xA5uQtXPPDj1E9eEbxC3qnIEbuhQh6lf0jmFkQDz6wyS1qbKBXZnSWaqf2NQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534394; c=relaxed/simple; bh=4GsXkzyF1zXnnVccFMmH9MHA6OoXOba9lWFScuAVpNA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TkjAAyHBU4g3zEb30b4YEPzJnzu3LFqf/AmaglaWgdf2AzDll5A5ui/iWwvtjJ6s1Zg3SdnETmvqTDqYRsUD6od5e4V71aItDrxY+BYwpC4xTUziae36wUnstvcff+GD/S0dBYgH/6hH4wSh1b0+15oe9qQCdWrU2l86IBveKUY= 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=XC36PAk6; 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="XC36PAk6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534390; 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=t0H3lAj8yc7c4WzJFe947fa0IqEnSWxptGsCiAxUCV8=; b=XC36PAk6ssGn/KmlCgMVjkRVeDt4cIPH+ykGid7mR4qIq582Rn5NPbbqkP8NlkhdqVKIHA hXY2W0Jwxr5LJUQ50tydZHljph+s5tMIiYwf+lP5KE/6Qm+J1nghew26vgKhKaUETgq31C aEwf4r+xZRlFVqkKLmibUc9gWzN+JxE= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-139-2IUlbjHGPtGZFED8f_9iNw-1; Thu, 01 Aug 2024 13:46:29 -0400 X-MC-Unique: 2IUlbjHGPtGZFED8f_9iNw-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5af1a5a36feso826477a12.0 for ; Thu, 01 Aug 2024 10:46:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534388; x=1723139188; 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=t0H3lAj8yc7c4WzJFe947fa0IqEnSWxptGsCiAxUCV8=; b=Ffkq0hliL8EmaoGbVQMYEZ73RbKZHoQNCwJpBqRaJqqLFK0U7B2D0Ac0N0hGWkko4W BuaDbZ8tjv8Ug0If1CBemGh7uCVx3j0X+KhkrC41LTfzNgqnWlqEDRYjazEZl3oK5OBn hYCPbttHPhf+QhCNMlPCarm3MZkVXxk6aQnSzt2F2YkQMyCOxAy2uL6psqG4/q98jNxD nmHPaTK3XSeMNM0cRZG0Y/hXEHuh//5uRD2U3fmrQ+b3Z7hUoaWFrJ95p/NRmHOa/UNL aGqFIdPWekDmUsRwXBkUNRdcx1/9bOTGtUnJ4Gzi5MTr3DA7PTs1qOCsZnQoFTlF0++X DJyA== X-Forwarded-Encrypted: i=1; AJvYcCXuPa3032zY5UfhIEflGduX+56IxGkEezpjhZ/MU/VyLAT/3nkkZIhWYJzRwvY05hlhLgcmsZY3ZGYvYBk=@vger.kernel.org X-Gm-Message-State: AOJu0YykoBxb8V/14y5wKqGGipWfJ1IZ5hrrnKMXTI8+shG5sd6/3q4W cgV2e3UzZ97N3yBzS0BYclYpazG7eqEpAMiyfZ4Okyvub3j3lt2t7NoQnmat1/xF3qIO9xazgY7 K5+zvR1zGpoCMaLshGS14WQkjl1AV8jWqgHWgs61+AsWZRdzBSs1MOm1A/rcwOg== X-Received: by 2002:a17:906:6a0f:b0:a7a:aa35:409c with SMTP id a640c23a62f3a-a7dc512cdc8mr42331566b.9.1722534388088; Thu, 01 Aug 2024 10:46:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHa7+oRR5+V5FiruUSNAOtMqMogU0xoX7L8F4UgpPxKzFEKWFNaoyQ3GOxAIhzZxR/CPVQ6xQ== X-Received: by 2002:a17:906:6a0f:b0:a7a:aa35:409c with SMTP id a640c23a62f3a-a7dc512cdc8mr42329966b.9.1722534387535; Thu, 01 Aug 2024 10:46:27 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46:27 -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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Thu, 1 Aug 2024 19:45:59 +0200 Message-ID: <20240801174608.50592-2-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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 3780a9f9ec00..0ec2b23e6cac 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -932,7 +932,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; @@ -950,6 +950,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 4cf89a4b4cbc..5b5856ba63e1 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2289,6 +2289,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 pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); --=20 2.45.2 From nobody Wed Oct 30 22:15:22 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 3C5DF1BA889 for ; Thu, 1 Aug 2024 17:46:33 +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=1722534395; cv=none; b=TGM+dYymhopWNmSXIpXI9XAnjapa5TbOSpiSWJRtim7hhHJp2dENOOPdcD1k27ojcqn7jbOv9I2hrcpDtFRKt8FPyXm/RvK9QuAw3rwpvay0kgTpMtwDc4lujnqEoNTegZExy+N5zcSzKGAG7bJWI3uEhzAE11Is+golXdXoqoM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534395; c=relaxed/simple; bh=cvZkQ2qgcPVEhY7uG5u9oCildj/5ABgxLmro9w+ciu0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bwAHSH0Qvzat/P2sWUyt3HWl8h/KKkW03FeawN6Ox+9YWbDfleJMSZ7CTmxWfvlzsm61qXsZDVQLkFd+nCGQ1l8vCBVIijW5FxG073UUP5G3jsO7Vn43a59VC4Ap/ynBR+Xm1FzhKSbRH8tAGJ3Wv4xcp5yvomEQJMIVxETeqS8= 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=dN5RmDYL; 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="dN5RmDYL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534392; 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=6WrcubhpDE+K1LZOYWy4Pg3YuYsECxnI/4rdk9yULNw=; b=dN5RmDYLjOu83Ly8y1oCrjM1bEkpQYrC9v7C8fSUXmDRET/3OfzZ8Xv3Ih2emCut1fDzU7 b9FLgihNrtNfpMG4z/fS+V0iT00IhNEGMItTaeWkKNYEYC5wY/K7sicyS6qhZhQkaLvepW vR6P5KsM547MWTMmGBV9YWBiE95brHQ= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-183-aOHE2wY0Mly5KMw6sNreJA-1; Thu, 01 Aug 2024 13:46:31 -0400 X-MC-Unique: aOHE2wY0Mly5KMw6sNreJA-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a0d7d02a8aso1129956a12.2 for ; Thu, 01 Aug 2024 10:46:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534390; x=1723139190; 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=6WrcubhpDE+K1LZOYWy4Pg3YuYsECxnI/4rdk9yULNw=; b=sHYG5+NzjCOVP7ng8NeinhNDNSn+E2Rz6MS4GMKoqJ2VAfulDJ5KRlF7/CQB229VUL LtemSuE7uPEQRMUxvKNU1gfsfPKIvAKfZacQOaxoT4NTYvLFqxLvTNuLxaB1XYDMmxlj KTy1NoAPlpQNuoH4CB+SboW+TRgHMeJyRqq/ZEn51eGHqEmTO9j82nbT5HQVn4LX47qL /TRkUWUZj/T4jsdQcNbDFfjZi3r0hlDPvh0I2THjALyuCS5GbtPu5cp1IPK8VpBa+S83 f8NFFGtPC69TnR8rF+MfS2sIaPYULj8m2yRx5Dw3uZ8nTwuwE9V0oPaV7mA/tj6zLerZ UOVQ== X-Forwarded-Encrypted: i=1; AJvYcCUVMUBsYxSTtSLJf1AxVjUc0ooDi+mhrHSiCbV+pYLI6qEvwj3/C/68qHMJ3LSqBsfbrP83+PMg/ZGIS8/w0b2928HF9kPQmpa6658m X-Gm-Message-State: AOJu0YwTW7noKEhIVtBUwpBba+60Pwr+ynrKWGd7oxt9jdMj/nImDA8Q D74uxPi2SnY/KCNAInSRNvuD2nlVcPOeHyPWb5x+vjAsYVk5zcdIxBGAvkuEgAupNx7zsagO88q +MEwNbQEBMy1sR+2VsaLeL9/stWnjP+WQdNLO8+wcctIhRle3Qky3xLzY8Iy3Cw== X-Received: by 2002:a17:906:d551:b0:a7a:acae:341b with SMTP id a640c23a62f3a-a7dc511b140mr44549166b.9.1722534389758; Thu, 01 Aug 2024 10:46:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGCCzZ5dXYZH3j2oFHnfDRvpX7K8jxtwUgAxGoBnV6WkOFIYg3M5/pUlm1BFFzaZy+v9hgOQQ== X-Received: by 2002:a17:906:d551:b0:a7a:acae:341b with SMTP id a640c23a62f3a-a7dc511b140mr44545066b.9.1722534389355; Thu, 01 Aug 2024 10:46:29 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46:29 -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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Thu, 1 Aug 2024 19:46:00 +0200 Message-ID: <20240801174608.50592-3-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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 a05c17249448..905af6b68d80 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.45.2 From nobody Wed Oct 30 22:15:22 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 2DB111BB6A4 for ; Thu, 1 Aug 2024 17:46:34 +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=1722534397; cv=none; b=aeWiFXmtjuCxUyzWxIXg1BE+PjGES5WaxC3eJ6iKMNiiCzgu7vUO95TLOabetHN7qwi1SDZvHPS5tgEQk121FhmGOSXq/pWekMBVtTZW0Ir6I4g4bOMEyLOf2FYTR1WO2N9tEH2ERsIhM0UR/lCQj+XoEWpshncgVR/KuWHApwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534397; c=relaxed/simple; bh=o+aKZkNhYSkxjsiBLxN92YZQoCjUKOLuz8fa+WUkC9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UoPjZ/zPTmLpRUJhARKKKH5sVqfmjQX+AAWcqVBop1enjlsqBs3tb8H3pHLG/Z2SdDJhWdpyTAZ9j6Kq0XT3t8jZCeAUJyUhtXdxw3oX9A76ogf9it/gL8qzp0oDAQDFlOR1nPXxY9WiuxzeWNnhvpoJOEQ2R8CQ+NzakD7J2r4= 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=DuthcMv2; 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="DuthcMv2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534394; 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=QRt7X9facTlkLTpy0pTbVW8nFCV0woh1LarfaLaM2gE=; b=DuthcMv2diw/4RrRp18hw2UtshzMmUUZKJRS4Izd/U2i7VgRFHpvE1U2ygeYNDuyif2NA2 GmrZ/moKk/FDIbGgb2NxMxxUBkNXI7TVZ6XywdWEDx45mIEC0I6SFIY4tIy3uS/ZJtDBWx PhsNN2DuDMWjw58ImAkutcRyGMmHG6E= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-qXnRntCIMHWOsXgD_kuxvQ-1; Thu, 01 Aug 2024 13:46:32 -0400 X-MC-Unique: qXnRntCIMHWOsXgD_kuxvQ-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a138001115so1213405a12.1 for ; Thu, 01 Aug 2024 10:46:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534392; x=1723139192; 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=QRt7X9facTlkLTpy0pTbVW8nFCV0woh1LarfaLaM2gE=; b=YYJrQ5qhQkdIbFe55B07JRTzDODOXXqGMa6Q9AY1cCtBEghtE8o+MT68yzSMrZ1lY0 TcEcmDDDn6n0+GBh049VRDuo/vcncL+NDpmPXU4Ml0Ibi3JEO7XxP8PBoowjYla3t3K7 lWjnAv5qJLudo/2FMd0NcK4WX6agyKE91E6axKAAw0MMdvwp5y+2PeoWfE3lZ/17veyD xh/tR+ThDOaQ+Zhov0B1B47bMGccsXwFfF7YOKN/vDl9dYzDG04Kyx947dXAxrE1XLwG 345r/RTnsbW3mxbk3CqMxzB4y99UuhaqTJotga3lANkW6F5ATXY75W6HW/EE9qlHpNV1 MjmQ== X-Forwarded-Encrypted: i=1; AJvYcCVbZmSMagaChwk8KwYaxIs8kWjhzA3cGkskuCk243wZy65E5fKgy+RPpRHWWhrbaLmVtDVL5vsjvOS00qL9BRAWhO7pdF7/PxFrcwbX X-Gm-Message-State: AOJu0YyKtMI/BfXAf0oAe0lRI4qWuywUrmzEZRiAHPENaLynuvDjnSqi 9tvN9+p+ogT6HmcuEAAITxqblME0tQxI1MuWr2Zw/5uSUN7D5zLzo/lxMNQRv95k85Duct/LKcC DQZ98w6ODIzmUgPrFJZmMmoNjZS3iFYLzU13T6ZzMrV98dDpVrzqZoMjT7xDK7w== X-Received: by 2002:a17:906:6a0f:b0:a7a:a763:842a with SMTP id a640c23a62f3a-a7dc50f5614mr45527866b.8.1722534391582; Thu, 01 Aug 2024 10:46:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmzEu7dmyX2RheGzSMkNqLion2YjN8vIisbzR9uosnyxCtAfZgr0MeS740wdZ5Lp8eu4Gr9Q== X-Received: by 2002:a17:906:6a0f:b0:a7a:a763:842a with SMTP id a640c23a62f3a-a7dc50f5614mr45526166b.8.1722534391188; Thu, 01 Aug 2024 10:46:31 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46:30 -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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Thu, 1 Aug 2024 19:46:01 +0200 Message-ID: <20240801174608.50592-4-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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/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 2a3598409eeb..c9edae8fdb04 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 d26564cebdec..18d8819f1795 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.45.2 From nobody Wed Oct 30 22:15:22 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 626C71B3742 for ; Thu, 1 Aug 2024 17:46:38 +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=1722534400; cv=none; b=svXtYX13cQPEqqDUkKQYFIMJbkqlTYSZ/DwsPVsDHrA7MafI0RdeGzAFvGrmCs/zoGVh4fZxqn7lsHVKHXc3gIAGpbdgNijDLEEh1H9Kl8Taqmcho+fNIlswRuxOGqYjjcZB8KflbMOYFKbEN0cC/GPiRjsWg+k92KXcmRGjIGY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534400; c=relaxed/simple; bh=51vSfDSVgQti7LBW5rABQwS2HP2YLgDybOBfw/NQIco=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XLBhJXrnqtWPZgDjlAhHpuIR/GtYqp70QtMTsVo74EM9TuodiiXBt5iLUEh3i7FdDzAvP62TC9vwGNb5Cg8IY7ZTM+H8BsS9G9es+JTFBCt+AHSDoYJ61q9ShVMZeEThdXT3kNzt+pRFy0u2bUVnYYqEmZeh/JEhdMT40oddHjg= 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=RF6yYGAS; 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="RF6yYGAS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534397; 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=EKYe3JG3XdG/Dr3y0kVEnJ2M1SarV+ljxBmGoY7N+1Y=; b=RF6yYGAS9+loz9tv9Me+KH9+OvVcxHU2JteNIIhJeRo1TDULkOnFXJTECzaQmSt4NChQSn +yC3nUEo0rlk/xhv0wbWUS1Jz3ZYxvdu9gJIPg1rBdY0cbMn1r0XI/uw+lZuSCwFSF6ouD Jv8eeQhkVA1eFVI33R1eelg/7O1v3ps= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-621-SXCxtcTUPZ6-VqPexAP7zw-1; Thu, 01 Aug 2024 13:46:35 -0400 X-MC-Unique: SXCxtcTUPZ6-VqPexAP7zw-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-52f03635146so927739e87.1 for ; Thu, 01 Aug 2024 10:46:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534394; x=1723139194; 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=EKYe3JG3XdG/Dr3y0kVEnJ2M1SarV+ljxBmGoY7N+1Y=; b=CUnfKFWCYjUjJwIoECpuZHJeW1dcM321vhJMZsHDDPVvjx4qr9xpEEtwC8zctM1Mkw JDdMvT0MpDR/oPlsfNItdwa+Gty2eyLKjFPrzNl8lBsLN1C/7V3x/l8UKmbSf7mqTqOK BfMcfC3m6pzUn6JcDMJWi0jx7YAisri6QDGBxB1GSigAlhyBLmvLX+CInbDV+x4tCFT4 6hpFgFA09abQeS4lGq+pb6guwOu1oxsXbBRnSsUOZ/tpY7ynLJgjnr8oLsdpvw3OBTN+ sSkuKA3akTG/iMVwPtCB26uSY5Hl6xb/GBFRV1HRWf9yzQdhAx61iUws14GJrh0BkTD8 1mQw== X-Forwarded-Encrypted: i=1; AJvYcCV4DMOxzmnUYK8bVJO2hl1PGwg5ezs8ycPSCAXlKPw8W4Kj9GUjbe1eUU/077GXu40y+LoIz+Ij/t4ei78=@vger.kernel.org X-Gm-Message-State: AOJu0YwQuesA5v25Y2yNoIFg3ujTUvbzpmwyhOLCIY373Lc7Y/UvDWRg 1Vj9nbRKmM2FhvejA80Y/z1bcKZNmE+/RhG4d1ywOdY0RHxZT+PS1k7EQFMyhv81zoQmcK4Z+Kx 3KCVr79RxP5gTXA/aYKxhw2/ZYhm9WIVQ4YC2Em70gnJ99F/dNzsPoBlfKe0NZQ== X-Received: by 2002:a05:6512:2828:b0:52e:93d9:8f39 with SMTP id 2adb3069b0e04-530bb3813f6mr276964e87.3.1722534393804; Thu, 01 Aug 2024 10:46:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiRPmNTV2ZA6V1LPRxwNZSZX9vWB7cl7Z1KhFnduhYLHpUfQISvAwB/WNUNSi2aOfRb9YJ/A== X-Received: by 2002:a05:6512:2828:b0:52e:93d9:8f39 with SMTP id 2adb3069b0e04-530bb3813f6mr276942e87.3.1722534393186; Thu, 01 Aug 2024 10:46:33 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46:32 -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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Thu, 1 Aug 2024 19:46:02 +0200 Message-ID: <20240801174608.50592-5-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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..ace39b2f2627 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) { + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", err); + err =3D -ENOMEM; + 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..e2210bf9605a 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) { + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", ret); + ret =3D -ENOMEM; + goto clear_drvdata; + } =20 otx2_cpt_set_hw_caps(pdev, &cptvf->cap_flag); =20 --=20 2.45.2 From nobody Wed Oct 30 22:15:22 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 CE44A1BC9FA for ; Thu, 1 Aug 2024 17:46:38 +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=1722534401; cv=none; b=hPWY8lucZyS1g7zIA1ZOAAjzOpMZZEUe4qT1xY80YCB9zQ2DeclG7SabpR96ZJLYBOtfYA6DyN7I9a8hl4hVc1bnRHrdO9fSzNdoh1xlsrmjHl2KPWBKt3kKZBAg+TnrszhGJfaJ87Y/cAp1e5g+0gQD4TdJjfvRMF4GR39jAHk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534401; c=relaxed/simple; bh=T/Lr5R3ZpRsNgk4LNzf4i3JOmIq6wzNv8zvkRdHooAQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TH2BEwVQ272Z8s0gg0Kq4hy/jtX745Yt6jMk3ogKx33QN7rVelxlU5p6BoP0wcJA8lDgt6oa9ZfzmEvfKp1bXFnomKLjCVgX+Oq8iIfXu1qFXiq1NTH0zTGTQEIrBjdyJBwwDWQgyZ1lltDd2/HHMhvSTFp2u82UynmEe4f2Q/4= 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=f/jvTb7c; 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="f/jvTb7c" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534398; 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=VIcu667vSRZRiKEHakO3GAIgbzPtgHQvNS3his8mZEo=; b=f/jvTb7cJQ7arqLwJ0gC/XLARtBm5ucYSPOdfrzjBLigopqMduT0LhSgjS4Dn7cKg9NJCu CsE3lDxNQt6frgioT0Ujz41T6yv+9xXcRG6V+zCSjp7FetAA/mPvAT3Dx6JJTmITDOSmZx 2VCfhxXP20DW67Od4Q6kfaezeAKnBtY= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-630-cCfQpciNP0mf703N92OYRA-1; Thu, 01 Aug 2024 13:46:36 -0400 X-MC-Unique: cCfQpciNP0mf703N92OYRA-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-58aec36a89dso887438a12.3 for ; Thu, 01 Aug 2024 10:46:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534396; x=1723139196; 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=VIcu667vSRZRiKEHakO3GAIgbzPtgHQvNS3his8mZEo=; b=kvnRRH3cUqWt3hv9i+9ay6C2dlwk5zn796WIe/r8DK1sMtfRwh8J4wbtKm1cg6kgY8 ERYTSL6fTtj+CYo6uDQTHWmKnZ/XKN6aj2KjDs39001bANT4AbhN/AqUKeW88HD+sFPz SN9zZkmSqFYe5QM59wbvA8+DcU6/UPfmK5z7TqhQlqEahbSiYeaVNLNdr4mTk+3wQeAE AJOyk42iDtfrtALamWvPUpu87KvovjuNJHcSR8DfsHyt/fMbU7uB42PGWEverfcZ2qms DIt9tBCqwKa+DKnnQ8Ljk2DBt1ZdWHsSPrIrBTNPSmWAVFT7Hs05kmcq6izbrxFhjOz7 jAyQ== X-Forwarded-Encrypted: i=1; AJvYcCVH2ZNCJs9DLhZyf8FGMD4n/10bad942QTTrSzKB9blsOiEEEnHHbIlk+gtl04CI44Vhz8LWToogkPl9vo=@vger.kernel.org X-Gm-Message-State: AOJu0YzmF2+/ShYpaI89f4vfes5Se8zeT454JophwCub7BepL9IxNDLx B3M2q0p3aFiibvefB8HoKTg+IbgzhPok4vcXrlwOA/CK4s7zk/4YXgKL91P/CsOydFnlZ1ow2nV azLD+GXzc67hdStIuuYVoGNogBsAT0ReYjZJzYhitkCsRkK9UGF5x0/nqy/Li1A== X-Received: by 2002:a17:907:2d21:b0:a7a:9f0f:ab1b with SMTP id a640c23a62f3a-a7dc509f24fmr31653266b.7.1722534395628; Thu, 01 Aug 2024 10:46:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHsAm8ay3YLV5X2CKZi8aqVdjkY/Zte8gQFe54oKpkGHtEojyFbBE+V0V3Lk+EwhBeWW6VAw== X-Received: by 2002:a17:907:2d21:b0:a7a:9f0f:ab1b with SMTP id a640c23a62f3a-a7dc509f24fmr31648666b.7.1722534395021; Thu, 01 Aug 2024 10:46:35 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46:34 -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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Thu, 1 Aug 2024 19:46:03 +0200 Message-ID: <20240801174608.50592-6-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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.45.2 From nobody Wed Oct 30 22:15:22 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 1628F1BD503 for ; Thu, 1 Aug 2024 17:46: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=1722534404; cv=none; b=nC97XrPri3BfWyBtmKVniqLC7vHsI1rhqdFD/Z/iT6ZGVLbpaGcsPbegPVqaqOvwb1hDrAym7qg9vvkEsAONi7PByDYpCeLx9/CHYzjZmuY9gpd4vWABs+EQOpBYsF5udAzSi4y3XK6nsIirT3/NcB+3yatDkKnUOXOSlyr//kg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534404; c=relaxed/simple; bh=Yo+Ns2b3URhNU5TB+CvEDymuFVQ4WXMZyjfGA5NqkhE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=umz8Y97qnScrkgmzmyS00hDtjYf+C1NW8vqWI+s2L0ipg9TVP0GEYMGsq/P9lRBl0Y1PgF8edpvGJiEPYezOUvXlCALjw+IL0XY1iIOwSQJ92+DYmO5dCNBQYzr0MInUpaz85ZU3Ex4XYLNbitfsNDu0hpaM4iBNqO6Yv5DgBqI= 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=dp7JPn8D; 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="dp7JPn8D" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534401; 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=o1zjbMHqB0PmusT+nYJ2VtJ9oVjApsikg9aShs5wyaI=; b=dp7JPn8DwlLejWKOJrcLAlkPC+o6K8gT8jffbEcnE+vIn/UUdqicx8Ve+t0wX86kC3wTWe F+7j9umQsf2ouIGby/FUF+b25g57RTIzuWsz2pfgU0gLC0+STGvEzoOu88+YEdMfKenyZ3 MvuWllCDF2AqEYfJZF6R3tjcrNrFTT8= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-Cpe51cOjMeKC1y2-RiT3yw-1; Thu, 01 Aug 2024 13:46:40 -0400 X-MC-Unique: Cpe51cOjMeKC1y2-RiT3yw-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5af1a5a36feso826527a12.0 for ; Thu, 01 Aug 2024 10:46:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534399; x=1723139199; 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=o1zjbMHqB0PmusT+nYJ2VtJ9oVjApsikg9aShs5wyaI=; b=k3Ell+BfbXTtct2jshQ4cejyPx+WfA77FWXbSmfhE/Q2BLpZZwUlY+lz/2cH34kna3 eGjpVhr9J9Xkop0GYNuNkJirTyj5eRwqvzLhF2p5GWk1fx2550pXp5QehRq1VTQGBYl1 re8hNGF3yuvQAiHoSqRSAnOV9pwaoxvyvcU8wdnIWpIuGGONuJ7CesNYlxplUwhgMcVb x0WDTA3JHJeY0KCFWM/jD3Zm+x+cZXBz9nN1TRrVne0/I+z2FCF/DJzOqDgjf8+0pT5J lV7kCBf3+vrH0Us8aXiWBcpYC9xY7knIROtGpAwUpyLmAdpPKveWbl1mIoL21TCbvem3 UBKw== X-Forwarded-Encrypted: i=1; AJvYcCV9e17zOOB18WcHQ653KUiSCqpFK/KYdHrvrOwn8sIE+DSVZPBTEvpwq8whGWLGO2GWWmxKNAMom1Eh210=@vger.kernel.org X-Gm-Message-State: AOJu0YwTcfOhLKnH8hi6eqWEzMGcJiDgNbzawohbMAgoJZOZ3WGfZ7IG P0HjTUIMTCip5AZlcVtpg6eLYZ7/cc/2oAl7H5HLrwZzMvce+uu8seCmqvNn8gxwPJmUKko3U0Q V2U3Lcq+SXs78y2pTBn1sw3pjvgTQw2lbfzS2z+o8kQo7aWfskqJ+6JUhh4dk1A== X-Received: by 2002:a17:906:6a0f:b0:a7a:aa35:409c with SMTP id a640c23a62f3a-a7dc512cdc8mr42357966b.9.1722534398845; Thu, 01 Aug 2024 10:46:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2sgeoJAH08bIv5eqrzG1JRTqpxFnJOnIuiO4lxHc4kHOgcS9yd5RBKc96AOogw2uLapJ10g== X-Received: by 2002:a17:906:6a0f:b0:a7a:aa35:409c with SMTP id a640c23a62f3a-a7dc512cdc8mr42353766b.9.1722534398332; Thu, 01 Aug 2024 10:46:38 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46: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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Thu, 1 Aug 2024 19:46:04 +0200 Message-ID: <20240801174608.50592-7-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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/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 719ddc4b72c5..6b282276e7b5 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3534,7 +3534,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 */ @@ -3657,22 +3656,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.45.2 From nobody Wed Oct 30 22:15:22 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 D755A1BDA8A for ; Thu, 1 Aug 2024 17:46: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=1722534406; cv=none; b=m28ABO5gSrht/B3LrWZ0+pQ4t8hhcIAGIcxz1lKdr5V4m8uMWPGrr7v2r3tWCIc3R+XbTZHlrKngZKpzez0unzALVmr278HUMNRw6f+O65KQRQGrhSTe9vQnMxR9t9x5aX3WwK49Nc+FTnT911PcatexjGDau/PfNSFIaGhVXeE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534406; c=relaxed/simple; bh=0LeaHW5FeDo/J1kHqKb1puWkhgMcN88tyrLkKTALSn0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UJKgpSbnBLy8Z7yDVPgWre1KGiX3y5FjZ7lHzlwNnf6mSKR3iHf0wwSrdfwBQXyCvhcHVKw+RKHcOqD4/Nf+gatamcr5z+t6Y3YFGJ8ZJgLK6A3dXwc868/FQsJU907xO3o448q7fYgHvFZ3bC9TIgoFOLhXtThzdhu5aZPuKCU= 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=a/TxZPQ+; 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="a/TxZPQ+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534403; 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=qDhVp6QnBZ1g/RzszT8Pq/d9t6N0/RLenYs6FD2bY+k=; b=a/TxZPQ+GIPLT3uc3TM3i8vcc1Z2lBzrK4Hn/EcNiSFGLi1L9jbzTXDauI1RaYPdIDqInx 9K1AcyDbjSBDDrnE+9M4pgDjGxMCT5I8XOCl9WgdG3efFxS/9id4c3dLKxoA/JTACR7XmX VpM/RAumNEgUl9DyCTqlrK7yb4wpqcQ= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-SX2co_87NwWXh0Oe8msVLQ-1; Thu, 01 Aug 2024 13:46:41 -0400 X-MC-Unique: SX2co_87NwWXh0Oe8msVLQ-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-58b1fe1cd9eso1317541a12.3 for ; Thu, 01 Aug 2024 10:46:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534401; x=1723139201; 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=qDhVp6QnBZ1g/RzszT8Pq/d9t6N0/RLenYs6FD2bY+k=; b=O/4CND/sib35dXd0rRPLdc0cmpPW+oTEmAkilypOmNYNgf+dhDMYVC1dnW3m9nB5qR FXBjgGWsgvY5LdHWGCbMM29MbQNatUjWDT0/U0B89g8qCDu6cqUk7//oKDsyDPYySvOK dJ2Tud8b/q6U+kVbszrqEbpyMtMMiZmu6sxDL4dM1tZwV10MEmfR26e6/gvlNfLqooFM EQTD1neox91HPu1XKghG7y7ssc0eURovv2S0z7nR7cQqu8S/ywW3XRRGWP8SbnybRFG6 QqeoI20LgTYbiYvm9lNKin1SQAI+RrjUz/OmGdqQZiOkJOCJ+9b2SYBaeFBHh5PKsnqb qjhA== X-Forwarded-Encrypted: i=1; AJvYcCW+hQVD7Z5WL+9Lu4Z8tVAAgU062wdm/2OuTUX+8fR8wGTfby7F/GEXGiCVjTP88alWkYene/91EWtkJXw=@vger.kernel.org X-Gm-Message-State: AOJu0YyJITrxucxLKait5Zapd9G/XgsllUzJ41LmSTuPVMM0X77gvcCW lBssCD0X28VolIcD2VbU2K3Vi/ElZJU1btN6mD0/z9jv5ObgWaDzlI9uJkN7WCGBjbHzKplpv1W fyMoUWnNESdVceBh8DqmAJ6pFZ2nNlgbzOI1AWyR/apY3hlI4XaxFauCoZKsJow== X-Received: by 2002:a17:906:6a0f:b0:a7a:9447:3e88 with SMTP id a640c23a62f3a-a7dc51bdf14mr37330166b.10.1722534400672; Thu, 01 Aug 2024 10:46:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGgF3Sc4W75RJOJ5PBpT9M4a6sO2Rp0mbMsz9U0e7mL5uSzBLd6vq274D9sQmuuim3NQQHQ+g== X-Received: by 2002:a17:906:6a0f:b0:a7a:9447:3e88 with SMTP id a640c23a62f3a-a7dc51bdf14mr37328866b.10.1722534400301; Thu, 01 Aug 2024 10:46:40 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46:39 -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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Thu, 1 Aug 2024 19:46:05 +0200 Message-ID: <20240801174608.50592-8-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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 48dfb1a69a77..f1b57d51a814 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.45.2 From nobody Wed Oct 30 22:15:22 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 31F031BE22C for ; Thu, 1 Aug 2024 17:46:46 +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=1722534408; cv=none; b=Y28WImAjxND61JwVzBaDCVHL2bjHhQorcJtzeRQKNo65+n+L9xqwdb6yvvmHQIEduz4QFPIr61N2ZDnzuBmfRanmk/ExeDN0t+4Q/jwCePzd8a7J9GtHF/JMwO81SubwMBN/Eqq6nTcrU9YraXM8DkhfzQW8r0Y8uykKP+LIJPw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534408; c=relaxed/simple; bh=4GexEWYmB++TVKtf95ojSGSSevwi4ufn2RVpQzXAHG8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lW9GYPifZuBpzejPnmvKupa4+sfMR18ROFHXzlxMGmstDSI57UEG+e6RlG9CGBLVWcsHUnL6j8jpCfAFNVNj2PuyXGM7WnqkAkaalBqb2E/6mbIZQZwfXYuUq+pOMwNcJUxq9dOVeEfGQIT9P7ItS6lIp7Y0V0dX0m+mlnJmnr4= 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=Kfs87WY9; 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="Kfs87WY9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534405; 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=n5hpd+G0LExVaxl+UI//CFwTq02L8uYAsSV7qLlWbdA=; b=Kfs87WY9Vb6wvOCN6m1yhyQjWjrgggKllyUikSRNJPMALVeBpqR8kfc7OEVDmDx1FQk4mW VHbsXmtvxqMIDOJkEwSHOEv5EJLPiyetXSVZt95+HfxQaHGosO/hDPo+F/6W1PS4QlHtcb 3ivXHTHypCLI3I/6A8vmdonKbZqVThw= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-303-sNUihTbOO9KSLhtBXf0z-w-1; Thu, 01 Aug 2024 13:46:43 -0400 X-MC-Unique: sNUihTbOO9KSLhtBXf0z-w-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5a0f73ff43cso1109913a12.3 for ; Thu, 01 Aug 2024 10:46:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534402; x=1723139202; 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=n5hpd+G0LExVaxl+UI//CFwTq02L8uYAsSV7qLlWbdA=; b=LXFsJqwv//sxkC0R9yJukMqiV1nUCdo8f1ksno6jW9dDb67hsQG/KREHbGZP+FK4c7 6Sbh5vReEhVIawD2dLI94oFrA48rPN8R6taUxRdpfrIkt6/dXWVccTtZO5P+m8do6uKy VZHs805gkZ838ftGz7fqnHf6xoZUG3XQeC71xGm/uMgUP65ivUon386zenSjVtTQ/+R4 D030zuEuqFAS3bwFDG5f+qujqSOElpC9MuDFz7hKkZQ5N9qlp4WETIEhMVS3hFAenDrq xOVWdbm25gJmMyxRgemHmkNbxMgUivSS//mY4anXl2Ro1peIYqZ0B8GT/0c0IdejU473 yMrg== X-Forwarded-Encrypted: i=1; AJvYcCWep8FffAj+KRzkPJ6Vrl+vjgLXrkOF6vgb+xJhf+FbidaZxur5pjXSSkmWRSKkAjQr5yKIbc2MtFVOqXw3nC5e9C6EpBpg3U6+Ckht X-Gm-Message-State: AOJu0YxeUjVdziZ4Eu8BryVNQn6iwrsMy8rk80QGI7UxayMe2UXq9s3h u/icTRcI5YrRw1gBBqyGhOhPs9WU7/hpXtPpG6db1o3thpgH9XAIXcmjrCXDWWduiwypEWJRXvL sRmJZHdJrWPNgcq1lXA5VFHgBZAx1j/XjCYDtpwf8dWbzgndAykZt4gcMf0zEQA== X-Received: by 2002:a17:906:cad7:b0:a7a:ac5f:bbeb with SMTP id a640c23a62f3a-a7dc4d9510emr40295466b.1.1722534402517; Thu, 01 Aug 2024 10:46:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAz8VECBqGLuxnHbBqNGh97d2AXukf5BmEUdwoQf65+BgJnzGGIwfvlOLLLnXxYF4IguemOQ== X-Received: by 2002:a17:906:cad7:b0:a7a:ac5f:bbeb with SMTP id a640c23a62f3a-a7dc4d9510emr40289566b.1.1722534402107; Thu, 01 Aug 2024 10:46:42 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46:41 -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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Remove deprecated PCI functions Date: Thu, 1 Aug 2024 19:46:06 +0200 Message-ID: <20240801174608.50592-9-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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 4132fcff7d4e..b6b30bb956fa 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.45.2 From nobody Wed Oct 30 22:15:22 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 122EA1BE871 for ; Thu, 1 Aug 2024 17:46:50 +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=1722534412; cv=none; b=lwH5tPaHi1ie36uco5LqkIFLs1MbI3b0lJhiDkh3Im9muEPIhB5rngFUtFThYlo+oxGeOTPhMV8kUNnQx5FoBVWYrMOUkfBsOvDPmt5olVsnCmY/8CA3CFMPmlaiz3R89tECrL/cfsn+f+/iJtv79kzauyrduF0ZBPgyBXM2fCY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534412; c=relaxed/simple; bh=PowKNNK7ntiN8fDRwJEfgWzFgO0JzDMOq63Tm65TlRE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Mq9lCZyBSa+kqVRMtqLDzPvBQtX4x67u5SuU6dw8ojQqn6qrI8sIlW0a37lhaJoBdYQqmp++BG0wr/veBgNxzGHoL8KxXs6T3xBOvXFiCxkDrtPpKdIJIDdlVVafc7lLuTf6J/UAYmJceb/K4xuPpUuSG4oui4KLX8d//NW1iBg= 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=KwLFpqjr; 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="KwLFpqjr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534410; 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=4T8HAVKVFIndb0epInGCIUNTvqCq3Yx0Jxliq8oDWAI=; b=KwLFpqjr2DPAtafckguQlN8Ql1gbRmUtg/dh/AD5ohN2xSFkZ8bWOuIeQoS5WicK0ojBTX tmRQ8BeO7psRzDc0IYHdTWnx8V0yqh+UpiBAZ74QxqWZOPCml6aDeEOS4Ra97nFAr1y5HV isWLOql6lfUQ+5N3IbTZ4hI37FHgSWQ= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-501-MHWBg9y7MG2dcOJdDI_nng-1; Thu, 01 Aug 2024 13:46:45 -0400 X-MC-Unique: MHWBg9y7MG2dcOJdDI_nng-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a0f73ff43cso1109931a12.3 for ; Thu, 01 Aug 2024 10:46:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534404; x=1723139204; 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=4T8HAVKVFIndb0epInGCIUNTvqCq3Yx0Jxliq8oDWAI=; b=TUUeckQaa7kbsOgViUebwk9JG+7nQbBuns4hAY7hGLIse8OUE4p2Hz6mJJG6MxXCj2 IIxhQoqCb21e5qMMnRFewvkCjpwTLGuUVZxGJK2GWMDgA2b9k5qj4nDYFF0f6Nry8gZ5 nTwGv3dDZ+9pkGk1FYTn3DbaX6iPcMXsCre0hy6vfPSbvNg+cR3r/fCbEY3edv2aG2pq 1x7Hkc21ssH0JmJ3QJPQ1Qb0jqvJ2TxvZSdsSaIv4qAuxb26vMAFjjYWux8ci3B+Uq34 ZA82WpN8c6jspDmsw+jS6G3l63GNbZRIjusHrFbgjzlYBIIkJ/Ky2vQiitzuWPOZpAo1 CNlA== X-Forwarded-Encrypted: i=1; AJvYcCU/JhRlbLXIj9E+bPku9xvo4Q1Elccg6+z68OH1fJXlSpvr+AbyK8VdLWSAC3EaB/SvgvDLMVLgXfk7NiRKA2XXBluffJTRExfe/IVa X-Gm-Message-State: AOJu0YxxX2A6kQg77dG4zheKDAwenQmRRNZA8OWiw+CRxI65bv0h0/4D 2PJFL5ouy0t7tRcxs087YsVS57NoxJ19Ym7J+ixiCcVXZdJZwie1zDrI7lOEc0rcmwfg3ZzAH6i XTgkpxql/AOrj1eneLCZHWdsH8HV2J/53mLJcFHoz0Xf7Y1NW9UOL0Z7n8leZRw== X-Received: by 2002:a17:906:d551:b0:a7a:acae:341b with SMTP id a640c23a62f3a-a7dc511b140mr44581266b.9.1722534404438; Thu, 01 Aug 2024 10:46:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWw7p0vbE3J4abjSBrxyeauGvjPs9Iiwjk4nqGQ0MahZpjO/0TmVoD8LvCLea8dznFqsew5g== X-Received: by 2002:a17:906:d551:b0:a7a:acae:341b with SMTP id a640c23a62f3a-a7dc511b140mr44575866b.9.1722534403935; Thu, 01 Aug 2024 10:46:43 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46: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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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 09/10] ALSA: korg1212: Replace deprecated PCI functions Date: Thu, 1 Aug 2024 19:46:07 +0200 Message-ID: <20240801174608.50592-10-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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 5c2cac201a28..b5428ac34d3b 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -2106,7 +2106,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 @@ -2128,7 +2128,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.45.2 From nobody Wed Oct 30 22:15:22 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 7B8601BF306 for ; Thu, 1 Aug 2024 17:46: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=1722534411; cv=none; b=POYde/4wJCRzqA2RGvDSgVMaMhgkSrC/b5Xi/617VQbU3nQX4JeA/1CNDTYaVdagHXiWQ1c6EUwzG70ukNgD8L60XJWGvRinBYeVZGKhrEwOmwKjWAXndzyOkO2CwRYSXGXwPAmvnSGF0GOZK8HLLsln72h8uOo76HJWYv6sPWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534411; c=relaxed/simple; bh=Pv8ODNDYtz7oEjKERVc6wlqFHzZSZy1QxJE4IhyOR4w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TKVp2sAq2t6m9u9F+HfboLcjDZM2Adg9l86uwTHGpmTTbdkaHsSEngcCt2Zh00Wwj5rKw2Rb6b6vu1psnQdX4MFvpwmw3/vIIZjCzVPI6PF5qDDwndwZcJuFgMUVhLWu2AeXrRtuQ9RJs1jxBDlkj7sWbgKImfzo4O7Rt1y7HBQ= 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=d66cIGsX; 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="d66cIGsX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534408; 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=09zJhy4Kbly6dnOSxC9RhwbbIyB3cmvAQjfFuNCxLhY=; b=d66cIGsXLgClJobePS6VskhhYjJwwbjD48hGGAhOkNb3Wt+yfGFSkOWd99f9n7xBQnCqZK kCGl5x9EA/sWtEzKNYntLw7Hh2LHUV2eKh2FNnk92cEDU+3mcMWtxInt/05ade+HErUAgj Sp2M5W4EBhoIhIC18dUaGQgS/WX5CME= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-198-4Gl5WSb5Ok-p2Bs-k8J5WQ-1; Thu, 01 Aug 2024 13:46:47 -0400 X-MC-Unique: 4Gl5WSb5Ok-p2Bs-k8J5WQ-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a29c8de0f9so1100556a12.2 for ; Thu, 01 Aug 2024 10:46:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722534406; x=1723139206; 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=09zJhy4Kbly6dnOSxC9RhwbbIyB3cmvAQjfFuNCxLhY=; b=mPcopmMZ2eEpmI00bM2EEtCs3LR4hTgt/JIuyNmQzyAJNr8RtU0YfA9dJLzQGkq1DJ 5BqIFv+xhViNRsVfnVBigbXYG4wnZYJCJ5Jbjq4PBg6bnvN6I+DJmp1F0dfrdeCkuuZe bDAAXDqQm3tGPvMU/mJLh7TQtEuj9UIw22CkESaQB8VbZAS6NJaxQuyj59hfgas/7YmX osu9BOITn0MSpdp0YcnIdgb4Pjmnc4POMotx7xmEuIZa0Ubin3qQZ+Xd3gvB5+7f4dux ZlcksxLjZDjz+3MoxEQMXvlmxMy4iVUylCdN3T20SJFjkPeQ/rq4wN5o72bjHv7+xHXF MbHg== X-Forwarded-Encrypted: i=1; AJvYcCWujZdJgUi4nCEwIjBXDuQ4dX4lgI0YIpKSC3RZEnc5zhQ0MesfOuNUoom8Y3kqy+YMPzwUWX3SX4NqwGiBs15h2cH0i+RGnigwisSQ X-Gm-Message-State: AOJu0YxImq4qNZLzAWNIXPwTqvPReAOrHkOBU4PgZZatOcglYLmjQRsh XNOsLsRl7Tlzx0h6rl640q8D2u5wMwat71QQ00nu8YAUxFiw8BD3eC7iltlhD57C9ARnHYTUHPm 4S3UYGIuAyTh8l4kHyOUZCTVcTFJHlQNsMtHmZVJBZ9PhGWKGWjwWEiJjg7EfVw== X-Received: by 2002:a17:907:2d8a:b0:a7a:8378:6253 with SMTP id a640c23a62f3a-a7dc506e7f3mr47116066b.6.1722534406238; Thu, 01 Aug 2024 10:46:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFySF5GV88NqHAqxRlxnt7y0NX7+8rGyEZHEIOl43GdNOi3Tk+WX4XrvRPcFqJTqbiCRuqnbw== X-Received: by 2002:a17:907:2d8a:b0:a7a:8378:6253 with SMTP id a640c23a62f3a-a7dc506e7f3mr47115166b.6.1722534405758; Thu, 01 Aug 2024 10:46:45 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3d4b:3000:1a1d:18ca:1d82:9859]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e83848sm5339066b.177.2024.08.01.10.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 10:46: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 , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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: Thu, 1 Aug 2024 19:46:08 +0200 Message-ID: <20240801174608.50592-11-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801174608.50592-1-pstanner@redhat.com> References: <20240801174608.50592-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 ac9ee7441887..895eef433e07 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, all 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 0ec2b23e6cac..eef3ffbd5b74 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -952,62 +952,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 5b5856ba63e1..8fe5d03cdac4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2294,8 +2294,6 @@ void __iomem *pcim_iomap(struct pci_dev *pdev, int ba= r, unsigned long maxlen); void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); 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.45.2