From patchwork Thu Aug 1 17:45:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816198 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 DD2A11B9B57 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=1722534396; cv=none; b=lnPqpm30v7hKDYmohdQnE0wVMpBLjMVQeQoHP8Zp5XAOYHg5s0PYauvtSxR29okeXpd05fwZ3VMkHxkOQ8GGu0ltD20QeXhzxosJwcxYiJG9cBSFkjjkWxxB9TY6HA48OPdpywr6w1OBi/H61+8v6J1M6uo/LhZZNGan46fqvUc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534396; c=relaxed/simple; bh=4GsXkzyF1zXnnVccFMmH9MHA6OoXOba9lWFScuAVpNA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jepUJkzRNXK8p3fdPrHCM8KP0pUkzMKC3xWZyfGWHAJCAIwnaOFzDbqf8zp5jrvgrMJlA1nqu9+D/limt0/oLtCVvCHzsLJh2HFU05XT/iCczQrZ0eTZo/95+4AzYJSz9A0FszhxIRehXtMkROExMUVmcOphHm0LF/+CQVkJVUM= 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=MgoUhlUu; 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="MgoUhlUu" 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-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t0H3lAj8yc7c4WzJFe947fa0IqEnSWxptGsCiAxUCV8=; b=MgoUhlUuNX8rnY1DMZO26pqlmqmXwEmB3xQieqIHK28ThDwfZODPFgqde4Hf39MSYHkIrx t+vuzGIc6qozJa1NfDrfNaVqx6BT7kXALoLpdCzaehW+ojnJGy9UiSRFJn16lOHceTZY8C WSxBh7I037kNFAS+aLUXnKmF2rOWSFc= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-39-iPBsoW2bOh-spN7eqzlOXw-1; Thu, 01 Aug 2024 13:46:29 -0400 X-MC-Unique: iPBsoW2bOh-spN7eqzlOXw-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5a121cd4d27so965079a12.1 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=TiTEKdQ7rFv2vzeh4RqE9NIWscSKtTj2buucZ9fDmHJJ4+P8T1bXneFqi2fYe7m/pJ v/6PwlSGBqirJWdBrPHYuTjT9guR5gpkIqfiXHpqChnUGe6g67la8YTfcexT0xFFhmBA eHUwHVu3l8v1nBjD5Q37WQkUw4jSS99Rr1PORjfxBhHMq5V1DKKsflF9szUy2a7eSc9F g0fK2lN0tY+aUz8BkNY7xJN4k97b7AeuYAklGk3ZKmjkrZUpDpfZB7TKE/4bdkGfD18F o1pk0ySar915Tgwz4qxcAmYvVYkbDyffoVRPrg6HGZbO/+gZ4s1U1izYeR0eQt5moFp5 mdIQ== X-Forwarded-Encrypted: i=1; AJvYcCXKaxLf+5Jjj8heNgexdhIoGtlWzGqQtudgYhle/kbY8LKPCHwelgaUzA1kq0rHiSZAyjqwCOOoseqAacE=@vger.kernel.org X-Gm-Message-State: AOJu0YyVheCo4jSen5KfSFV+C/HO/QJCCvW0//q4HmcA8fkmdHuCVcHo X440RYIbAed6I6isEEWCdaVRkMEoWDhNoK+aMHS9fU+gkshmo9BVkBVoyOi4NRX90NhokEghQp4 BsDjuacDQ7X/+zVdk3tU0ywsn+i46OaHdYRRrkBQCLHhRPI9vuAEIpwfNWve73w== X-Received: by 2002:a17:906:6a0f:b0:a7a:aa35:409c with SMTP id a640c23a62f3a-a7dc512cdc8mr42333566b.9.1722534388107; 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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 *pdev) * 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 *pdev, const char *name) return ret; } +EXPORT_SYMBOL(pcim_request_all_regions); /** * pcim_iomap_regions_request_all - Request all BARs and iomap specified ones 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_pass pass, struct pci_dev *dev) { } #endif +int pcim_request_all_regions(struct pci_dev *pdev, const char *name); void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); From patchwork Thu Aug 1 17:46:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816607 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 89C991BB68F for ; Thu, 1 Aug 2024 17:46:34 +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=1722534396; cv=none; b=j3MJ42eIJrQt+OI+vZP1IQdgzqYIKhAr8hZguV8OuCbM1OyWI/2bt4x5avs2ghteTEhmwVSaHgLjofTgSdwgWhpcHjcG6GhexM6jSxA1igPV1O9TP1WKc9Tji/oQH+cH4C3nJfJMIyAZAnrGcbD11eXo/i/JlPHAAGHmo/HFsGk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534396; c=relaxed/simple; bh=cvZkQ2qgcPVEhY7uG5u9oCildj/5ABgxLmro9w+ciu0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SfJoPyj2h0UK1uDkFVXBistO6pvYLoOXDvRYjlI9wMonsC1m5JpfEbQeMkakNjE3Uw97Aar0qMRw4PyOjMXsoiROQd79izYcwi1tmRKJYTL0LQZYOSjswp5LUdPU8KcALxeO109+qQuYDSktMeOCIu9QgU4hysM6GRXJC6XKGJo= 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=AfZwyVKc; 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="AfZwyVKc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6WrcubhpDE+K1LZOYWy4Pg3YuYsECxnI/4rdk9yULNw=; b=AfZwyVKc7t34D9smPy8tBws9zuvwxczgGqwpDIenO1AejgYSx9zsXCwHeVRAuLq8q43KJw D2mw+gvm8ODU4s2pzzzEjMdPr8hzMEYkdo+xeXvx+RjmaEVYtaKTQVaa/hT7UCqxMtZhrc 9gzy5kBPTjwN9FY2DL4hjA4YVUoGuk4= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-422-t-FWfOr1MAyMMIm61pafIg-1; Thu, 01 Aug 2024 13:46:31 -0400 X-MC-Unique: t-FWfOr1MAyMMIm61pafIg-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5a1ab480f90so1271205a12.0 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=pvAp9oAUBt8aK76Iuok2V194UvqZpkcPmYzY1WG09WD2AFq7ZivbtEyHD9DLmtUIy5 f4j73Ah5N8+wigAiONnJfBdqADAFP/CGxASkvrO3qRFj1ryx43K+O5T5p6vKQJ/zqWbE bVvQeXUEPWBjXWiReO8cybsev9iCWae3LNNS611s9Iu8Hvg9UETAjoWBrPqIvtbbVu6n hJ07AnbehG2Mt5GfNuubiYialGl5/7oT4JgOXjhVz9tT9fFV5OUiwO5mE84tVpdLyimw vo6L2n9AAetjnr+0DLpPLpQjS56ixsoeJT/5f0WqbqsM//xVLssXfDL/iSFrc/uzty0v 12cg== X-Forwarded-Encrypted: i=1; AJvYcCXtdjd/kIlTUEAmoJyuDG+Jo3BI10iY7NXTo0Z5OTNhSNP1YfY/BdLKVpN0nxM1iZghfvyoLERo3CGPuAywM8gznG7qG6Ilcu1d8LYn X-Gm-Message-State: AOJu0Yx/Mr+mnd/GRONlyRNWVbqFJtdKHNIgZyzsJi61cPjrGpivdh/9 uywFeTOW1K//Bl6XK7f/jR7YuFApOgGWl0WI7xXPsapYTv79/PwnRIYMk39lnsZQqfZqTm3x1mD IesQeguWF+iRJPuxXagcWFaliPEzcGxlGiuJSwKQ74ShzPueSuW3VY11khK7Xlg== X-Received: by 2002:a17:906:d551:b0:a7a:acae:341b with SMTP id a640c23a62f3a-a7dc511b140mr44545966b.9.1722534389744; 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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 --- 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, const struct pci_device_id /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ - rc = pcim_iomap_regions_request_all(pdev, 1 << AHCI_PCI_BAR, DRV_NAME); + rc = pcim_request_all_regions(pdev, DRV_NAME); if (rc == -EBUSY) pcim_pin_device(pdev); if (rc) @@ -386,7 +386,9 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id if (!(hpriv->flags & AHCI_HFLAG_NO_MSI)) pci_enable_msi(pdev); - hpriv->mmio = pcim_iomap_table(pdev)[AHCI_PCI_BAR]; + hpriv->mmio = pcim_iomap(pdev, AHCI_PCI_BAR, 0); + if (!hpriv->mmio) + return -ENOMEM; /* 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 = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); + rc = pcim_request_all_regions(pdev, DRV_NAME); if (rc == -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 &= ~AHCI_HFLAG_32BIT_ONLY; - hpriv->mmio = pcim_iomap_table(pdev)[ahci_pci_bar]; + hpriv->mmio = pcim_iomap(pdev, ahci_pci_bar, 0); + if (!hpriv->mmio) + return -ENOMEM; /* detect remapped nvme devices */ ahci_remap_check(pdev, ahci_pci_bar, hpriv); From patchwork Thu Aug 1 17:46:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816197 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 4D2A51BB6AB for ; Thu, 1 Aug 2024 17:46:35 +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=1722534397; cv=none; b=uyYuI9Hu0GOpDOlwokaPMQTturPFuAUIGAFV7052cKBCN6kgjvyOOPFEXTSF2VkZsDxZC8J0L6AmiAOJRB9MLeYu886s3jxIHWVpl+Qy5Q/gKUolYljL4wYc18M5QZiJ89vqaujnepQhGZ/jQFIk0FFuIWA5I00jHh9u2FLdz/s= 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:Content-Type; b=Si8SqMr9wpWyxoIyELNy2r5skgP5btUGW2R/kMtpdVKSQ8y4olkmtvrh8lCOI4bJeunqb58kQ2c318lrpa/7lT9B1qD1r9bBFk9h17gwfMkHXgGNoUmN568nDV6tIXal3Y9klrA1w1OzkJQeCaynKd607Hb2oaRiSQbAcQeVeGs= 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=VqR3izu6; 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="VqR3izu6" 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-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QRt7X9facTlkLTpy0pTbVW8nFCV0woh1LarfaLaM2gE=; b=VqR3izu6xfukHHQlXL5MyqZaSOcth1f5UDe/1X5mF1khLJkVIa4sL9YbrcCr+dvphm32w2 P2bJ2hSe8M0OIFF+RUtLmGhMxnhOdbdLZXH0mP0ZQ1KzpnESNTtV4ZoH/KWcAx2Q5I3CR6 4kRj9rKF24fWbYxNSVe7vtBFMf4+IpY= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-586-HT9LfC0ROZatYfxtDUO5CQ-1; Thu, 01 Aug 2024 13:46:32 -0400 X-MC-Unique: HT9LfC0ROZatYfxtDUO5CQ-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a7a8c829d7cso22359366b.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=Is3+IBIfR9wqqUwksD/YQ9m1LPX30Q78kFK4bAZtvborQyZ8IdtqJp2bVbIYL3XEQs tdambVrXLxabYx7KNLjrhzzFyeodFmDhPfEqc6DxdOxvsy81umGh+pw2rOp9FdOLEAM7 2kG6xRBSWO0DNZyGFg+LXnyKZeewQ5uelAwSrjI3vEFc74BoF9CCmnJ4gEGBFTLiIPUA XYLUlIXfXOnJoRM14lw8CibZKHsazDqtH4TM+PYZslDgCJhk/I3jj5eGGHafc0e4N1nt H5kK6I4sA5w75CJrkyJ2sjUtSAP074KbPq15qO+vHmF5O0Uvg/3AsYpxt2nNcmDdDLKO WpHQ== X-Forwarded-Encrypted: i=1; AJvYcCW3t86WGY+92hucDsQ81HXE9H1ofEVL89YfuHTTNvMOfB6NuN7V4pWRUgXbu8VkJv9lNAK3SWApUJzeFz5rcbqnbTEkUtVIOT12FqR4 X-Gm-Message-State: AOJu0YxGi/mf3yTx2r/PAXkgHu/ZBnt3K+iMc6nrj8Y0Ow/eR07xVSlH S7qLYAe5jDJWJ1OpKWGFduIbv/ta0H3x9YdhFhAaddxf0CwWICHnZO2x8SVkIKyufasQ6Kw88cR Ji4utaAPTL1Y4pYsuqr6POU0+CI7K/Sq9veLGRwp8WtsAjVxz5PnWB/QmZ/uAug== X-Received: by 2002:a17:906:6a0f:b0:a7a:a763:842a with SMTP id a640c23a62f3a-a7dc50f5614mr45531266b.8.1722534391595; 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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 struct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask = pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; - ret = pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret = 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; } i = 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar = &accel_pci_dev->pci_bars[i++]; - bar->virt_addr = pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr = pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret = -ENOMEM; + goto out_err; + } } pci_set_master(pdev); diff --git a/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c b/drivers/crypto/intel/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 struct pci_device_id *ent) /* Find and map all the device's BARS */ bar_mask = pci_select_bars(pdev, IORESOURCE_MEM) & ADF_GEN4_BAR_MASK; - ret = pcim_iomap_regions_request_all(pdev, bar_mask, pci_name(pdev)); + ret = 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; } i = 0; for_each_set_bit(bar_nr, &bar_mask, PCI_STD_NUM_BARS) { bar = &accel_pci_dev->pci_bars[i++]; - bar->virt_addr = pcim_iomap_table(pdev)[bar_nr]; + bar->virt_addr = pcim_iomap(pdev, bar_nr, 0); + if (!bar->virt_addr) { + dev_err(&pdev->dev, "Failed to ioremap PCI region.\n"); + ret = -ENOMEM; + goto out_err; + } } pci_set_master(pdev); From patchwork Thu Aug 1 17:46:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816606 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 77D651BC9F0 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=BqnyayqrVb6pkISIKvohP16A6Y/brHYIQ0S3IVlSMOD14/tYPWu4VTmWyD/9UqfI3mbUcTy22BIBynlg9mT0awbWFjPCEZIf+3V97RH7wypAgUqEFnTqdHbn62v/7m15VtadJOq+UN0ld1C73dRCrGhICV/v1iYKRsnrsiqQg0o= 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:Content-Type; b=qxWY7iETIrcFHOLFMbt+EUUjVTmJgBpH87U+r8RrbS7HT/puNTTIzROfRwhEp2GcxA+TgzskihowzEZmWyuQpDKw98PbBwhADXlqrhIApgqPZTvffjozk9hWa5e6c6Mhv/ToeurUdFdLBv4IkfpJAAdZKSOz1aysb7Z44X/pNWg= 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=Ve9IqNei; 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="Ve9IqNei" 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-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EKYe3JG3XdG/Dr3y0kVEnJ2M1SarV+ljxBmGoY7N+1Y=; b=Ve9IqNeiT24KT4PWrB8HRg0mxtQhk5wcQEx02HzgEYtFLp8rKkb7rDLpyjy8QzxAoaXyVW zbw7RSAjAc9jkq+CD5XUg/p+PIMwWLHVYvhWhiamGjgM52rFeQv/oOJOVcZe9m9s6wa7yc Xi2CtXbHz2GVs7WdOxh7tkQ+QGIOkG4= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-621-EQLCC5myPWOSyVfYHY5Hsw-1; Thu, 01 Aug 2024 13:46:35 -0400 X-MC-Unique: EQLCC5myPWOSyVfYHY5Hsw-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52f028a33aaso779787e87.3 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=N5Dn+95e/TqRLAGLA2JEKwI9gazpuyWpdyDMHgvkjVufB5rOU5RKZdpfdvmjYSpw+d YVjSoq/6AUs8d2hOTwTZ0FChaWHiVjlBcV1jJFN6K+ek3M4t0MFf+rx23SGbwwh4YNQE CEDzLebOmPexs7K+N86QqLd3d3Hp8RDxcsk6HLogQxOxMM2ahG4ZPlzkcP2ZrOC3O+Kn YNbcRn+xgeZl72k8senM4bqgDhresHF+axjByQmTeJ/q+PFnmoPPMG42tpN8FANgqcmy NzzJvINOkpFkeh1ldPq+jTfFLwSb74DxCX4WIzDqHLiN/Emch4cj4cIzhH4hmgwJUHLr axZQ== X-Forwarded-Encrypted: i=1; AJvYcCWwhO9nqzFf6jjXQqzrH5e3NnnmvYb2u4pX4X7yT0SVttUvgoKzyGxywOb4lPpnsl3l8CCwn5wmrKv/FI8=@vger.kernel.org X-Gm-Message-State: AOJu0YybRP3os3WE02A5IQM66qepdmi8Qhj+gZGgp/8+2ROQrV+myTL9 pWg8C2KMgzT6sVRa0Iw6SzXPlx/1IbF3XEbKNOhSRQJV8s9KOUFYj7IEP5ncCoQOT/nbTig2yCx ndbu1mKT7x23pEIWktkJ1HV9ZO4zL9Cbn2cPpgKlRN4On5UasZYb7S6tQ8BHSjg== X-Received: by 2002:a05:6512:2828:b0:52e:93d9:8f39 with SMTP id 2adb3069b0e04-530bb3813f6mr276984e87.3.1722534393811; 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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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/crypto/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 = pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM, - OTX2_CPT_DRV_NAME); + err = 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 = pdev; - cptpf->reg_base = pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM]; + /* Map PF's configuration registers */ + cptpf->reg_base = 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 = -ENOMEM; + goto clear_drvdata; + } /* Check if AF driver is up, otherwise defer probe */ err = cpt_is_pf_usable(cptpf); diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c b/drivers/crypto/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 = pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM, - OTX2_CPTVF_DRV_NAME); + + ret = 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 = pdev; - cptvf->reg_base = pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM]; + /* Map VF's configuration registers */ + cptvf->reg_base = 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 = -ENOMEM; + goto clear_drvdata; + } otx2_cpt_set_hw_caps(pdev, &cptvf->cap_flag); From patchwork Thu Aug 1 17:46:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816196 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 168D71BCA14 for ; Thu, 1 Aug 2024 17:46:39 +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=Kq0KAoUnFQ3Vkf7OMIyDqR0rp5Q4yE5h+xmG/nDqMAhDBRETtip9mkMf4chRjpfztpTzbHcjy3i49Llkgk0otzooqdmczMmi+7tgzlHLW1GrnF3Tq/cLxUSTZN2BRCNknCUepMe7Zx+4KjjpA8fUTUHBnFptpnJiCkfmuQidDMY= 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:Content-Type; b=afC8bFaCgoipZQtXyUjxwSTopD+gP1BZreRpC9t02qN9NFoWrPyS92JWOdtDsMTZ3DXyNljvT5pctxG8oWGkD1S2FfjukpAhQlVgJzyey3Ffu7g4Myi5saMYcANx0PfAWvarhzTPYU09FOFEMj9n+fyg+5sBIzqJPz80R8HM6s0= 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=M7OIGhWk; 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="M7OIGhWk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VIcu667vSRZRiKEHakO3GAIgbzPtgHQvNS3his8mZEo=; b=M7OIGhWkpV5EoG6DWwv7eO0eZXRAYfer/DUaMLfA+SSnIrQcu0JwMhez6AZcvsOYN2c8Ev GmcD12Tl466NPg9AGD3/aXTKdVu1cu1iNVLXBuVY5ysETgpctIZc6+MaTlmMlkHq8mte9n riQmutMA1OU2/dDsp3oxa7EiqDTGcXA= 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-296-_UoEhBePOuyaw-TB4UewSg-1; Thu, 01 Aug 2024 13:46:36 -0400 X-MC-Unique: _UoEhBePOuyaw-TB4UewSg-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-58aec36a89dso887435a12.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=1722534395; x=1723139195; 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=ikrVgr7QSa0YHfSv1cLOnKVW77kcz7KMtJ7gpkkJtmJlB270oSNZF6Avm5c/T1VA5I hyKXmi3foMW3iQWqgie3a6+9wDcvdKnEEDTe/BFznYw0M1TS1/rPsGVLqwM5cjNtEJR4 MHcf5Uyjpck4gkM4DCTxVuMnPRpqJC3s86gYRzs4SbJQSRYqV51mCh/TIPnkIVjEKKA0 Kxzyf2EGRPoDfkRFWjS7vDJWWUmJgwCTFQwqR7Ypp9lRRb5oLceqDo56V81Y4zZ8ICHt AElQ/+IsGycspqef5ukk/gFmRRi8b3+gyNl1N2j3MbmEVnb7W6YFFDv6rPFZA5SPzAOe gBDA== X-Forwarded-Encrypted: i=1; AJvYcCWletfBc/ndJylNKVjj6VAwWbAWrVspqb+Lgh7H+AlzbGshUUkDkwUXlmyO3IVXYDozX0DK8HOSIYNCR7w=@vger.kernel.org X-Gm-Message-State: AOJu0YzsCSbGA4sj63Ht8GuLXlYOnKk3FLvqKgpB0q1TvZx9QPLpkYR4 +EYl9OdgBNyC0pW1zgIpS9LZohZBP3HrzgMMRonEw0aXkSs1+wLacr8WrM2TzM/oAAjcRHC3Om0 /TphQ7P2vI2FGHXeuj4iZEOUK4PkKy2+ci+tM03X5bCj96n3OXB+a17+8ADZ+/Q== X-Received: by 2002:a17:907:2d21:b0:a7a:9f0f:ab1b with SMTP id a640c23a62f3a-a7dc509f24fmr31653366b.7.1722534395629; 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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 = 4, }; -#define BAR_MASK (BIT(TH_PCI_CONFIG_BAR) | BIT(TH_PCI_STH_SW_BAR)) #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; - err = pcim_iomap_regions_request_all(pdev, BAR_MASK, DRIVER_NAME); + err = pcim_request_all_regions(pdev, DRIVER_NAME); if (err) return err; + 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] = pdev->resource[TH_PCI_RTIT_BAR]; r++; From patchwork Thu Aug 1 17:46:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816605 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 5F7F61BDA9A for ; Thu, 1 Aug 2024 17:46:44 +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=fNsKg6HuD0uyInG4sXR7wFXJcOHeK4lJgy8v+hDWvXKF4U1czU11JowBnN5bumEK3gGdgAyeDh4G+1LhfYNpYCYegcwn21haJLlaCaVe+syogTvCCkUMWIJt0x23KDZn5HgQIqN7+DIpj2rCEM/3Ts5mCyMZAZ50ikuuPwfKL3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534406; c=relaxed/simple; bh=Yo+Ns2b3URhNU5TB+CvEDymuFVQ4WXMZyjfGA5NqkhE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=o08TKattaSN8RuTppM76JII0C8TFTihb81ffFXkQSYtIBBL6T5BcFO/KOrYxpRd5+qf90+F3TfqJykqK7I7BEsaTiQRgVHHDck7jwYlWByJU7c8VzwPeJ+WRY5LsBGszS4YHFxVLZltfPDY184VJKDfojd8bSJPhz1HR36w0P2E= 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=EC3TvMWl; 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="EC3TvMWl" 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-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o1zjbMHqB0PmusT+nYJ2VtJ9oVjApsikg9aShs5wyaI=; b=EC3TvMWlVmpgx0Ub7JZ/BTomTylLTpGO3hQMFajuogv2M/ArVcWJIS4u5HSO6P3h2DRcBb RQhFmUrSTGXSO7Tn2+kwGiDl3zsjlmYXuFlz2XMGFAB1tS8nyQlFSCN9/++X3d/vJAdZWF pYhAhIDMxfxRNSg3BDrUl6NPkJXsffU= 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-225-wU-seSfXOdq22Vuvuts6JQ-1; Thu, 01 Aug 2024 13:46:42 -0400 X-MC-Unique: wU-seSfXOdq22Vuvuts6JQ-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a121cd4d27so965129a12.1 for ; Thu, 01 Aug 2024 10:46:40 -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=MQQVKoKnGZ+EIXJQFAtmprGrEzGUyEaxkob5THZKKT5g9Wf42qVg+sStIYdLnH5BY/ tvXsdbwUb61ba0F+6co4hhVsW3jZMnxzRH/aItGbF2XEMv4jaFn5RqGGxD0p96Hc2A1H k7QYihSlp0nw3/1y3hQ1heANH5n0WAyjXS6GdhlmJ1vurypTiNFwxpr64pxfLshjPlXr BX/zvIFgrm8ANBpKDK0MuMj1mrtwP7yMoxXMqW0DxGYWK7IzBbm8vguaYyxh82XR3AOc widjjeEAbdimQi/rVqEHB22Y3p6ewmmJSG4xNdFgvqVnWpbrniDkFI7V0Nc2XfT7AoI3 dKtg== X-Forwarded-Encrypted: i=1; AJvYcCVFxuYgQioIAS9GLrGbnRKEXIjcn0gq4W7NfUNxaZEQdTVt1ZKx5Yz64N0cRE+RaaH2x+pTYr5aKck8nzw=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3TlfQdM7+3Ek+thgMk+5Six3ivR9n3hFP7yvWiXCyagd0arrW w4bQKxfJZRMXq78VWuYm482KDaGs/fxKeI9o4vvKQ+VUUPwfoVxquvCBEffpay4+QB2WX8OaAGN +8jp77PFL1MF2ApYjbXC2WwoI/6DjmmTBRhS+ZfdVQ3NgZwelOVekyy6SX1ROGg== X-Received: by 2002:a17:906:6a0f:b0:a7a:aa35:409c with SMTP id a640c23a62f3a-a7dc512cdc8mr42357866b.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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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; /* 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_dev *pdev, } } - ret = pcim_iomap_regions_request_all(pdev, BIT(0), DRV_NAME); + ret = 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; } - table = pcim_iomap_table(pdev); - if (!table) { - dev_err(&pdev->dev, "pcim_iomap_table failed\n"); - ret = -ENOMEM; - goto out_no_pci; - } - - trans_pcie->hw_base = table[0]; + trans_pcie->hw_base = 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 = -ENODEV; goto out_no_pci; } From patchwork Thu Aug 1 17:46:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816604 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 202A71BA86A for ; Thu, 1 Aug 2024 17:46:45 +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=1722534408; cv=none; b=IGbGAIkeIzl0AcXyFD7d/J34x9C1gnFc8waqzGQ9tqJwstzCdjv+facha7TWZwa3Y4k1fopSBgg/qyhsOZK9KAw/tQOUjjUgFmk0wEqkyg8vcxssh+jpNkGlmswosxvAx0hD9uGfeD8wWMYwilPRj8bszAi1kceORKAcXI6yQ8o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534408; c=relaxed/simple; bh=0LeaHW5FeDo/J1kHqKb1puWkhgMcN88tyrLkKTALSn0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pE/AvfPjlFdIhEQnecK9T6P5o/opOawBIICZzK1/x+wwFhDa5q4VFfrTHHyVr5yBW6oS5PdFHPTjrs51IkhgiN5gFDVRbuEKfWBqXJKaUNGhFrLVd2Rh5tnf+yZzVEwoQKroQk5ArISAjQN3Cp3RPTqmjds4MKkz9OJZCxZdJjA= 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=amhh6roa; 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="amhh6roa" 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-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qDhVp6QnBZ1g/RzszT8Pq/d9t6N0/RLenYs6FD2bY+k=; b=amhh6roaV/yL1NXe+jP4ikxIb1pl4HnmdXEJVLW8SsqNwsoNqcKjmulAXOkqzPR1rpzmy0 3qT3UfNObrP/Lt3Yd5sjspccsMJ/34Op9/uPaqoYhwByO7c1xOt9r82jBSPvzDxKtLEQh+ ZE6dpaq2qx0yeZubtjjr0eQ6FZEGJjk= 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-656-pJegUdgkNsGnOXPeIGtN3w-1; Thu, 01 Aug 2024 13:46:41 -0400 X-MC-Unique: pJegUdgkNsGnOXPeIGtN3w-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5b78e856a85so45710a12.2 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=lcbJLP7CUnsahBFMW+cYkoPr7KuT+vrnG2BnHwMuJUR2ipwOU+o0wJDft+q6ekCET5 VNTzHRY45EG5hj6LUIVh96S8g/zuWoWB2g3o+5Xb3YlffV0kxBevJImsv3TWOxqnfQ8E BI/m+fTAprdeTKA7xiYX/DryVmUbbtBjxrAuts1YIRx+hrjP9oU+x2i0g2minyL6P+NM TH1EMyD4CiCMmwSl/xhYhjYLowUe9EExFY7uT0eorfeL/vUT604vtqDhcGSLJsmGYJR8 JrUa5NVHgWsGRYpras4RmfIJR7+4GsI6rBiWtgdTgdgJT0GE3SPP7AkI4qrj2Orty9X2 DCbA== X-Forwarded-Encrypted: i=1; AJvYcCXl+t5Y6mKWYuhwtlyEJTOSjmPSmBSQEiMy7LXoScACe7RHyP6wNvX34ZX3NylkTJNSHVvv/4L71NJ30I0=@vger.kernel.org X-Gm-Message-State: AOJu0YwBETA9Fz79x9AdLjKTTYwciqps4DoFPUrikF1DTLNj4oNX/1Ob hFkfxOw4t2uJ5tQUJtI9yJEIxo5D5vuJfK0uIhwWY4BTB1570LXEF6ab4z2EzSJsS9TVz4Q+NRx r22Ty7bAE55x2FpLbRljTlBCB8Mg1fV7unp6yt5hMyFwHykYdOPKIWZgE9l4tOA== X-Received: by 2002:a17:906:6a0f:b0:a7a:9447:3e88 with SMTP id a640c23a62f3a-a7dc51bdf14mr37331366b.10.1722534400679; 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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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/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_idt.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); - /* Request all BARs resources and map BAR0 only */ - ret = pcim_iomap_regions_request_all(pdev, 1, NTB_NAME); + /* Request all BARs resources */ + ret = pcim_request_all_regions(pdev, NTB_NAME); if (ret != 0) { dev_err(&pdev->dev, "Failed to request resources\n"); goto err_clear_master; } - /* Retrieve virtual address of BAR0 - PCI configuration space */ - ndev->cfgspc = pcim_iomap_table(pdev)[0]; + /* ioremap BAR0 - PCI configuration space */ + ndev->cfgspc = pcim_iomap(pdev, 0, 0); + if (!ndev->cfgspc) { + dev_err(&pdev->dev, "Failed to ioremap BAR 0\n"); + ret = -ENOMEM; + goto err_clear_master; + } /* Put the IDT driver data pointer to the PCI-device private pointer */ pci_set_drvdata(pdev, ndev); From patchwork Thu Aug 1 17:46:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816195 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 E0A851BDABB for ; Thu, 1 Aug 2024 17:46:45 +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=1722534407; cv=none; b=Ruz10Cb3aAnD7C7bLmoZkflP0CS//b7mfrRJobvM0nY/mK/N1JqfVzWMxG/9DljZ7Xh6u04JJMhgRU+Ui/UDzly3J+WHhSOcF1mYCjGG4wCh1QPBN4fuvwEkKUT7Oitdtv+Sz/J2wCekHjjHwRhjVquKrH4dXH9ruF22e6L0tb4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534407; c=relaxed/simple; bh=4GexEWYmB++TVKtf95ojSGSSevwi4ufn2RVpQzXAHG8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Bhc8Th6tasNFLupZXxh1/uBuib9HWHM4qzOeCTRDcKsa0gFxMDfQ0qSC60DDwrlzoNq0JjxtaEH1CUTlrmksS3xCJhKe2YwBHu9qClKmjRa22k70gyyu8vPl7Dc8hgraed1Gq+MMJl/txEw98F2tbFw6CSwNwE17fLB2Gqkg7NE= 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=IGxthnr9; 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="IGxthnr9" 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-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n5hpd+G0LExVaxl+UI//CFwTq02L8uYAsSV7qLlWbdA=; b=IGxthnr95n5stNJiIORDU67MANtdEh9nc8NhXZvQP8kT7BnSdmtZSkLWTCR2Q/OUIYMn9o N7EFf39SENb4XJf1oVhNhCkk7VdudY6dE2XR5LX8/s/d37kehaTaCL9acfM0Wii8QgwvVk OSpJKaAa3SvRpV6C5r+4POG5TQuCniA= 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-148-diQKMir7OYCxF4kcsS09xQ-1; Thu, 01 Aug 2024 13:46:43 -0400 X-MC-Unique: diQKMir7OYCxF4kcsS09xQ-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5a0f73ff43cso1109916a12.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=1722534403; x=1723139203; 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=KHREbLakSmiwN323CB8AymZl2OweLYwoUeC3PqltxFs+HyDiQQh/QwKt5gtSidUsTc dV8lGSnVheAqB7mhnU9ewIG1FKtCdvzBeuDvdDvznZ1lwBH343blTtGIMAGB2f0aHKLr MqsYAfeH9k7PL1soAf+gsWiiH+pAWYGZJnnhc43t0vX+PF371Ne2aJgIlgwl/WKfsVY3 xczB08wmZ4Wv2MBVImqzZqpyQDqgjZO6z02xrtHXZLhzWFGsu9VE4t7x0IeRhtLJhdXd zDQ4B2Ibc4I9gJ6AHtG9ogF7bfQqN8sTd+6dhLalQQPe6hJVO+e61PWsJSJ1Xj5Hdmlm /3eQ== X-Forwarded-Encrypted: i=1; AJvYcCVf1R8GWiCqM8nLdHAvgfFmlC7vCf4Ih/Gn/zHj944hMueWa9HIkNlSMQhxzqshUWAcTo6YMejLxSaBV7uO3LrzDXRizljGm6UuXXSy X-Gm-Message-State: AOJu0YyWOMYoXKH/TgQsHPgiyNAgbt67w5dDnztaknU9my83coDgX9bc rI4/rrCsiYdvYZ7gfNJV1whCJPWcOpcy4U0AxH1ZUMoJvTFu2HqTT4lThfw24JkL/B6gfZBdMak 5hDdOhgfRPca7kV/9hQ6mgRGsrzjMtjkhmwDzK1dmHCI8HVByPv1VyGARAoOpWg== X-Received: by 2002:a17:906:cad7:b0:a7a:ac5f:bbeb with SMTP id a640c23a62f3a-a7dc4d9510emr40292866b.1.1722534402508; 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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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; card = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL); @@ -711,13 +710,16 @@ static int rp2_probe(struct pci_dev *pdev, if (rc) return rc; - rc = pcim_iomap_regions_request_all(pdev, 0x03, DRV_NAME); + rc = pcim_request_all_regions(pdev, DRV_NAME); if (rc) return rc; - bars = pcim_iomap_table(pdev); - card->bar0 = bars[0]; - card->bar1 = bars[1]; + card->bar0 = pcim_iomap(pdev, 0, 0); + if (!card->bar0) + return -ENOMEM; + card->bar1 = pcim_iomap(pdev, 1, 0); + if (!card->bar1) + return -ENOMEM; card->pdev = pdev; rp2_decode_cap(id, &card->n_ports, &card->smpte); From patchwork Thu Aug 1 17:46:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816194 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 E96761BF31D for ; Thu, 1 Aug 2024 17:46:49 +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=1722534411; cv=none; b=CjXdejx9ajlAKbUrAz9D4a7oZcJU6mqv2SL/LcPo8+sSZ8vIp7Oed6gUwO64omZUw+tUAUVdDXYg4Z87A9xqGyp2EWtMlnak4HXrY+EIA3GE2Vfl3b/5sUJJLTrbvIeAVBt/mQQkH12a4lk6PRLMDPhQFHcLj+s6PCkhUZ50d34= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534411; c=relaxed/simple; bh=PowKNNK7ntiN8fDRwJEfgWzFgO0JzDMOq63Tm65TlRE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cOBe1NbnQFqvba820nBHhaDr9BV0fbLW2jg0Yv5ySubANtSIbzPc09RAZavKOOOZJgnomi1APvJ+6Pe8UzW7mS8EVD24zO9NPs0SwJZhXPy0r7gi1xcYF/MCIrMRGNyp8rfzAzKoDPbtv8nkQDQ7zl13HVcfRL/J/nYswX+xQEk= 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=TO6NjUtp; 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="TO6NjUtp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4T8HAVKVFIndb0epInGCIUNTvqCq3Yx0Jxliq8oDWAI=; b=TO6NjUtp8eJFArRAcqRS5u7gleedxqO1yITdMCaIIEHQ81z0EDymWjX4rdwMnmM+NyJ9ni l35wDqxSubPbNXh5WM71E7r8zlYEAb4gprGED6nKg71o2I4stdcDyzb+Y3jUghBiJZGFgB KN4K9iWGyXqd3heAZngLd0yc/30cJEc= 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-77-B1kE2JLENqev-bucWnhZKA-1; Thu, 01 Aug 2024 13:46:45 -0400 X-MC-Unique: B1kE2JLENqev-bucWnhZKA-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a0d7d02a8aso1130002a12.2 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=K1Eow0jstgA7jCVSCEbx9Ku9mW5Av8SL65bj2FocfssA4eFoD8mxGOVMJYfSNzGyWn 0pjGmAP6QMloigOVg2r0VQuXwFBnnRsMp0ZhpG3eQPus+OXdCBQy09ZBHbwdGigiA94i hEC4AQPYSw0NGKSE0EnXcdJmDrbQChQjKo0B2ui4Up5yl97z7QHKbrkITBWVSp9frzgL DyrgGdEJXk6IBVML5mn/LKUcDhUdmAFT6C7ztdPSdBXDewifqpS15AhWlnXwxXvECidX Y5P46JQaRrioYJVJ+hqu9wpAnyOclMPnl3tYL+oNt8MK/zrfDKHHoOV6WFEd5bLqjDpt oSWg== X-Forwarded-Encrypted: i=1; AJvYcCVIFbRFf1lmJpTkCWKenIo3SsDkqy7h/x1Bk3m2i7chDyUHe6QElXPjOLdOGbORO1mXcx9oAFEFY4E22lBMPOqntu6dribpzboyXsTx X-Gm-Message-State: AOJu0YzNE4VVwE6elAPzfxVyyyK9o4/meS0gpdIptTINZwL51i5DL5mv SW/3gonZe6/QrJsuwATQ1MWX9H01Ax/Jcw9o8K7Iv8cHEj0ggQzWhnR9tnG5AbYj56kV3LvLtiM 3CdoC+lB+GkDE4BAu4RB0/jFU6L8RXeyvr1jHoStjG6gK6JYXN+WRpEYXf+YpdA== X-Received: by 2002:a17:906:d551:b0:a7a:acae:341b with SMTP id a640c23a62f3a-a7dc511b140mr44580766b.9.1722534404428; 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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=0; ivolumePhase[i] = 0; - err = pcim_iomap_regions_request_all(pci, 1 << 0, "korg1212"); + err = pcim_request_all_regions(pci, "korg1212"); if (err < 0) return err; @@ -2128,7 +2128,9 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci) korg1212->iomem2, iomem2_size, stateName[korg1212->cardState]); - korg1212->iobase = pcim_iomap_table(pci)[0]; + korg1212->iobase = pcim_iomap(pci, 0, 0); + if (!korg1212->iobase) + return -ENOMEM; err = devm_request_irq(&pci->dev, pci->irq, snd_korg1212_interrupt, IRQF_SHARED, From patchwork Thu Aug 1 17:46:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 816603 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 B48181BF334 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=PmZL7lFRSsq8g7AIleM5KTfJbLAR4MSEAXcgMfkQD7iMnA2Y9ZLUwR7bQuCuuOikDAR4+Pryf0Mzk8NKutHwRZZNMNi+42tfWj49Z0k0F2H5JXy/GJm1tnHvfw1f4fdOW8+6REfjjauFjLHntu71VIge4UP6MwnQXLnWqF+cUt8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722534412; c=relaxed/simple; bh=Pv8ODNDYtz7oEjKERVc6wlqFHzZSZy1QxJE4IhyOR4w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NwgEzA/OCrS5vTSEQXwJ5GFmajanSnrpnZNDmbkMkJtTLa2pu2CIKz1ogkk5HMaOhKbPqgXAz4Mm5wZskxrEOSyp1zEmhMph9ij3d1O44jGHy0/RiDILk+e77geXa8+b2D0UBGW4vEWRHtTRF6SvQrBlm07JtdQRtmnoxi5VsOc= 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=baLE1982; 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="baLE1982" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722534409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=09zJhy4Kbly6dnOSxC9RhwbbIyB3cmvAQjfFuNCxLhY=; b=baLE1982ABl0rzGTuVc+O73xtULRLKqAshgxDyc8sonahiApxqUu0538j2sLKdCd8JNh9b ObbygA0crGVw4yuF7lhRwOxsby/Hu0wDqPTdYeBJmlar/EFpFRze5uK7Z8JuQ0Nu1/Pb/1 rFxahWh4PHRoI+7A5SN71ZLLUa03gAo= 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-505-2Q7pKsx_Pu6aiHCBOAF-Zw-1; Thu, 01 Aug 2024 13:46:47 -0400 X-MC-Unique: 2Q7pKsx_Pu6aiHCBOAF-Zw-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a281e55710so1547328a12.1 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=rbGGTMmEyo7YnMWVq94xdyqp3WC+BvN8b+vA/vzrLgOJrWgDW3eOe4efimjXYGMYxr Asc0uObaql+Hluqbvbq0XDeKmq/ZNSjPXa0PQJ4kaxJih6IqaY9U0jntxhsXf8LlkZtT gaOKIYTY0hlWtOJxygtDmaPh1LBRhO0o9IjACP0DnGy9eTfv9oBCpzceKcJrfm/2u4Ow IV1beB1eCieQ61wto7MYmxiF3Bv9OlEP2ym2N7IimxEIwGI1liZA8lb3lvqwPDZ4Ei2R AsPLhq3w8eR0BReEbwTPr58hxBfvKnhnSkMHBpgfRXxoYW1a3JnSQSn0HMkPFXfVkjrn A4cQ== X-Forwarded-Encrypted: i=1; AJvYcCWoLCcZs+PkWSgQ91IZj143X50ZEsOwx/uTb9HDhiLjldyZVR3wai7avU1uoXfJmHBLaBmx6airuRgDfqbWcweHPfB5ZdoKO7QEnRK6 X-Gm-Message-State: AOJu0YzyX3jPmcT/vMsIP7OYttEdk9iCY7xLLDGXvnCQlaOpC0ebMIcr YQJWqATYvn6Q3kfVfbym0vRlBhRAuVgl7D9sfJB1Y3FGZ9rBvdPcyGJph9hwaShG7QaD5T6pM2s X2hHSr9Fq6RPkWU4woWWaP4MiGPz6+zzZ2GoChSSbJ8Gtkq8zjIY4I+6OSJNiYA== X-Received: by 2002:a17:907:2d8a:b0:a7a:8378:6253 with SMTP id a640c23a62f3a-a7dc506e7f3mr47116866b.6.1722534406245; 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_Kleine-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_J=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-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 --- .../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/Documentation/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 BARs 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, const char *name) } EXPORT_SYMBOL(pcim_request_all_regions); -/** - * pcim_iomap_regions_request_all - Request all BARs and iomap specified ones - * (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 = pcim_request_all_regions(pdev, name); - if (ret != 0) - return ret; - - for (bar = 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 = bar > 0 ? -EINVAL : -ENOMEM; - legacy_iomap_table = (void __iomem **)pcim_iomap_table(pdev); - - while (--bar >= 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 bar, 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);