From patchwork Fri Aug 16 08:22:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13765747 X-Patchwork-Delegate: johannes@sipsolutions.net 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 BBFFD1411FD for ; Fri, 16 Aug 2024 08:23:23 +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=1723796605; cv=none; b=ufaWxow2KyrDsNYeh8PvHki5puvuKKHPdalmVFc56ioFK4F8HsOGb4xGNdHiOdJk6AYaGHK5PmloP8PNOcCPPDl4LUYYz4V4ISHgL7WMKdGMoD3GKxr71vW1EcMaEDJrPrKXam4uLMAr0cKMKO/iZildgdxxsnaMJYaOC6VnZfI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796605; c=relaxed/simple; bh=zVpmTTp3nHIzVMoh7ZTo5T9lcWciVJTr4ZCcBW5jOkM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t6hEwk+WFCxlV/8ESBQ+I+cBDaPdn555ZUBQNRJR9g4ElsMCI5Fwq7mvtS92DeRze3LTo1TQYLUrcTBR1krgFfZi6HMIhZyUEzAdnGcbaUx9XrX+ccSncoHtP0JpUqNpaeSHoF4OYI0iXw+b7W7uSQL2EBrYDOmEsINDLZUMwOI= 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=Gslm1Z99; 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="Gslm1Z99" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796602; 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=QzzbkcE2piNg6xzdXbcpa+EEzchmMoLeUr0sOfHpsDw=; b=Gslm1Z99ht0Mo9R3X+VkIn61al+De5R2Jg9dSHOzXIu5xoC94gn4DqeS3Z5eHgLax+wwea JFE8i34FcJ+tFCo+5FOkUYpix2ivbKVUkILdZnrRjbGoRb7xlMVMrS4G/OylhJWHP4Bwr3 U1JoXUSoSdZbFSkevjhW140Z5c8JY34= 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-467-Rs6z8rEoMo-d5HLY9vAADw-1; Fri, 16 Aug 2024 04:23:20 -0400 X-MC-Unique: Rs6z8rEoMo-d5HLY9vAADw-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-532ffe0530fso251129e87.0 for ; Fri, 16 Aug 2024 01:23:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796599; x=1724401399; 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=QzzbkcE2piNg6xzdXbcpa+EEzchmMoLeUr0sOfHpsDw=; b=G0l3U0U71Mq6ej13QrBQE8a1gdzTbkN+uV6Dl1dfCxGdz0CCJIvYRGj3+7hK/7Ji/c PZxhBpfeo7rFm9UwDef5ierrXyMhaT0ejVXZilHGteqj4dcc8NFFVfVqohLhTCJ8r0DU SF+wATcGZSV3CFNeX9yntzz9w5qf2kJppgxMYjoUnrPbUrpPi6A4F2TiaVXt+xlDR6H8 DnK5Aux9eRK5OvGwGRYT8TaIZe9fRNyruwpF2InJ8RWIcomBgPIE7lXro/C3FkimDLd9 iIMLu8xJlhffKzWWdl7C8g8Kui+pGs3dtiVUSsUHjgji+69VfbCrKVGdcDWFJODIms9L FFWg== X-Forwarded-Encrypted: i=1; AJvYcCU/U8oSbCBbGLiAFEdBp5El2gQpzzltZkp5BAMXi9uZvSPtTWtaxgbt71w2wsAsFMGU110JQPbytZ4Rya0JSQ==@vger.kernel.org X-Gm-Message-State: AOJu0YzcGRv2+OQeSaStk3ERh73VP3Ryt30NDy8QROGCgvAxBoBwGLad DPv5PW+YcukV67R+qIUDY32MKsqjPJdoOCx+VUVeAvnCYLUq+0GgxY8TXaDe3PR14cGSY+80TgB wVmfZD0e4INFsC+mCpliEvwJ3oMOU/sX4xjNflVZyaZUKvJaGb2VvTX0eEo7xTACb X-Received: by 2002:a2e:a99c:0:b0:2ef:2b1f:180b with SMTP id 38308e7fff4ca-2f3be617274mr8424531fa.8.1723796598801; Fri, 16 Aug 2024 01:23:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFF2FO8TTO68hZ1mL0fNAPSpkGVq8q42PLCiERNm/y+Oi4rSP5Phgl2zzK0/6kEjJzXbloZGQ== X-Received: by 2002:a2e:a99c:0:b0:2ef:2b1f:180b with SMTP id 38308e7fff4ca-2f3be617274mr8424331fa.8.1723796598136; Fri, 16 Aug 2024 01:23:18 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:17 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, Damien Le Moal Subject: [PATCH v3 01/10] PCI: Make pcim_request_all_regions() a public function Date: Fri, 16 Aug 2024 10:22:53 +0200 Message-ID: <20240816082304.14115-2-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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 Fri Aug 16 08:22:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13765748 X-Patchwork-Delegate: johannes@sipsolutions.net 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 C6AB61422D9 for ; Fri, 16 Aug 2024 08:23:24 +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=1723796606; cv=none; b=Nh2AddiGTRaTbauEKlNwqeXFBzd2O96F9i6511ywC+RSkbz2Pl8YlQWqAXbJJZ77xFlNQC649qJFTuZ3TH0XLjtwSqih6zZNj5kcrRifW0ey0kM3ZnR3LShvccMIR5zo38AsbzpCcgqeLydRzR2kqzVVo5fRca6siyS4fTRq5h0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796606; c=relaxed/simple; bh=Ikcj7wgv1Qy7Ju+LDfxPN1stK4YmeslVnLGGvivdxCY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DxUhvnGkYZu0+8i6bef+WaLsqZ+RDPNqpoB4JVwEYDC39MFql6S34+G7UeBWDc8qxzHbZ5QyWx2kD3sU/xSeJJloCePHKZRGY4Fs0ZeblAypCC9d94RCTdq2ibEfgAEdwq/ugXFzQl+AdIfnOkYMAnV5I0poN75qh1MSykRPw88= 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=K3ruAMDU; 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="K3ruAMDU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796603; 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=2Ef5N9W9keJdc7289wDsRj77u8AEBs4t25pZcN+UHEE=; b=K3ruAMDUnMoAqeWnM5g9c45fWyt71lKScuuHnb2ijUwD0ffWGCxhBCLApdVXMITirm6b1P edGqFkQ2WZlNkJY3nSDdYmJsqV4xd00lER6MxDDYqo4srW0P4sDebCaWkbnEkuXC+XpIs1 jn8gqGmteVixTpXzgEgZwfeSHw7g1DI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-e7gHIX-1NO6RW31LkLtTXQ-1; Fri, 16 Aug 2024 04:23:21 -0400 X-MC-Unique: e7gHIX-1NO6RW31LkLtTXQ-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-428f1b437ecso2841865e9.1 for ; Fri, 16 Aug 2024 01:23:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796600; x=1724401400; 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=2Ef5N9W9keJdc7289wDsRj77u8AEBs4t25pZcN+UHEE=; b=PvNdldbCxqQYAjvAutwJtwiw4ebCqEXc1XFZw2tiOZrcIxlubAa+6VuthD6FtCDBua r/hKZCD6kZak23mJvBTOG5Vnx86g/Vle9Km1FXylQnrRWWJIdDcx9B/KtCSk3d3GJ9Uv NwWtH01Rz4D/ejhrMxdeFKgkxEr61IYbp4jYpERH5JUbWvkZ8G0awZDZOIMK0QWUa8Mj /faovX3dDUElJMjXXhKWrnNZH6SWQpaWVuWoxVW5jPFSjbfIPk04tO1c9Z3iAGsq5nNl v8862H+OCbjBGCi06Y0EZTGNsnLy/ALWgJJ/h9wHlXw+onqllMVT/c26klXfDYFOvwli MIqA== X-Forwarded-Encrypted: i=1; AJvYcCUmr1chwd+NpGspWr+nrSOsfOL3awKjskwau7zAFaoy8F1TNYqiB6nqBQdTkCOiPN2HYFtrgcvuKAzWRWy9Lw==@vger.kernel.org X-Gm-Message-State: AOJu0YzVOUuvSDg5hRv/l1FZ3oL8tJt/rOH/PU7oZrxqUqWwgYeuTVJC MfaL4nz2dp1t+DNIkSt+34ORnCa7340roNM+97XPGIthl25ZqF+YEuvcasmOgHhQscY+UHGGjuB YRUb76ZfNp72RqymWsJii+D9WGkp4Jw+Z7KI51RwD3TBPTV5JxWYeY2x9rJt7ur5F X-Received: by 2002:a05:600c:1caa:b0:428:f17:6baf with SMTP id 5b1f17b1804b1-429ed804c49mr7811145e9.5.1723796600480; Fri, 16 Aug 2024 01:23:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGY7UBCI1axMKugeuOlpxXQ22mIFbmo/Y4hXDeHcVX7LbB5fmB/syx5dg9fQZbtyc6sqI9maA== X-Received: by 2002:a05:600c:1caa:b0:428:f17:6baf with SMTP id 5b1f17b1804b1-429ed804c49mr7810945e9.5.1723796599910; Fri, 16 Aug 2024 01:23:19 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:19 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, Damien Le Moal Subject: [PATCH v3 02/10] ata: ahci: Replace deprecated PCI functions Date: Fri, 16 Aug 2024 10:22:54 +0200 Message-ID: <20240816082304.14115-3-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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 Fri Aug 16 08:22:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13765749 X-Patchwork-Delegate: johannes@sipsolutions.net 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 147071411DF for ; Fri, 16 Aug 2024 08:23:25 +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=1723796607; cv=none; b=kg8RogeDPrx9Z6+zn3cxtC+H05vx/BKRoVxR4Bzvdruppr3cahSuRJuSVsK2TSWleEFtlNfsDRqtw7LgstuyIphmhYHPqmGRZuRYZRP8EssTvMELRp5FioxgeAgH87IV5vCHY1Fd/wLPnailhW33AG6q6wmWUIDupyJktfcjeOs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796607; c=relaxed/simple; bh=wM05ae8D3UuZifrUxCpIru2FFRjjTKagh2EM//t8yrQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AwSp6u75M6MSRh6isOsZ+TjbAHonYpXsjgh3mGZYHlD92H/LS14l5/lkZKPUBNiXvVYRK3QiFbXjAZkYf7hdISgSH1fqWtG4v1cnu36qmbcPLV9dG7L6pUQw2dwKvPVJ35Tnr2+ruNGmhqzTjmtkHlZyR0ne0XCJsikkG+ZNqtg= 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=WH+6kEOI; 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="WH+6kEOI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796604; 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=2fpJy1lqrVe6gM2rEMBvOKeSve8p82wXsKs5wR8bnTE=; b=WH+6kEOIKkeKhhtVTHr575oCNZTvEMuz+NAIOI6pSbeWDYV6yYryvYc5/afj+oN58CIFG6 simRMVaJsjXGXrCShYx5fufy0Kw/R7JNW+6c4Wsv4plU+UfEVNOXDA8cgzuFTP6INCfxuO DC+Vnk0vZZPbJVqoobE74zvPhUUuWDQ= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-259-N6HZ41LGOTSdHmVyvl0hsQ-1; Fri, 16 Aug 2024 04:23:23 -0400 X-MC-Unique: N6HZ41LGOTSdHmVyvl0hsQ-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-429e937ed37so2344665e9.3 for ; Fri, 16 Aug 2024 01:23:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796602; x=1724401402; 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=2fpJy1lqrVe6gM2rEMBvOKeSve8p82wXsKs5wR8bnTE=; b=j05ScGFX+JLEytwQSEgPAfI4BUXwA/kpwXnt5NBVLLmSlMXdzyeaS2WNt3LASVgKFh hw8EqaJXd/LZvJzF2nqVH/BJmLigyuUds/kOuvXKqXH7UOdI63Ks001YI2UJ0Y1IRwtp p6y70/D+suyDTVFGroppTfwPrMvbL1/wZrL2IfI8WFLSdgX1vHNwH1Vv/01z/48TbIu3 nUKaY4WA6+O/8vtf5Q2W/JJDdfGdexo6gxqlxWSVmi2NwQxG9Bvciq02UDDy7AYjdlqd id9jWkfmiNqgI47UtkIDjuToX3EdN3e0V+kvWa001uT7mt58EwK5LAF9ESdv/r0DY9/J Ziaw== X-Forwarded-Encrypted: i=1; AJvYcCV/FSyYFe1MOGwX8gMAdpC9xDGF/+YVCSm+embEqc/+p2kHUuHe33lCumPDkG1rGkQLlsh2Vq17d6KPt4vUlQ==@vger.kernel.org X-Gm-Message-State: AOJu0YwRyDNks1BkTgsqy9zYw5C2PW6SA2PZ2ragJuqd2JReqstfyOts zwblR3r9r0rKSgm7uzAdS5pcRJi7Vun3mwCQqrQTxe1Q+uVVhO1MiJgSVSTkE/k2dvy+5gHmY6F Kqm6bBFIWKAJx03FvpydAqoGnU+jX4Id4PmPck11fUDlqsfv+q9/BqFfQjThIu2ce X-Received: by 2002:a05:600c:1caa:b0:428:f17:6baf with SMTP id 5b1f17b1804b1-429ed804c49mr7811915e9.5.1723796601795; Fri, 16 Aug 2024 01:23:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUuXgUmb6wsgxs0xbUjuA+/5zZucO0eruF9dJY3Cca3/xum+COZyAHgME34FsQCOC4m52Ppg== X-Received: by 2002:a05:600c:1caa:b0:428:f17:6baf with SMTP id 5b1f17b1804b1-429ed804c49mr7811555e9.5.1723796601388; Fri, 16 Aug 2024 01:23:21 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:21 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 03/10] crypto: qat - replace deprecated PCI functions Date: Fri, 16 Aug 2024 10:22:55 +0200 Message-ID: <20240816082304.14115-4-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_420xx/adf_drv.c | 11 ++++++++--- drivers/crypto/intel/qat/qat_4xxx/adf_drv.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_420xx/adf_drv.c b/drivers/crypto/intel/qat/qat_420xx/adf_drv.c index 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 Fri Aug 16 08:22:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13765750 X-Patchwork-Delegate: johannes@sipsolutions.net 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 329871459F6 for ; Fri, 16 Aug 2024 08:23:27 +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=1723796609; cv=none; b=E67riZEE0yZnsVFWVvuaQJUu0pt6+VNpOZ/5VjaU5FVk0pq0zAoDFeT7an1r1LwHRSKTD5dBb/GFWapPV23m8CfbpEiqrEHw/eYPpAg1L7mCUvyFFB8twM4zZWaWWxkmXO0lOVGcshGsx2e8aPEn/RcvBU5J+7XTISfP+m6iFEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796609; c=relaxed/simple; bh=xKAvNOGbgRJHGNVobngUeE6l3k1n1HAKWh4bGb29i8o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H8J1NzSMpyJ5WmjWcufgCxr9ukQiz7cC5i2Gd63x353FMyQ/iJ8eHv1M2mIIu9y3ceDlvmfolvyRjwdZXkRI2MdvIGTIxu4Xw5Bp6iHUkWlnD5xXuifGDu4JfpCmQxlZdcntwW2lCTCDcWCBj/YXCpcJt9ITZ3wSMUTSq719zUc= 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=M995CCwI; 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="M995CCwI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796606; 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=idBIL1cNTTGhcAk+zwpuj0GurJvuhXTWsWSbkJ3vUdI=; b=M995CCwIAylHRJL16t39VHMy2bdYJm4dedDyPc2LjC/ttDl0PFOSfiONJiwcbQyHoA+f8Q x2mCzXtAGZ4w+5q7RArO2uBZjIBt9CehON1kz2MniYzWe4MC+s/P/bCf1guH3OxMAQThLa 0lljCuBrapQcXb1UbO5VMrn7snft/Vs= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-104-O7nOCKj9MC2in-DLUX2gFQ-1; Fri, 16 Aug 2024 04:23:24 -0400 X-MC-Unique: O7nOCKj9MC2in-DLUX2gFQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3719cda8ec9so15164f8f.3 for ; Fri, 16 Aug 2024 01:23:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796603; x=1724401403; 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=idBIL1cNTTGhcAk+zwpuj0GurJvuhXTWsWSbkJ3vUdI=; b=UgsFzsNXM3jlHbAp9wMOgh+mhc9fj30ie940rJpGKqx98c1LmPBOglpSRa1ICmfJWU S4aP9E2uFF8Y0qIDdJhT8jCS0QBfrs9PenyTOYKbwjMzlZTBvvYYC3SfG8nXhAMXP7RU vOROwt9rn3I04KlHw1NeemWGvwIuSPxcP4C3qrapuvy4KoZFc3FzLyIxnDkVmtx0TvFp ga66nMTKnKmkoFvHPMO9qGNc/ijUYdAyoKCCUIuPB9OFdLHhH9Q78jR1OtnI/K7P/GZw LOYqHiQneSJZcinBPJZmGGApOJrV8AucFSR2SgQOSW+9a/Zs/GMCzAphx1zj1Q40AhMc KnJQ== X-Forwarded-Encrypted: i=1; AJvYcCWLSeB4TvWmR5VM36Hf0GCt7q6IbxGX2ar1TIAcQUPnhEdiLkoFFd9VWkVPxCketXG1Avyxo/35eZ504TfuPg==@vger.kernel.org X-Gm-Message-State: AOJu0Yy5bPTfe7yEDIggr+M/3qFAhU9zScSCl0Z4PSI9tz/Vlu7vaC9D CEUi0YJLK0pZ23tDWZ8HV3L9rLg+PPLx/wFD2FDih4SNVdIILslK+0Y0f6Vio4ydWazXTVKDOl9 Opo0cfJFe0nxakyXVLkd+yyzTQGHL0E5MNeJf98wRiRwDLOYfekOmFdon/qN91ADs X-Received: by 2002:a05:600c:3508:b0:427:9f6c:e4bd with SMTP id 5b1f17b1804b1-429ed82dcd1mr7749655e9.6.1723796603330; Fri, 16 Aug 2024 01:23:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKlPm1rBtWEoi/GBorTZm6wziB5Vs2DwGl6VWjNmzFzWskWquGITgeWGaOB8d0QhM8LFtHSg== X-Received: by 2002:a05:600c:3508:b0:427:9f6c:e4bd with SMTP id 5b1f17b1804b1-429ed82dcd1mr7749405e9.6.1723796602861; Fri, 16 Aug 2024 01:23:22 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:22 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 04/10] crypto: marvell - replace deprecated PCI functions Date: Fri, 16 Aug 2024 10:22:56 +0200 Message-ID: <20240816082304.14115-5-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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 Fri Aug 16 08:22:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13765751 X-Patchwork-Delegate: johannes@sipsolutions.net 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 401CD145B03 for ; Fri, 16 Aug 2024 08:23:29 +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=1723796612; cv=none; b=HKko9S+Nzz+j16SDXIipngjBgdHE0Ng8O5Q1V0lsbikuLpHDvZjiDrQ0sDFdbQjPviV5W57fGDKBxTHDfrIzj5tXLH52ErPaT8i7GsxjkyUufTuV5evB4QIbmyUBClIh0ROguI9GY0jtgPZJTodkK/BXO6UTfH79RdTkgk5hGNI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796612; c=relaxed/simple; bh=e/xNXA1yTLC5LO/DU6nAdSe4pBmM51YQq4u4lTp+8WE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FMj+WK2qyuXd5+l2Qlp8K2cvggiZSb0CENzFtJ5Bo0ykZxX/WEWeZkoMtD//+z8Ra4uzCu3e5+ph6bzj191Hmoq9fVqW89kdOAPtPjKI13U7V9g2EX3Mhn70Wh3yT6aoiAcFNXyp4DdBLs0KJPaUQ0eD0tBAXLGfaCIk0fji7/M= 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=MpTbJ6w8; 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="MpTbJ6w8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796608; 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=9EazSdKY3WHiN/nU9t/dUeUzLBwbhXck+n/540p19lQ=; b=MpTbJ6w8fTkl2N2/bi4caZGXo3VynRhz3NPTfiFQiBjVZaFC/zALPOaOw+dWFWI9qmBvEO MKQv9DgB9mFSgMnm556w6mGeumM+1hPHkYkeRHP6EmkdvCAEqO8Z+tw1aCXalKYMb2PIF8 ya0uI3ECKaq4N1XAYOC9Ea2xl1Td0zM= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-489-KWaVzSTnNF-H-bMQgDhUmA-1; Fri, 16 Aug 2024 04:23:26 -0400 X-MC-Unique: KWaVzSTnNF-H-bMQgDhUmA-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2f3b0b2534eso3540191fa.3 for ; Fri, 16 Aug 2024 01:23:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796605; x=1724401405; 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=9EazSdKY3WHiN/nU9t/dUeUzLBwbhXck+n/540p19lQ=; b=wdgcPgK+PP3M2UY7FSN0G2rFnBk33XTH+D8ytbWV4lF5F/K6VVJ28SZhD81Wkw9i8C AxOFS1jIgbeV+ANhuGq0n8u6B0/O3XPQ9+vjaqJFnjmKyJjE5OdNBwMyOAmwrpT/0M0N 34MU4IYSjCayVvxJGU1J+/pSm4iWLjJsErYazBpovhfoEDIhWOQOuP8fROCW5hRxLKE6 HZJxjjXpRR6IRxfEGjhKVai6U9IXmixojMfjZi2SNhc4/jbYvVraWHu32gXUSirqihZM /2yZcZ3Tp7xZh/E30Mzn2YnXEZOGn4pDdGfvPJRt7Np+n5AUhF9HG+FaKyoa0uATiaUl MMag== X-Forwarded-Encrypted: i=1; AJvYcCWWF+0RUvjqcLJyshpWl/KfnmYbFQ3Foh2DpTNJJmpB86gw9IaA9AMXh74jWj8VsZESO6NDvg+cxwPboXkuew==@vger.kernel.org X-Gm-Message-State: AOJu0YxR3bFzq0/i6mVUAchsq+la8lhFr8mw9uGI0jv5fG+7kmlI5xSo i0RwvJQPbSXfQEO/n/SG2tGaNnlB2fFRMmva1zqYON4szd2WhafuxPmNF77A34P2yH0arDFRWBq u0aAFXT3WLqIvUu8SdZgZlnhfLab42R/Pqawml3FJZKXnaq2Sk85QxKidzmSVctxJ X-Received: by 2002:a2e:bc20:0:b0:2f1:929b:af00 with SMTP id 38308e7fff4ca-2f3be5eaebbmr8846321fa.5.1723796604974; Fri, 16 Aug 2024 01:23:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHe5LhtTKuF5e0aFj41GPtW3c5aIbAINpnbFwxkIoOI0Y9011zLBXt8oeDNyhSHXCnejTiL/g== X-Received: by 2002:a2e:bc20:0:b0:2f1:929b:af00 with SMTP id 38308e7fff4ca-2f3be5eaebbmr8846111fa.5.1723796604362; Fri, 16 Aug 2024 01:23:24 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:24 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 05/10] intel_th: pci: Replace deprecated PCI functions Date: Fri, 16 Aug 2024 10:22:57 +0200 Message-ID: <20240816082304.14115-6-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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 Fri Aug 16 08:22:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13765752 X-Patchwork-Delegate: miriam.rachel.korenblit@intel.com 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 449F6149C78 for ; Fri, 16 Aug 2024 08:23:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796613; cv=none; b=qY1oBjUGdl3AJQC6zZO/5tYDiK6PxEHgT1zQRLGR3IcpgYIpqLux4b4taotzDwAEqJ0H17MMVjRZ/gavQ7jZblbfZuQRt7cE4klAGCvMuKL52EXG0IIk5JyaIiLHAtUeAPztQYlu9VAs7lCO5oW0hWUVYCYVvk+b6MvgeLbIfAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796613; c=relaxed/simple; bh=VxK2Q9rTPaJTkxCUDwKgVr4mTt/G6TMMjXLiVOpU1l8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ISd2k02uJ5GzHtY4tgWQgeiW6tcW8QUUxXiOwOnDsRmJx/qEhfFaQ6FGt/+3/jWAjIax5ErTtLveyHon81qk1StQ96uj2Ltg+XqAw+tLb7apAmxpvoCk/+s0cAQMpc1Oa/jxExqh+yqSrXRRohwqDz3l5Mdi35tqGl7o6n4mfqk= 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=EiImdcE+; 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="EiImdcE+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796610; 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=9vavx9d8Z3lY3D2Y8KLNdQxHUg+4fLRoKF7EdDYKitk=; b=EiImdcE+7HtVRz5d6o2vpumDXS9y7i0S+/C93W+MV3ESLr6EvrjsMFEzIIDTELYBgh3iA9 PNbxitAQBgyGfJk7nSbG1GkGp+DF/+Qa+miFhcK098vIPrDoFMprmt8cbMAKkEvzTsymE7 SiMb20AtKQ+l+yjGbNOnzVV4iso2iYQ= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-13-fQE4FJNiP0yT9wELBIfz9Q-1; Fri, 16 Aug 2024 04:23:28 -0400 X-MC-Unique: fQE4FJNiP0yT9wELBIfz9Q-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-429e937ed37so2344905e9.3 for ; Fri, 16 Aug 2024 01:23:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796607; x=1724401407; 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=9vavx9d8Z3lY3D2Y8KLNdQxHUg+4fLRoKF7EdDYKitk=; b=Hu4puMZ/ffW2/KVnKMRx4QTXgLFqg2eJ7oEtjKL//qz5HPvpzlA47w7JE+ZBUohp/+ UhY2zOPtNhfwXd9lezgBShrl0U91MOxS7HJIkcvxgZIXnMHSJZ6CryenGKPNZ/mUzChx FvxEJQnVBKHsZkeYf8MGYmN0WLkFBPj3fKn1I8/sSCAqxg2NnyOOlOy3/wspfSbSGO8t 4wBPuYafcxO4+nLF7SsyXfR6OUqXFrcmWYETIMItfkCc30su/Dvrqc4S4PvYgIzFzx0S QNUUqfiFuMyWITp5nOg74ywddlmODipQGWhahd3k5TDrVLZy6VOHAgTEkI7ih1zSqCD/ yPhg== X-Forwarded-Encrypted: i=1; AJvYcCVX3HKanbFOrFcdm6aQcEzFd0CgcAcNlqFB65VIxfpLAlCJjXe4Fz+wdtMGKVWhzx0MwI3r/k8qfsekhE4UcQ==@vger.kernel.org X-Gm-Message-State: AOJu0YwhctYK2wz7TV6TQ6zmaYiHs54Mf2xXMK9n5kJAvKx+9yG7vKqV cBs3h/OgpRGpkaR37dkRR7+44Fi6xAmvY5rtrYNbWsDwHYLPt7naaQ3FoJdOaORopQEvmHG2vVT DGCNWJ+mQdAaSn5CsSd7yJVUq16YMfLTfMVbB4FUJo9g9nmZD6n4gS6+yWhEByov5 X-Received: by 2002:a05:600c:4f52:b0:427:9f6f:9c00 with SMTP id 5b1f17b1804b1-429ed820e35mr7943795e9.6.1723796606690; Fri, 16 Aug 2024 01:23:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFH6n0oWvlUqxpyDu61U28p7RR4akODFJTFMNu8jX2SKNBsfpChGB90y3cm5ks0xETivd581Q== X-Received: by 2002:a05:600c:4f52:b0:427:9f6f:9c00 with SMTP id 5b1f17b1804b1-429ed820e35mr7943515e9.6.1723796606233; Fri, 16 Aug 2024 01:23:26 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:25 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 06/10] wifi: iwlwifi: replace deprecated PCI functions Date: Fri, 16 Aug 2024 10:22:58 +0200 Message-ID: <20240816082304.14115-7-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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: Kalle Valo --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 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 Fri Aug 16 08:22: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: 13765753 X-Patchwork-Delegate: johannes@sipsolutions.net 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 8D10514EC4B for ; Fri, 16 Aug 2024 08:23:32 +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=1723796614; cv=none; b=IKPdG/yFy0y99hWHmi0iyCej4O9flaevwlUa/VG8bzSB7m+4XYZMHRMpiB56ddd+GKF/Z7TfzOkp3O67L2G1jkayhAt/V8Y4opZ3u98IF/NFNP7SVvw2OvLoDkdcNYtsgtKP24UbBsBd6FbVg/TY4HCePqGzaD61TZ7s70nUJ/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796614; c=relaxed/simple; bh=eSFUZ1JCsMVzaieqrfZ6sP42002jGDiUhoG3EeqHIyQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MDq5MwUNFEg6MS2rPkL5y9jjHioBpIx2rwKPAIRrlmV6M+JXyvuba0FdzE2R99VdkH5WF3BDMi6mYD7le9I5pK6f6X7H55jZYg7d0+iI/xY3r/2srifR/PrbvjNaHh87mDFLHEs8S6+zyYN84rZtwjofr6rcKrftXlqZJImiq8I= 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=arzs1D00; 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="arzs1D00" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796611; 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=J/TWDUwF4muPiT/wIrowwWqBmpjVYWuLvHzzBlgJVA8=; b=arzs1D00NIESGn4E/Dkpj9vHGi76FkR4/p9p45XbCRRBDRuRrIquMMyZwaNjuRhDgracIx DdKcMNsuYYA9o/52SkGQ8vlzOujE1lZEJohJ43VF2yHlCaNtAm7cEhXB6w5w44vqs5hK7e QRbK229eD8Al3utXKXZpb7NpAUoR9XY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-25-OUHyfx-YMUmTKXo1G4gt-A-1; Fri, 16 Aug 2024 04:23:29 -0400 X-MC-Unique: OUHyfx-YMUmTKXo1G4gt-A-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-427feed9c71so2961595e9.0 for ; Fri, 16 Aug 2024 01:23:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796608; x=1724401408; 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=J/TWDUwF4muPiT/wIrowwWqBmpjVYWuLvHzzBlgJVA8=; b=mVyzFx0zp3Ou8vZDEYiQwVxnkxlKrLYmIDUlHoLjo7pldX3gtjwF1NrVSHLT5Fqopo kPBA3NfkgxP3jzXPNT3+jQoN31x2pk2TkhD8ND7f2XkiO2h1nCljHejdkDFnb9NUc6Un wf+jH6/8JyqHG2y8Z9BLVRnCy73s52RIGU7s9AnGb9FNA2KdpzJOGUN9AU9/jM7+dyH5 yLib66iyKR5vCcWjnF/9LXjrmwM5XA9TDzKoKcsCr0PZYgqwV2l/EncgvyUzrt9zRnwV YNKcH7mxVftwghBE96Zts2mKWfSdShx+v/Ih7K92CRuNkxEMw2BPJiIiSk54hRFIy/nT gMRA== X-Forwarded-Encrypted: i=1; AJvYcCX4VMENm1Wk1Sfx/gtZRA3Gxefs7l7qpWtyon/j54iM5zd4aBoVcOCOv393qReLatK27zLJiglrrEyohipWvw==@vger.kernel.org X-Gm-Message-State: AOJu0Yzk2xf+x9PmF9W881tZAumnlgv50TYpZGeXcY1LiC7QVDr8B/XT 1pm03LSuhe8IyMsnXN8cm8rSWDa1cwFoTAv0Uqjx8x+PiR7GS/LZTe32UjpZCXJjPqEylb35Utt ku60FTLMaigfibVe+QGoPJk5pO9f0icdUmDHmS4un0y/lv6r0yVzxQUm4L6X1e6pR X-Received: by 2002:a05:600c:3c89:b0:427:9f71:16bb with SMTP id 5b1f17b1804b1-429ed81ef7dmr7718605e9.6.1723796608221; Fri, 16 Aug 2024 01:23:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIAo2an9uYuqB4ahCNPXZI8UwawbGrjuMMGbskgXu9LAjCjingMPPNd3Qcq6DzQwqmUyfoww== X-Received: by 2002:a05:600c:3c89:b0:427:9f71:16bb with SMTP id 5b1f17b1804b1-429ed81ef7dmr7718215e9.6.1723796607736; Fri, 16 Aug 2024 01:23:27 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:27 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, Serge Semin Subject: [PATCH v3 07/10] ntb: idt: Replace deprecated PCI functions Date: Fri, 16 Aug 2024 10:22:59 +0200 Message-ID: <20240816082304.14115-8-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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 Fri Aug 16 08:23: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: 13765754 X-Patchwork-Delegate: johannes@sipsolutions.net 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 64D2B154BEC for ; Fri, 16 Aug 2024 08:23: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=1723796616; cv=none; b=CFkdhMRnkNIQrAiDA7puCcihWiiTggKX/rIGCas8/u3k8CcQGP2raiYhLwvTYFinWHdDY/eP1q/11UZ8864ILMjSmk1arqjDwDX1vKF6VAWGoO4ORyCIgxDoYJhw5GX8lES9VHLFRDpSKAOiL3ArHgtMGRGp30RZD8YuIhKuLhk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796616; c=relaxed/simple; bh=YADw69teg6OUTw/9kGSAzVxq8RbBIlzKklSmAwNjgek=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SG0whCtjvyJ4s4earQwHOSbgGdWLeiVg5l2Ipa2QjOYMeOFUJ0ylVNCMXKsrwyglgKfW1wj3e3lIuzewKPAZ9aFHKVH5rQTsiwvlDOR1bE7/qL1N/qaVI0G2GGZymLOoOSjI6udL3nyPvGSY8jz18jUcxK3E6/WSJWZ6rX1UkDo= 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=NhycMhrY; 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="NhycMhrY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796613; 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=wR7g/AUrRep93UkGki3e8tPEClSI97kh3uS4quT0v8M=; b=NhycMhrYjMP7ZidkfzlRlZfIjHEbglpT7ZEbzkKT47aX3Ng/CaPEekKgPpcOA9mOkdNd/X IBwfixvQ/1E8i9zT4RSNwJ2p6VriXXji3FnrNhfybp/T294Bg8iq/83xyD77QTv0sNz1Ro 1bcEi5xwJYw+KKndCJMaKLpNwk1ykoo= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-498-zdb052-kNf66lyd-13z1fQ-1; Fri, 16 Aug 2024 04:23:31 -0400 X-MC-Unique: zdb052-kNf66lyd-13z1fQ-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-52fc215b7f0so237176e87.3 for ; Fri, 16 Aug 2024 01:23:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796610; x=1724401410; 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=wR7g/AUrRep93UkGki3e8tPEClSI97kh3uS4quT0v8M=; b=Yhicz772DLVv3riM8C8GP/U1mDDhRXAU+6ChlGEeetweI/53NXj+nIqkILQWqpRh/7 w72o8bu+MSPkVzO0BUjJusN58GXAcHtTQZhXs0JwU0F4KbxmpREN63B0m7JX9Z3CvZ9y YUsZELp/P6W+L8oou+6/SdrmDCJ4B0yO4zngvJ60fO5DM4rRaoR+gQOCOkVy1e5/hEaU W9NXYBXC8kdLxM0vvFip26XETFEBXEHoylzjl/ex/cFzIL/lGyMZP7i2v42avNWYCQsW CmHpAZe0Jt3tnHw29GzwFsXAnj6fZDynwO6gxM1PL4XpTO9BoWzKbq7Vf3QMNbrXBBqQ KEcQ== X-Forwarded-Encrypted: i=1; AJvYcCUcH8xTSUapw9dnSNhnCz7pR0jAI0yLppO/K0eaproObchyn1MYfwytO7ljD2PUNWyogx6XuQ3OMUQK8rlCEiy70LkuvLYxKtFz86Xf6jY= X-Gm-Message-State: AOJu0YyOJImLtPwPF335TCVDStvavomQa27u7b5X5cBKowf51/qbUHOZ 1V8aUQCWFa8PZf0VhfaKdh6eZYvY4IRHev5xKy4IcH+EK6h23YHC1LEIG7GEdBUZhFwq/oJeRvw vDEsM0Q0M8/HimgFija3pK5TsIXYxM/0ucNefiM+PZJ18TA5mrgnTCs54Y76xmj7a X-Received: by 2002:a05:651c:210e:b0:2f3:b38c:a142 with SMTP id 38308e7fff4ca-2f3be6074c1mr8718111fa.6.1723796609792; Fri, 16 Aug 2024 01:23:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGedci6wEskLStoN5T+/a5fQ7mQwe3Hdz3eZpzwNe45i6iFhaTa+e9V9NXIeJ1Uhhe0A/2fIA== X-Received: by 2002:a05:651c:210e:b0:2f3:b38c:a142 with SMTP id 38308e7fff4ca-2f3be6074c1mr8717741fa.6.1723796609341; Fri, 16 Aug 2024 01:23:29 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:29 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, Jiri Slaby Subject: [PATCH v3 08/10] serial: rp2: Replace deprecated PCI functions Date: Fri, 16 Aug 2024 10:23:00 +0200 Message-ID: <20240816082304.14115-9-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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 Fri Aug 16 08:23: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: 13765755 X-Patchwork-Delegate: johannes@sipsolutions.net 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 11AD4155732 for ; Fri, 16 Aug 2024 08:23: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=1723796618; cv=none; b=b6XAn+Jkg40xTu9kyBhtV8noJRcmzWwhsrOWdEXbwwolLgMRv/BHCsEbdqL/9NMvdS/2Xp+FRubcbd0OrQoMgzUMqeZO2j1KMi7wQx6CAc0zmJSuW9nW4RT/RRmOEB7eR7EHQx/qMFH871J/ZvVDVP3AJ2P+QFXkUfSh5BkCzm4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796618; c=relaxed/simple; bh=vRi2Dr8oYOl/Dn3cbKasTreqlBKKIRjGiyZnnXF2ueo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JvPPFiema1u1QoaqETY8Xm6+NA1QzSMMlMISULPCNowI6IvprIiXyHomPTPFokQi/Q1Jy3/bO4NvJAOMW4N5QwAZFuJPiY09kovwff9tmmheNDuDuDMRdJQts4D2Q88vXOokyVgnPBAf4my5YjU1UA5B9vxrPe3vhbf6iqkzIME= 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=QxXHVAG1; 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="QxXHVAG1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796615; 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=18rNye0tQ5OucjTqtNIdO+/X5BNRh9H93PkE7JosHtA=; b=QxXHVAG1EyJ4pEqvl1ISrJT8Owy7caYopU9wyRajh2csXSPccGTpP8pMRvh/D6mJb7C+n2 uNbhb3x8aLpR1ebLLtvYLK5mVNawU+i0w4phGCFZoaOrTLgXrmhC9RKnLYUXe+lPtQumNE JRkkq+Wo4/f7+y5uz4Y8JXeC/vl9+mE= 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-448-aFJssUCdOqe29-T3yP1cFg-1; Fri, 16 Aug 2024 04:23:33 -0400 X-MC-Unique: aFJssUCdOqe29-T3yP1cFg-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52eff9a3109so316303e87.1 for ; Fri, 16 Aug 2024 01:23:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796611; x=1724401411; 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=18rNye0tQ5OucjTqtNIdO+/X5BNRh9H93PkE7JosHtA=; b=Jv3S/kz7AYYuGp6QAanVHmbSA+2yV7h7xEFTOe5nm6juuepVslbp64tjQW3QCgs73K sRvAisXCl4xcYeAEJNAReeECPQUtFDszXgybQNu7PQwDtrmTx2QjEaE7gwrDFa62OIff euC8bUFjunJNebk+2zLGclsP08ZuvqdUfUFv/PioZo5xtWrMn/Z1tGkYIark0i52axQG rTFgG3BISm98K+3CV7O+kLhSznPLdHdboLBud0y+JcHTbHaHGyx/7UdJVho9R6nxiQEG rVBUFYgLH9En7XtgkSwL4Eltghrwx/5JXR93UosssscCfnp5sdQJo/djNtLeg5xyMUV0 BFHg== X-Forwarded-Encrypted: i=1; AJvYcCWiepb1iB4GCHtgTyD4asnbJY0TULip9hjLNq1bgig51RIgqmZoFzmYTxIxRC4UDJdzhe9mAm1scpEPPI/5MW5/4w/gTkiW7pmfnO5rShI= X-Gm-Message-State: AOJu0YyoV+/3nRF9dTp67pM66qHHAGYBCBlyjAtVd1OCoJnyO8MyYb9O KorwhHYxc6Mnm87OOTX9UXqHVDQZtda2hAb4d+UH6Iif/q8djMcuVry5UVuu5pGvGIgrHWiJKtI WDYBivFSE371lbeIOyhqi6A01g7E9BePr6XoTk3wlYPyTozAc1bqpZk5KVzrCkJme X-Received: by 2002:a2e:bc16:0:b0:2ef:307d:17 with SMTP id 38308e7fff4ca-2f3be6e6debmr8624101fa.1.1723796611396; Fri, 16 Aug 2024 01:23:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1IvrWWZfR+lgeOS08d4L6C4BkPOCAMrmkf0L9QOweXgsFSvigKNGw42Y5Pcrt7oEZghU4ww== X-Received: by 2002:a2e:bc16:0:b0:2ef:307d:17 with SMTP id 38308e7fff4ca-2f3be6e6debmr8623641fa.1.1723796610906; Fri, 16 Aug 2024 01:23:30 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:30 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, Takashi Iwai Subject: [PATCH v3 09/10] ALSA: korg1212: Replace deprecated PCI functions Date: Fri, 16 Aug 2024 10:23:01 +0200 Message-ID: <20240816082304.14115-10-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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 Fri Aug 16 08:23: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: 13765756 X-Patchwork-Delegate: johannes@sipsolutions.net 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 58E091581E1 for ; Fri, 16 Aug 2024 08:23: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=1723796621; cv=none; b=lPEwBjf42naVHpk4/Mnkwx4spZd9lKGK/lXEKg4Zh1bG+cp0cTiSMdhz5C3Ux4eQ2OcIONkhvBW+M9g8MNEJnrQCSzL8Ubq4hYFEy1L91+AM0ueCSRjkqdqAZAoY9vwmxJKxSzHMyf/TCEqSkIcun3xltG+h0gcbLoEsm1Orqmo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723796621; c=relaxed/simple; bh=WeLrRQQZMB+M17UvRJFKdDj0pyrJSBe8hp5JfipVdgY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mWsvkwY2DES03ambP89OpJuIllMab3Bxuse8yirLLZUpfxmUwKmxWKYYO0pbnoj//hOjvgrjyDNgtzBGJRgsN2/FKi3VpO5ir4SflhTDi/5KTQOIgAaD8uZhNxOId+ICXINEgxgD7cE/JWmZ2AGc/vkLaI/zH50bkYwly9LMYNs= 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=DO7wR0Q3; 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="DO7wR0Q3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723796618; 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=K9KK4cPQPxfE3+CuptPMI06hfd7cwzBu3NuXzthoA3A=; b=DO7wR0Q3cpKMkfzmOpBB8sAVIAOEG8hR3ijsbphU9HdbsIlsIbfsjOZrgaXl1tJTMAedUL j+RD1DqvalI5d+8cxmvTGK3IW26OhkMK1Bupf13mzeNDeQpCYKsAoiQulVjh89anulVVb4 noNgaE+1PFKTnZ/x8n91pcFvryZEC8E= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-138-2uQvctzZMR-D8Yw5BJycJw-1; Fri, 16 Aug 2024 04:23:34 -0400 X-MC-Unique: 2uQvctzZMR-D8Yw5BJycJw-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-428f1b437ecso2842305e9.1 for ; Fri, 16 Aug 2024 01:23:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723796613; x=1724401413; 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=K9KK4cPQPxfE3+CuptPMI06hfd7cwzBu3NuXzthoA3A=; b=aZRTOFBKHtsrbo5zQ/MeKvS/QmIeOMMCXWURwMFi4/eZaWYBRL87jmhxnVRGR4TjYn AUJmfecpTRLK+m8VNwYn5fEhrnCKKn6oF5gtFxPKkVur3MVdpfONhXjpi9uc9MxjU0FQ /7OHANRJ7VD+Co/GHbykH6V1Y7s0CDGjNRTcpyO1EULyj3p2Mf4wlFKz3c7amMBIklmB 9GMga4rxEA3ll3DP6mDKBPrHFxlQU9VGhOkuKdz50c2XzOihiXokzqvkvorVkPJ0cGxu IXlwDw0gDfUhVlbvvtif7tDLVFlf/qk79lnE71aeLtxh0nj8AnJYH3Fv7UclZS/q/G/i x+iQ== X-Forwarded-Encrypted: i=1; AJvYcCVdkVHa1qax18IIbtjWcxskSfFcQwYOUYWvrCp32HAp6CfzHpOXnGpKYsc9jRFhm1OChpm6deuMWlgLGtiBdw==@vger.kernel.org X-Gm-Message-State: AOJu0YytYjTRSVUoPsURzWmsWIzK+3i6VaCqyzIqo3WDpjJ6r4rK01FN 84HxfJcI8WInyYSNnCoZvydinC1QGvVM7Np8iJPRrlkvbKTcSDmw6ThwwX/jm4dICrSUpUwuhzG 4vZoYLZ9Fq2Zx2+f9Bbm5wt5fwG5DMyDYCrPPk8ykHUvz8NqO/WwJVVKpOyqmTzRk X-Received: by 2002:a05:600c:3b0f:b0:426:6cd1:d104 with SMTP id 5b1f17b1804b1-429ed7f72ccmr7955895e9.4.1723796612923; Fri, 16 Aug 2024 01:23:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFs1K45T6n4GqAA7kRJ9Z9vLdlCmjYbo94PMhiOgANbOu7cQ9323rvUxQ+wVpplvzg2GKSCyg== X-Received: by 2002:a05:600c:3b0f:b0:426:6cd1:d104 with SMTP id 5b1f17b1804b1-429ed7f72ccmr7955535e9.4.1723796612453; Fri, 16 Aug 2024 01:23:32 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm71461355e9.25.2024.08.16.01.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 01:23:32 -0700 (PDT) From: Philipp Stanner To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Andy Shevchenko , Jie Wang , Shashank Gupta , Philipp Stanner , Adam Guerin , Tero Kristo , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Nithin Dabilpuram , Bharat Bhushan , Alexander Shishkin , Miri Korenblit , Kalle Valo , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , Jonathan Corbet , Bjorn Helgaas , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, Damien Le Moal Subject: [PATCH v3 10/10] PCI: Remove pcim_iomap_regions_request_all() Date: Fri, 16 Aug 2024 10:23:02 +0200 Message-ID: <20240816082304.14115-11-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816082304.14115-1-pstanner@redhat.com> References: <20240816082304.14115-1-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);