From patchwork Mon Aug 5 08:01:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 817019 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 1ACF65FBBA for ; Mon, 5 Aug 2024 08:02:08 +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=1722844930; cv=none; b=en2AJSQC53Vni0gg3sp4RLQpbIM39DnPNZxZbcJJbRH5M467IPaYioZn0m70q9lmLa4S4WpL7CvvdG3ywNFHo3nB7eznyHSsfTogftYbJavulhYcun3pHjQxmSDW91ww/cCCwHcM8Iyq6lAA8YqCkDU9bM8+m8sNkSz1mVtsksg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844930; c=relaxed/simple; bh=PMvC17bGpWpI73UNcLQbu72jMyBfAq60m2YMRm7gpdE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ea+j5ffBzIDg/yurnRXoxl8JfYYZMACwL13CPQdiimUUA1bPpfBBfR0c01mtXQ09lZH0kzOPZ5mqzvUdCGq/RByRzMfGJPB+3l+gbTPGb4kN2G4OxN2IPDnBihJuLXBFvb99mbjlSiwvTDYFIRprpgBZwwa7TVMYuWq3DDgLi6I= 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=gXi+XNLM; 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="gXi+XNLM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844928; 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=fCKgXS8g88Bg2YGymWSAuOupDyZ6pDfS4Oy1WWS2It4=; b=gXi+XNLMSBgLHWnmAVK77YRC0zZLiJRMYocKcpLSngEEGHuQv/Bw6ORm50lGqDJukjmLNp pmMe9V9+YjMKdAz9l2Vs84LvXmMxMsJaWltNazxQU8QAGNXFjBprRzzwYrqS4LSzpF4t4n KAuTjgaJdlEhnn9ZNOvN4q48wNtjI4w= 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-81-ozhOpM49MlG6HK47nNKHTQ-1; Mon, 05 Aug 2024 04:02:07 -0400 X-MC-Unique: ozhOpM49MlG6HK47nNKHTQ-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5a0e93ebc78so1527679a12.3 for ; Mon, 05 Aug 2024 01:02:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844926; x=1723449726; 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=fCKgXS8g88Bg2YGymWSAuOupDyZ6pDfS4Oy1WWS2It4=; b=FCFD8m8DQnl1rYN1zcm9XLMHExhXo9X8ahYs0NV3vquv5xuu1rKOhu80mgLrhcAjWe 3mA67tkvGEZwxWjv3GuAY7nzoFMTVav6ON4sYf/YHbdiOkBJW8aQie13sYvc7r6rvCiw 245zpRhZ5tVuqC4jXPinpnOXyXljxfdMDNK2N0sRgVWHK/gIdMT1S2mqO8DmLHZVH697 MmPSwMvmUvNvJXksCVa8eBfM7B0iTo+BWrboNGJelVuFtKcLRtcsd7ypjAPOV5LRB2Dz +cvmfX8XaPeiheg+LtIxyIZTv2pmrOpSIy2Htx2CHWMKtMUiJWtR9sROERnsHbtEJzvn UVSw== X-Forwarded-Encrypted: i=1; AJvYcCUtcTpo1JHQ4qP9cfMXQQ1AC8uvptJO3Ss05o+8zrhOwZMDtnKAHXgs+UZHkBYpdSAmR7i8+u8Y+S0e3/VAalBpBiUQmBcSe+alHXpl3QM= X-Gm-Message-State: AOJu0Yxp7dRYSGDBfVN1xba21seVHJI8wKn+bGe9Gvj4ofWu49bZszHD nZ+CIs+AspoZbdP619uwZ62DtBraCOBS0wBoSdkqw68D8aV07grOvYQY99aSEIqjNX6JVuIFenO nq1kBP17gyukG6r9EUplhR2vhuRukapSRy33uXrIMzxDz/pFRNaHTfiE6RDrT27s+ X-Received: by 2002:a17:906:cac7:b0:a7a:ab8a:38b with SMTP id a640c23a62f3a-a7dc50a036emr405428666b.7.1722844925262; Mon, 05 Aug 2024 01:02:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8B0uAdpCjmN8RXKqb6GrkT9cJblAYXyonWs0YpjO3v6slHT4MqkSoaoDsG7XIcg/iI+6TwA== X-Received: by 2002:a17:906:cac7:b0:a7a:ab8a:38b with SMTP id a640c23a62f3a-a7dc50a036emr405424666b.7.1722844924726; Mon, 05 Aug 2024 01:02:04 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:04 -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 v2 01/10] PCI: Make pcim_request_all_regions() a public function Date: Mon, 5 Aug 2024 10:01:28 +0200 Message-ID: <20240805080150.9739-3-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Mon Aug 5 08:01:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 818069 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 D6A7C1509A5 for ; Mon, 5 Aug 2024 08:02:11 +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=1722844933; cv=none; b=LZCDnWcc4kJnWCcxTgAEY4k7FN/GKb68pMPntQ0hPPVGvrs6jCzfoUCopH4DtGJWypw1S9yZgkzLWeyYRF1z+3ArQtnzyc8Idw6KSTjPJVgZKuBupya9S6g/F32p4OqkeVgt6HzYIl01qERBSenBOK3gdCNyD7rYDXgrCnC6BoA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844933; c=relaxed/simple; bh=zFYt4YA/nxrpBwmvCREd85ce7Gyci93GVdK3Ep0M2pA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eBJ8CuQpYdHyisWpfWFM5UQEKGTeOh5SgmQFiVpDiRcLj7NrF/RXIsIADd03mEDyaTwsTag/9aHYdFiIuxGZkJfPAdD9ledPo1j/q9Wz+gzusjpg+1XYDydkSaZYAFiRo9j/Sl60DT9AX9rFSgqJpM/Bs82BJyhGiVCraNJBv0I= 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=bEgTZ285; 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="bEgTZ285" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844930; 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=18fF+PB7j6Y1mDUBH32CYamjOEignK7RbqTPKzQv2/I=; b=bEgTZ285B2m3nrSYwgg8AlNP7l2KHr6ILDI6y3gRdC64aMkfKXoIw984HoXUIIQPTsGfK1 FjMzRhWWzqpqmbJvsqrnZWVoKMgeiIU/1Eybvi/q6tiR7NazRhbbmUDOo4PB71/cq6IDno mXfZmC8PCbuZlYGo7BbMXSiZEBNj9ec= 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-312-GNyeEQRbOnqc8KyK6ceIQw-1; Mon, 05 Aug 2024 04:02:08 -0400 X-MC-Unique: GNyeEQRbOnqc8KyK6ceIQw-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-58b1fe1cd9eso1900578a12.3 for ; Mon, 05 Aug 2024 01:02:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844927; x=1723449727; 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=18fF+PB7j6Y1mDUBH32CYamjOEignK7RbqTPKzQv2/I=; b=ChDwC7on8DMKZRuPT0kJSWHSuSPwI1WjyoSN9tVE3zlCyD53+GIU/hkHLtkY/6bAZy OtHDJec9vkL+zKub01KlwHOFVNkRJdJOzBCvmkp3oFqNy7BMF5p/DZtWg7CnHmlUtI4R HV1hTe4OojHZz652ykkLukUVclcBOJ32vxWlUZOWiM812YI8T7mYXnad8ANhgXIYMYCw DiTbkoWwh92MFfEJtFnSNYxGSOKzs7OiPnZdbiJF2hfC5c70jWoIwm3AVmidkkUwanbT ZXuevPajDy/0m/+1oAQ/UXrNOWS7/hlGJw/vlKkacJrpnrZhzj8c96XAuXSIWSEJY31K Kwgg== X-Forwarded-Encrypted: i=1; AJvYcCWIFmni37ZyjYyqzFzZgPPaIDJvgmvWVKVODhhKjKcdmhIOiNUVK4bB1Wly3AQkpSkZs2VHqYIwInF9MosBHw==@vger.kernel.org X-Gm-Message-State: AOJu0YwftNwBMz3BVan54w84z/l1+YvpS4hByv1BoK5g2NR1KIAOFAab gXHZlwtcheL+ckTJeu3ww+fZXmnv15PhiJ8CWOl+HXxMyOEOOzFgZszV59UaEgz8KLCDXFh0XM+ CvnTdcZ0+bHosBB6x4gJ6C8Ag/md/sgP+DfbFbhakHmhQSugMdlCHFqXAu6ZdJLCz X-Received: by 2002:a17:907:3da7:b0:a7d:a4d2:a2a7 with SMTP id a640c23a62f3a-a7dc4e50c01mr456318966b.3.1722844927327; Mon, 05 Aug 2024 01:02:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHkXCT45DdZBHWQzoU0ORUWv+2ODBb2GUKjo+7GIEAxb39igJSvCRB2n7e9CZjTjRwueB8GGw== X-Received: by 2002:a17:907:3da7:b0:a7d:a4d2:a2a7 with SMTP id a640c23a62f3a-a7dc4e50c01mr456317566b.3.1722844926788; Mon, 05 Aug 2024 01:02:06 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:06 -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 v2 02/10] ata: ahci: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:29 +0200 Message-ID: <20240805080150.9739-4-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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, 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 Mon Aug 5 08:01:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 817018 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 F1B9A153BF8 for ; Mon, 5 Aug 2024 08:02:13 +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=1722844935; cv=none; b=LtAbNMNOOz8YaRRr43xVSwkZpLyyPC6oD+LBXyQJK8rLwQxdZQ862a5wI1ougwVfaEICVaRvVAZ2BjUrSKX5gf9g0nzoXE4yM1ugV7umcYRAamJJlVw0yOnOXEXgcuFAneSVEIEunRAL/lHPbXhX953qhV0yOGZgl+nj+YAJZaA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844935; c=relaxed/simple; bh=o+aKZkNhYSkxjsiBLxN92YZQoCjUKOLuz8fa+WUkC9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eKWBbVEb4/8jkFRMmCXOlDP9S7N9S7aSejNBIO7X1T3i/vYI1zNrcw58DPRjV7V2cQEZYGcu/l2qmHW62kedXqQbK54AkPc/sQR2Q8V2Y4S1qJGUXStTPUYEpe9vObQpeH1OoAk0CYAYGj2N1l/qdeCwhtlJsLCHEiDmYtB5l3s= 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=WYyGq1IZ; 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="WYyGq1IZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844933; 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=WYyGq1IZlq9gStSKqmW/ZmdDhUW+mtD41lsrgafqq8kvdHgxLfcwu6cLiv9eMKXMpTiqwa 6Y+3lrWj2pqly7RQaIp+R3YN4oIEg/4RjpG0guabltkMmsKFLUUj54UqerSlB0J83i3S3n aWzU4+s9kxlU8QwCMN6l3nnFtsj0MSA= 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-207-9YjpQY0tM0mFnSz7XzQh-Q-1; Mon, 05 Aug 2024 04:02:11 -0400 X-MC-Unique: 9YjpQY0tM0mFnSz7XzQh-Q-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-52f89aa7019so1007869e87.2 for ; Mon, 05 Aug 2024 01:02:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844930; x=1723449730; 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=J8Gloh4S2bmzZa8YHRUoHzKo5R7QEi1L/GUABCvwX1yPZajRV46rNo6I6ZZe2C39z6 HnK4Tvi2QCnGfZdlbNMQkvc/aYb16oI6hJ9KljSITQNVbUFBwxypvtjP508HDjQbPzZL Ggq6NyhvTK65tUFpajVEKVp15kG7C67R6aHrAUc2r81dUVVSU57k2ICTyrIE5FjoJwgk nv1ErWvHDSRlNCi6vH8Vy+9swMf7vo6UPu3twlAj4fNE06p8yf7QqEVuxogD9DOIo7wi tmdI8zSAsoeY8+bDGQEP82adiSB3AwIx7on6VgMVamtEsicquaLfTtu1Ig0jcWkj35jg Ou4w== X-Forwarded-Encrypted: i=1; AJvYcCVJoCjPqTpHdQAqcn+71VxYSroPtfSA5JpRo/VUxPtdlVu1K1PEC5vekiO6+96VtGdqwHMj/VPpuT4hKIV4/Q==@vger.kernel.org X-Gm-Message-State: AOJu0Yyd9RDn3EFjRVU5Q50nss8X6LUFtYpJsiJI9c3BZi3Trd5Si7MD LYlIMH2fTBoquyAxuXqLd8nNUnBUralPBxHt2NdI01GU2pxLcpIczlBI6i7DM2vQw5WH4u1Mo48 PAV5Nmg37LSQuDkILyDdTXSa2Vg5Q7L+irRRZ/dPjyDNQsqtHd4QIdsulXD5pXBLL X-Received: by 2002:a05:6512:2828:b0:52e:93d9:8f39 with SMTP id 2adb3069b0e04-530bb3813f6mr3610710e87.3.1722844929281; Mon, 05 Aug 2024 01:02:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZSQjMt/3VkbWFUtV5g6ia/+URDLy3tOpCumDaNeyTb8b7/S19GgTcmw6UBXa+EC6uh4peLA== X-Received: by 2002:a05:6512:2828:b0:52e:93d9:8f39 with SMTP id 2adb3069b0e04-530bb3813f6mr3610684e87.3.1722844928639; Mon, 05 Aug 2024 01:02:08 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:08 -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 v2 03/10] crypto: qat - replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:30 +0200 Message-ID: <20240805080150.9739-5-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Mon Aug 5 08:01:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 818068 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 DB4EB1547C5 for ; Mon, 5 Aug 2024 08:02:14 +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=1722844936; cv=none; b=lACjHgctpWidMsTI/VFdA3GlYhNa9d5uN6acI8nc0EWH6YrVzlEUwQHoAm17unQzxgBb8r8UvQUluB57GXzMJYp73kmSvnuTDT+NJUqNWUxeZrrQBF60McXZpdTInTF0sw+jPGp3pzHT1bA0OyBEfh2ZkQkslbDlFr/5d1T1ldE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844936; c=relaxed/simple; bh=sx3ZEwTjacZymq7l5dYNsMmwiEx06cPeBRmHfSff+fI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M/dnp8z4jAwP+zoRo3/iIaEbKIlIUqg/z/RsMOO6Icicvl+vCRCQOfX5u42QMdVbvO6wiqONezu3QtdcNA8bZ24XyvEnKHSs4aPNuRsmZSuMuRk/ZZAo0MxPHpRG8kadR8Dinu2qBmfDHqH4p/G2Sp8Ic+bAWUqvklWwFktk5sw= 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=BKlfW4A9; 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="BKlfW4A9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844933; 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=i/TqVki/K+bVEwX1UU3KMe0GQzdgKV3EwUwnH23Fjlo=; b=BKlfW4A9EkNtkMnLLFw7UYhr/ufm/lTE0ZtqHlsyd2ch8fpeYd36OPtgRcKO+8LOVFv3ZH OB3kXtcIzLv1Lg8pyhXJ2raa+FYjDBYN/I/DoMndAIaOYPQXeJ75UsBC+QdA34EUNAZ8C7 8wfU/BSdwv1K5vpEdp1wt0iee9J8iCo= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-137-AfBWLZgsPImcuduHyTJf-Q-1; Mon, 05 Aug 2024 04:02:12 -0400 X-MC-Unique: AfBWLZgsPImcuduHyTJf-Q-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a77cd5611c5so79461066b.2 for ; Mon, 05 Aug 2024 01:02:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844931; x=1723449731; 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=i/TqVki/K+bVEwX1UU3KMe0GQzdgKV3EwUwnH23Fjlo=; b=JDmbLP96dBV+ymkOwGRzScphYoIPl44cHVDZitN9pXlQbqQ6l+cgYdBwA0m+DuqUy4 +fjLFBZ6P6PGcnFhLr9bD8u12g5JAMreAKy5ki97WMO7W5hXH8mXegCw7A332LuEaWtr KNt619W7fqAg5ap6pJRb9CiQjO4fFusuYcGa0rz6ZS3haIvSv+lZxt9/FiZpcUIpG4CQ dtRqE4KVaNlEavp0VixvKsEFbU4Ue7odT5w8z76L8xO5TWcpTpbiyqun1Wm8ScT3XVEe HXwEgNWekeWjUEJhVLt+E5OKtdjiFJZKJ+ckRfLK4DU5oFa4UL62OnLOFwRxtw6cVZOZ xiOA== X-Forwarded-Encrypted: i=1; AJvYcCXY7vUtDb9U344Qu6SLeRpuPkljN3fs0uRRR+ABCfI/y01YlxTvpYJ+HhlrS0ag5SaincGaohguzsmggmpvZw==@vger.kernel.org X-Gm-Message-State: AOJu0Yz6IcSHe/etkjH9zbRBvOFzADSgX3cGA3rv0kE+lle0ZbwVIi9m wJEVcMmdag76/uZ/GNi5/gmAKzWQ6WjfC6ypl3VpbHAuOMKs8fk3Guf+cUtwP4MSb9GofCDA3IT KI5FvtP7JpXEQGPpsGXrFtp5Gbf03KMLlGo/GEnTCyRls6ydt+Xf4Jj3E+WXv/mFr X-Received: by 2002:a17:907:3faa:b0:a7d:a4d2:a2c2 with SMTP id a640c23a62f3a-a7dc5167bcfmr402226266b.10.1722844931026; Mon, 05 Aug 2024 01:02:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYjjLsJD48h2GecBYBR7wt9098g8Cow53ABCQrETBiWavHTFkjy//1sxrj05YHxx3EiitJTQ== X-Received: by 2002:a17:907:3faa:b0:a7d:a4d2:a2c2 with SMTP id a640c23a62f3a-a7dc5167bcfmr402222366b.10.1722844930599; Mon, 05 Aug 2024 01:02:10 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:10 -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 v2 04/10] crypto: marvell - replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:31 +0200 Message-ID: <20240805080150.9739-6-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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..94d0e73e42de 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c @@ -739,18 +739,22 @@ static int otx2_cptpf_probe(struct pci_dev *pdev, dev_err(dev, "Unable to get usable DMA configuration\n"); goto clear_drvdata; } - /* Map PF's configuration registers */ - err = 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) { + err = -ENOMEM; + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", err); + 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..d0b6ee901f62 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c @@ -358,9 +358,8 @@ static int otx2_cptvf_probe(struct pci_dev *pdev, dev_err(dev, "Unable to get usable DMA configuration\n"); goto clear_drvdata; } - /* Map VF's configuration registers */ - ret = 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) { + ret = -ENOMEM; + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", ret); + goto clear_drvdata; + } otx2_cpt_set_hw_caps(pdev, &cptvf->cap_flag); From patchwork Mon Aug 5 08:01:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 817017 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 276B51552FC for ; Mon, 5 Aug 2024 08:02:17 +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=1722844938; cv=none; b=hu99oMRtGqT5tF3V/VbKPNqwEA9/u+JLv/5/x5zb09p8ysnPS+DRUsuCP8gLdML6TD5S7nrBE1RMctv/SS1teXSb/YYGMvJbvfTIZh1a+eSQ0IcfqRFrhtSJQBIvHmhQZrI9LlTXz8TwgewImNUg9iMJfeHDAUcvjcgvwWUFu30= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844938; c=relaxed/simple; bh=T/Lr5R3ZpRsNgk4LNzf4i3JOmIq6wzNv8zvkRdHooAQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=La27ptZY2uCXZxbHuomPGdjPKkSHVeiQRCWeTVARHtwaKkIGOHEnPyopKuxKfNXUx5HMYWf2mAQUy+Ym0JQSsHht9kDaOb2aAD8JZhtV0mhaM0/51Uh3L2K6Ie6hjTf6Y6MjkKE+pnIDHnV3+umz6eHxPq+O84xJIUJRZrSJjZ0= 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=JOHj6gTS; 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="JOHj6gTS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844936; 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=JOHj6gTSxw2RHUI3fLDTy2KoN14j6gEqkXxo/Y/jmfl7g40YvTc108L7xM7vteXDGjF2uA pJ291aZvBDpMd6NqVgFhkyS3hTsnJnTIk5+zvZ4/Dfr8KPB9LW3k4b3vwSuTD0v5igK4Qz +tbzWQ6tV82P+XkTaWdx+jEuPcOIAuQ= 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-386-ggwB1IMjPMK1irMuc2ACOA-1; Mon, 05 Aug 2024 04:02:14 -0400 X-MC-Unique: ggwB1IMjPMK1irMuc2ACOA-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52f89aa7019so1007877e87.2 for ; Mon, 05 Aug 2024 01:02:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844933; x=1723449733; 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=wWNaYPfiM60zZQew+PlIk6c99WHo3X7xmA6cV5AMRPozgf69ZHPvCgM7g+9ZH+97ZC 4TOxcu7BxYu//mhNADJyI/aPALT+of6uGFZMvnaeOp3XrabOLgZzaq1dhZ13/GPes4mK SLi/7TlpPrY524oNwVFmiSYUh0JGVqJIFElMEtASJOQvixBWvwGi5HspkJ6xFZK9Rh2u qTWpcqQv2PkCdK7540t0IZyobJKr5Il51w4R1Jy+gI/MQBWVuHZXMKktU2StLTXwJg8G 94B/8vAjFptpnr36rjH5msqvvcorR7q+enJikgHtEARY7WJwp775/zJU5KcAopwt0Os9 TDiw== X-Forwarded-Encrypted: i=1; AJvYcCW2zC2rhV17wMkf24DgfRfMkme/xsfKGe2u7AdPCk+gmDtfrNL/LonvE5NVihQINhbnAYEmM9vnpCfkSux+YA==@vger.kernel.org X-Gm-Message-State: AOJu0YyJvfrS2eSvO/Dk44hXXO40CeDcw7moIbej3icsYKqEQxD+zHTa I+uZGCJtaClds1l9KOfj8WITKaNY3r0Vvm+TsT86Kn1vfFM/W+YRnLBJ0FukqpfcIflZopOK2mI smwFD5guV62z6YjZrT9eLZLUhQTWDLlLMKrbdKLhzsRkbTP4ULsy1Ant8rBlWKuBA X-Received: by 2002:a05:6512:1307:b0:52e:ccf5:7c3e with SMTP id 2adb3069b0e04-530bb3bd143mr3696336e87.7.1722844933150; Mon, 05 Aug 2024 01:02:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwcaUohyPPqlQalc7Ds7xBVbw16Nwe2cO8DiX+lGZ7pO2pVwTP2h5T41+23RRZFgk9XX2iTg== X-Received: by 2002:a05:6512:1307:b0:52e:ccf5:7c3e with SMTP id 2adb3069b0e04-530bb3bd143mr3696318e87.7.1722844932669; Mon, 05 Aug 2024 01:02:12 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:12 -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 v2 05/10] intel_th: pci: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:32 +0200 Message-ID: <20240805080150.9739-7-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Mon Aug 5 08:01:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 818067 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 A4498156862 for ; Mon, 5 Aug 2024 08:02:20 +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=1722844942; cv=none; b=IuxHuRIVxXOQ1P9T6GSvLQsWHOP08uIGo/hoVIfg+/coKlgB9VQHOUMWzeRMLhOQZpjwW++3YnGFksJbfMHqLNMV+SEkrNCzTADRd09iDpogyDYyFZOoKyWGWi0g8Ud3XRhVWLNnEp8/Eeomd4yQrfcj3qMvTlEXrE8YrutNaS0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844942; c=relaxed/simple; bh=Yo+Ns2b3URhNU5TB+CvEDymuFVQ4WXMZyjfGA5NqkhE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KsW0Mfxh6FUtTEWKTnyajkewQjIrHlqOzWTmj+VYpM3U3C7T6IN219jA4VKkUrcYcNFAFVu7P939m41yKZI5q1xsw1LaZcU81hcUG8BBva5DcVupf6gs0M6eTRDFsYMA2jzSE/GOAECR3ZyvLlvpx54V/kJUn71oixjn1ByHZgk= 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=V5G3sj3M; 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="V5G3sj3M" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844939; 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=V5G3sj3MkUOA87kGLPR3oSzmqobG157A4LOli+OGJw2g7ML8dUVZCkfDBwhQ82I8MnKUQ3 H5OwAjFeH6vNMOZpmnCX3AnOiEUzQ6zmgKS8wBiQwCLXqKaES9JR9ZJ5B98ajdPR/Wx0tn pupetqzaOvUcE7mKqzU9ZGCPvEORGe8= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-611-VhQdcpjANti3zzDeOuxq7w-1; Mon, 05 Aug 2024 04:02:16 -0400 X-MC-Unique: VhQdcpjANti3zzDeOuxq7w-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a77cd5611c5so79463066b.2 for ; Mon, 05 Aug 2024 01:02:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844935; x=1723449735; 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=ksdLm4ARx/ijmt4KmiFRSo4t28sbI+spuloH4IfBogReOxG+zRVCcpeSF9tPihjF+g GoY5+nOH1wCfsxzLbolR3RKRxsfb9ANJsN4IGOBWAe+6763848riRocJKwpk2DuZZZCT XGFKk8oXNtSLsNKfpd3/QZEtCC0vfcXijX7VSggwbZQJ+0owOXZegSe2YPTb9bqOKX5Q pdhTvyOwf95qwXpqKvK5GhOyax+RGoZdib+pSD8zSkBOSaVOkear6DE3x47A6SMO69be kjrxCJhoY03Q59fLGsaw4UdyGJTRBj91GGqwjzclpBYc0q0MjH3tvNcVbrdtXjYfsiTZ 7BtQ== X-Forwarded-Encrypted: i=1; AJvYcCWOxGp2J7VdlaR1/CXiKl3plRxnitYao3kzvcShS5E9ywMRZ3WXkxhTNoi2vNKCm90jIp1ipSUnn45TFaiddA==@vger.kernel.org X-Gm-Message-State: AOJu0YwH65Bttp4EmiwxEbrjB9tZDK9frtzhTBG7fZPqbxoULLEgPb2n vXJvvpOIwpHwhWi+qrPXs57/B54sy1d12EdyknwEZzL0u/qo+3MqMo947PdvoN5UT7zfPXSmeN1 AzMDHVBMVshL6kVAdELWHCtzSSfsFPLka/7NK6giC6zekTW8D2lKexF9mtottd/LK X-Received: by 2002:a17:906:f583:b0:a7a:81bb:ceeb with SMTP id a640c23a62f3a-a7dc4ae7defmr473033566b.0.1722844935124; Mon, 05 Aug 2024 01:02:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKuHik2ajcs17LmubcaIaCUkrAqH7M1NRkgMmBZVBefF6pfGv29aIhP8ECYMtriJwflIFmgg== X-Received: by 2002:a17:906:f583:b0:a7a:81bb:ceeb with SMTP id a640c23a62f3a-a7dc4ae7defmr473031766b.0.1722844934632; Mon, 05 Aug 2024 01:02:14 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:14 -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 v2 06/10] wifi: iwlwifi: replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:33 +0200 Message-ID: <20240805080150.9739-8-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Mon Aug 5 08:01:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 818066 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 4C957156F48 for ; Mon, 5 Aug 2024 08:02:23 +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=1722844946; cv=none; b=KkS+J+JoiVY5kTngv8mV9Qcyb1kWThmdBxO+czKoaUH3FRq2of448seIdoaaktBnCeh9uZUkcTJnjI3r4/ooFpVScbTZOBfGqEv9q1OiCf4tAAfxdQfB5ZuMt6IwUdG8sT8QmlryvY3QCfEVRl3JxfyRO69OFqkqsQxZQ9MxaFQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844946; c=relaxed/simple; bh=7JtiDzH4j1fn6e/l1CbreMTpZlhxa3kkuVFDYh4FXvw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ARWlY5bnkJQll41oYDJNVZvUS3N0sicbFVqLkfds7BcjWloPmTJaKzFBnKo+das7hchbkDdQc7msJs/uSPWEpCQzcaAIO7sSBTjKQXmVn17QkqpZvqfFdYLz8Gzwv17hRb2Dg01cFUxwOmryPPHXtcdE70SgJHbV622EXhWig10= 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=cPFM5mTU; 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="cPFM5mTU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844942; 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=0WfVVRPiytk6PFyUBJOpMrU1ppuGmgzu2AH1RznbocA=; b=cPFM5mTUYh4Rg/0b2WuVBruhiaVw1B+a9T7M7qsUKzFYwktKNm4wgelznogy8/GkTwqzKo bUD6J7mdT5iZUoE0XGoRCQhd2Nhd8obg8HJbZDwn0R2dISaG0YHZW4YIh1HC6Ul+/mAZVX z54hhz5TQCY+93XJ1HeFdafIRYchfYw= 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-582--mHcw7CjNI2Gbfl6sN9N2A-1; Mon, 05 Aug 2024 04:02:18 -0400 X-MC-Unique: -mHcw7CjNI2Gbfl6sN9N2A-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a77cd5611c5so79464766b.2 for ; Mon, 05 Aug 2024 01:02:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844937; x=1723449737; 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=0WfVVRPiytk6PFyUBJOpMrU1ppuGmgzu2AH1RznbocA=; b=dPxqXJvKjJxShRA9opAizsqh4QaspWNzNAOKUxc9LzgrnS/7nPGZ+LTTM9xtKSyAoR jAKI3t0tMoblM2oNBAViEDQiJ79P5pfskD++1tL7qWGveJFS959+eEgr/bC2bT4YzVms 1+TiWlyFv0DZYpmhMem+/ydAZEZupRSZOXIkfYdl58Bsqwy5wOIkXhzupAZE5K9vfDsx Qq1oih1N+Hz5U358X18ZuEG2vr90bPOCLk1K9Wsbu2ioUD4mj6c7Ush2ftok0aDBmy4r ejZAx4vFD9fi3cd4f4hdr84EHkQIfD+dW1fYujxkg9/YjqLVdzqSvOJmRmLsr0PzW7d7 +EZg== X-Forwarded-Encrypted: i=1; AJvYcCUkkevtoWjzkzUsBFCP/ThZJ/9PlGNw/eK8WrTkb//H9N0ogUXBvs9rm123OOS+Yz4i/FFuyWryTeFPdLUmig==@vger.kernel.org X-Gm-Message-State: AOJu0Yzq1adv0vnvcjOMrtoOZ+mfCdIxoLP161COGWAuY8Jbsy5UsY13 mPG561JtC4uRf06UMAqDa/1E7tJlnSmRFY315qvL1bbjOWdrJJXpNg54sbkSxCacbjpywwBQKMm kE+XsgHcnm7npiT4BxvzbM+bGONjtvKK3oeoZ8PSO6ZS+AhhWjIIz03c89B3z49wS X-Received: by 2002:a17:906:794b:b0:a7a:87b3:722f with SMTP id a640c23a62f3a-a7dc4e50c8fmr559112766b.3.1722844937222; Mon, 05 Aug 2024 01:02:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG76bxvYb5Yaoc3VRVGn0E6yzVD6z6UB6d1yYJXJ3VBKVznVuoeO63AJt78w0QvkxaZORLkrA== X-Received: by 2002:a17:906:794b:b0:a7a:87b3:722f with SMTP id a640c23a62f3a-a7dc4e50c8fmr559107866b.3.1722844936734; Mon, 05 Aug 2024 01:02:16 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:16 -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 v2 07/10] ntb: idt: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:34 +0200 Message-ID: <20240805080150.9739-9-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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_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 Mon Aug 5 08:01:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 817016 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 EAB40156F3B for ; Mon, 5 Aug 2024 08:02:22 +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=1722844945; cv=none; b=rpBkcUK4zau880K+H3pLl4kwW6eJj4OzKs9BtnTxZKECW65yazF3Mj+xiX+wIufI+G0bcCax4KDinULU4BOg6H/pQiE4nLEfyoeTM+pYUjBAdjRL4kX0afFXg1IQZrGm1zdLY9wHtP4lG0HXHjrXVu3uDJYkKl1eLmxxE6OuC8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844945; c=relaxed/simple; bh=XVnRSeomOV2CcZ6TomefmLqSPd3/SQ4wMxlPfANkowI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p/C5X7xuvVt8Ep9fXomgkxFYnvAMNOf10y1ZvZ4IniYa2r/xmx6m9kQmRTHTnVkCjcvh+sVHgpNbePWGcA6QqWrkiDMiXnLyYGdGy/uO3Px6KtzompeOKEstPBSYUpv1sCUhgkygGg4fVdqVRmGrCJ/p98KniHx0/sfw4edqh1w= 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=fKOi/YdI; 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="fKOi/YdI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844942; 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=f0/Bizm19ADXNR3ICrhb9w7/UmlF3K0oMXeQfztA/nw=; b=fKOi/YdIvMMl9tg2rB6KEuJA0uSMPr0XNP/wch/ZTY0SsXHmvTacfoT8HZaWkNhky3qaVY NJiXzjLwBxMJ0FpDMSdjFqMQCRYwx7D5qg4kO8o0ls/eNmQWhJrQjise5zy9mhA6431ZT6 ZrNEbQa0/G9mB6kjy/T0luLLc+K3D7w= 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-631-q9pFl5kUORqtGvs4aYuGpw-1; Mon, 05 Aug 2024 04:02:20 -0400 X-MC-Unique: q9pFl5kUORqtGvs4aYuGpw-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a11cd40426so1597355a12.1 for ; Mon, 05 Aug 2024 01:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844939; x=1723449739; 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=f0/Bizm19ADXNR3ICrhb9w7/UmlF3K0oMXeQfztA/nw=; b=p5PYNgjPiZGJQ89kAWCo+IP3blCoGOWrEuT/RvOYmlynUtaM3TZsyD/GzDSoic6mTs FYEwoblASlMc11poMZzZAEVI3vECwa0w/oe9zLZAoezvVxXN4XzhddrkFSMpuDbJ2mPs Nnhf1IShfxkBo8SweKKsB4urmpE9yygqdrvlZBowOigQghZu004b1W44JxNZj05xBOHF Jzp+dBuCLbGagyPjMH7rSzmO4knAZ8wNsgJj45dhkpG+fMcZUls9Slct0wBw9kuB+LZA V/x019WmtHWvqIBBDEv8ixBVu3DSHOzOR8QIxTV/jccDiVnXGFc1+WVETBpxK+w4EmzE IzuQ== X-Forwarded-Encrypted: i=1; AJvYcCXN+5fAMcuKNBMuUZKY65rZT5yArzjn8GKIE7SkB3OBm8MWO1Zxxc9Zvemp7W/8n8hTimABM0q37O54fV8jdA==@vger.kernel.org X-Gm-Message-State: AOJu0Yx0abxPio70V6yOf4mgLloe1XZqw0SoYKMumu0i70OvDVgUzZNy c/i2Lg7lWqk0wOyRpAPMHc7oCnUOQ1JAKOlcZ8sypmUs2aeLfPIR+MCv1/EjOQcTbj+ZsSmPdMf AGJVDsYO1k4bmpMCTR6evFbLtjfEsUwcO30bWYduHftgyOcgvsVU9wa2U3pmXc+fA X-Received: by 2002:a17:907:6d06:b0:a7a:b895:6571 with SMTP id a640c23a62f3a-a7dc51b4cf1mr513585666b.9.1722844939189; Mon, 05 Aug 2024 01:02:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8SJB/SW4G2idNXeZQo9TGP1SQwm7yFqzOP7n5lB+7g8ap58Lk3/dgBFHgiZuUlpVVamp1Nw== X-Received: by 2002:a17:907:6d06:b0:a7a:b895:6571 with SMTP id a640c23a62f3a-a7dc51b4cf1mr513582166b.9.1722844938741; Mon, 05 Aug 2024 01:02:18 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:18 -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 v2 08/10] serial: rp2: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:35 +0200 Message-ID: <20240805080150.9739-10-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Mon Aug 5 08:01:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 818065 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 E860F14E2DF for ; Mon, 5 Aug 2024 08:02:28 +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=1722844950; cv=none; b=HhQqFQl03rvYRDEygjaLNxv9Cu2ldGLbgzXkoDrehsRiWA67A3oyz4x93ScLBAq7Fr16imaC4iElsoQ2DEGK5zBhIb6PQBldmGar+o5ZsZ26up0xtJcfy/5ATtsYjq2+gNokGiNA1F4zTUrj1qTDqyaPEw/ATBNOOOwUlPsarno= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844950; c=relaxed/simple; bh=eDX/oUhvMuTvOdEU35gML3pMZ3bHnmTWwtIB4yn4vRc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l246AAk/gqsSteHNoIxaxe41Wr+oJ1qX4LVL0tc4EvD+p/MIwvy9L0eO7ugUsUr/Txewq3dZWQZGTDL6j1UYRqz4FbzeNDtgwoVDugUv1ovW516UrsIY6/aqtYjIys0qUfkcUSHB6aXXnXXd8Ha5k+QksmHbR0rzITQ8Bz9c68k= 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=Lpgiwlw6; 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="Lpgiwlw6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844948; 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=6elIcVAva6IdGos3xrpBxA061GwStf3eghsSoUI+FxU=; b=Lpgiwlw6Yzni8oZdZsXAJZKU51WMQbOAlS0RMvSm3eAgKu8INGw4B48EtTu0AfsmrIvM+R vRVytD+85GTW9hYl3mYN3N9K8YTN2yZsSn6Ww6K84evLqyW4mV49WzMiVhiAtN10dvFmba RNpimBuZ7P8vG8bJLgSXudsQycPz5iw= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-bKuDX4VeMtG-qw2DAgByEg-1; Mon, 05 Aug 2024 04:02:22 -0400 X-MC-Unique: bKuDX4VeMtG-qw2DAgByEg-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a77cd5611c5so79467566b.2 for ; Mon, 05 Aug 2024 01:02:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844941; x=1723449741; 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=6elIcVAva6IdGos3xrpBxA061GwStf3eghsSoUI+FxU=; b=KqowN82c77APLZ8tl22yCKAZjCnHw/GFIo1RTanJsjVZc3XsdtkOMO0O31V7nv2lGH wXaJpcZSKamHdlxyDd7KDV6QKRQNQBmoX+xwdpTOwc2zthdXLkyxvrxyWx6Lzv1RPBQQ 8RAoamKQH2jiIaeenkQWJarpaBVfn/gH7/0GY8gYay310ZhvAKIHCApSO9gss9baAWjV 5Z4viDrNFldkD7CEb0/gp8sTvABcoPs9M9bFt9A4ZtjRSSpWEVUxR+wdd4pqMErj8Pye 76ul4zFCXP8RxKYxvKZRh4uuyLeoYb1dHACsr4UK1YrulSl8BLIcMLkQoMLDOF6sWkRN 6Bjw== X-Forwarded-Encrypted: i=1; AJvYcCWGetbsSysu0hb1c4lSXEdflKotKztoDVV1hlKoBswgWewGMrbTUbLy8wYEIdGdKMeDpIoSyZXl4kZ6Ho457A==@vger.kernel.org X-Gm-Message-State: AOJu0YxZeRyasWCMOlRgWnzBFBs63HFZYLMKzADQ4bkwkQMhKtkCL19K sA3sOvaVOj/TeFpXqOqPfson1+NSCJXqmAtLLBCwPDwvQvZyXGuYcdIb2ze7qKTIM6U5tmKP3XF 748VJHRuPY9dtT4faQM1t29ss4i+QVqqxgAl05m4GT+q0LLeMeiQLeLhOXcVrAAzT X-Received: by 2002:a17:906:bc0b:b0:a7a:9a78:4b5e with SMTP id a640c23a62f3a-a7dc50ff341mr387930966b.8.1722844941120; Mon, 05 Aug 2024 01:02:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkK5Lt7n9jXqXSSRLA1PwUtBlM1U1xQiwgfbtLyFZ2DIUDAUIZgCzu48VuDRqWx5Z3WdARVA== X-Received: by 2002:a17:906:bc0b:b0:a7a:9a78:4b5e with SMTP id a640c23a62f3a-a7dc50ff341mr387928066b.8.1722844940701; Mon, 05 Aug 2024 01:02:20 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:20 -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, Takashi Iwai Subject: [PATCH v2 09/10] ALSA: korg1212: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:36 +0200 Message-ID: <20240805080150.9739-11-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Mon Aug 5 08:01:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 817015 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 04142158862 for ; Mon, 5 Aug 2024 08:02:27 +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=1722844949; cv=none; b=OGhdmyxvoIbIcMQpmgom+LOpZyLGJJH8Xz3g7pTfpVcFDqcbq/TfpNrSsDeWCPJp+gzcC/ZS5aZ3fDm6XZVDDfT4rHMYG5yHSDbtrvsZduq+FeHW/EZKBUUwJLm6jekHl35j/YmbQwfmYw1kxF3mdXadCfVpo9vqqiklISPoJQo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844949; c=relaxed/simple; bh=+Vm9OnIcejlQrHC+fUOsuOHdlE3r5QhdQyIHmCJJHiM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=trwFj3O6sgrtoM+ZQ3qgVIArfAYhpBblxdy5fhu2OdArslZprH4Ip0v1bKwbl6vT6z9ECHJHmvuYsF+A0Gyzz5RvsZHhGK5CF/Pb8zV4Fg4vzVCMrjNW+G260GIqXXH9Ql0JzBSN1wyK9U67Th0ECKrg/dsCQ8uPaMwbFeeUIYY= 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=Ymo3/Sfb; 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="Ymo3/Sfb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844947; 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=vfEZOSpUlm3iGBljRVh5bMCTZxfFQAshsGvE6Xk1c3w=; b=Ymo3/Sfb00v3W1xD4flStcGCsA4uDvOm3M794C68WmP00uMIxt7pnEI6oOvKQyHfD3GRI8 /3ZTYBNh0lHMlwdCI5Xgsb6+KQFtWz8SEddYAlaZPaQqV/1oj6Kv8UVpNXDvwtxT5T5Ion ye6817f7k8kWz0Dd2rLZcRYw+HFyLiQ= 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-629-msPWfQxsMK-rkgMWpzZoTw-1; Mon, 05 Aug 2024 04:02:26 -0400 X-MC-Unique: msPWfQxsMK-rkgMWpzZoTw-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52f03635146so1225862e87.1 for ; Mon, 05 Aug 2024 01:02:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844944; x=1723449744; 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=vfEZOSpUlm3iGBljRVh5bMCTZxfFQAshsGvE6Xk1c3w=; b=mXumBRZbBNx9syD/hduAEiEizaGk5m+JbDCovDfadx3jU2XpWKZdvsL243Vbm8E2sj i8EQYT1sTi5vO0WDI3HvOMMDIA+xKzKHXqwjFM/U7/XeqhPCpEsUufm1x0icUfQ5B3LM 4zMC6u7fgQHn+m5YUWEzS4Np/pkFAa4MgRvMZtK6DKjKWN/LONW8lmaCq8b2wC3g95J1 j7Q3kMlGJ1R5savkyry6A/aYLE19L76gCigdtEr87RJ2Ny2FxNgG3RrXl5NSfGPbPDrh /c+uJG7lh4i0xcjmQYZZ6FcPAhQ4jwj6IOAFlcaYdJQSAljBnSb3+CfU794D8a/7kO0o Brxw== X-Forwarded-Encrypted: i=1; AJvYcCUq8A4bVEIexBcNWuaEWpv/R3eCA1R772Dibp57WBVj2PEeTtIjWuZfkSBD6k7AYv05Mwtniby7LSW+hY3VPA==@vger.kernel.org X-Gm-Message-State: AOJu0YxX5fdb7h7hJE4gBVHiJ8vZsU9tCfEqxCydhZI4iZiFGKn/upnO /6sVtjGZdmTE4dVLq5kao3WL+130YILuhdvfxJ4bjLPp+JFe9y48XIlFGPCnX/5eBEgSim2U3Wv Cge+zihbyJf9qiMEpoCMoTMdq+boSdjjIAha2u1nmzZP1jklofA/5OdtiSYgS3x+N X-Received: by 2002:a05:6512:3a6:b0:530:bc24:bfc4 with SMTP id 2adb3069b0e04-530bc24c039mr3271832e87.2.1722844943092; Mon, 05 Aug 2024 01:02:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLrQUH6nLB0tosEaFXlZobSC/44isugq3n0Zf5l544zGhgNP/6Ntw7hCPDneElIUaU4eFGBw== X-Received: by 2002:a05:6512:3a6:b0:530:bc24:bfc4 with SMTP id 2adb3069b0e04-530bc24c039mr3271816e87.2.1722844942669; Mon, 05 Aug 2024 01:02:22 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:22 -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 v2 10/10] PCI: Remove pcim_iomap_regions_request_all() Date: Mon, 5 Aug 2024 10:01:37 +0200 Message-ID: <20240805080150.9739-12-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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/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);