From patchwork Fri Oct 25 14:59:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13850838 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 69C6716DEB2 for ; Fri, 25 Oct 2024 15:00:41 +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=1729868444; cv=none; b=dT2oeDEVZeEy0W9QKqmQOECVGt7kdeavtdXQ0BgAPxEQ9tQpDYJs+Zu/o+w4cLl/LJmpp1Ee2y/IYKH6tr86fC+dKK+DZ21Jrd7g2wgSzZlxlFb6z1rQ2r0o1qZZm4B4cniKVqOR2eqZmBMWxMJ5wqXyNO4Lc/u4ZFFSJFh4luE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868444; c=relaxed/simple; bh=pzHm+p7iOQ3ZHeJddCbAsTb72gDaFZfayku/dAdnQvc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uMNaEUPEDN4Xj4ybZfBBTy4Lp0WfkUSYeazLZ7MzvjTfe7nanHJ2KprFKvG7OHBcTB2hIGBmuqUfBc6E6ME/grBlh2Vz4DlIyuBPiQFH/eiRJD3chXcq1F/z24ilF3NfDKYNqpTt5mKbqxWatQv9HKGrto5ne8yRkpyXJ/905C8= 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=JPGu2HMa; 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="JPGu2HMa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y8B9LV+ler/WieU+IGPE+8OX97zcf6y+ob4ao9vxZG8=; b=JPGu2HMa0VmJkvbZ1032ccnLrZwu9+fuQjTZ13+CTCZif5BmgbWrK6MgZtmNBiGWVAZxCs Aq7U9odEeV56faYonRTPcfiezURKGm7MeB4j6XjNw0DweaSbDkMkeeQE0TpVm3pakKHyyr 4WTGfYPgzJRAdKBACfPxSPc1frCPxOU= 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-590-tezRYgURP8qo26D_40GoNA-1; Fri, 25 Oct 2024 11:00:39 -0400 X-MC-Unique: tezRYgURP8qo26D_40GoNA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43151a9ea95so17189405e9.1 for ; Fri, 25 Oct 2024 08:00:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868438; x=1730473238; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y8B9LV+ler/WieU+IGPE+8OX97zcf6y+ob4ao9vxZG8=; b=cpNXnIQ77xhLMPisBp+7x4KcUYOUnbhRccUaAoSr91BTKso8O2aOHm1RAR6Ot12y+I /mdffLCd/fkofMsrRoXVN2qspi99HtEbKhy82Yh3zwl1zmwMCDjtETsiQwxx7b58FOqT nVAmJ5QKI5133GwERm+vyMn5lgIPaBoatqlftqAV61PTRvT8CHNb9CEhpYCiPHu9UUWS O84UtPkNc1bGKlv84kmksysJ+heCVk0NPNhEwabUYi1cXuEEWH6Kfn3jDlKggLB4niJH E/LftzpueA68kXOMly/2uu4/qOh8fRUG/I9YUiaWX5FWXBK3+XNpNMmL8owcjHh7ALPV tbIQ== X-Forwarded-Encrypted: i=1; AJvYcCXiRvYuPGC1mrNV12s3Q498lpPEMEVCYKeiuO6hnjke+VVkAe4bAMnoDiz8T1/L9r+bWshBGBCrEi8G0lA=@vger.kernel.org X-Gm-Message-State: AOJu0YzLt4hovo/nrCoSSvGklRE28MDu/ojcg6/B5fo7Oyhy8uN4Emts l1gQaUEqtlrWS9PU0Fayg+X1tJnoii3uTEDJYbJ1AW0XHnqq+ZG801PSUG2NJnFF93Roxau8uDl vis6L4GovZEJeGJ0ROGhpgG4FRN6H/vWc28yr6altwlzkRs+PAb5eMOmohCLUOg== X-Received: by 2002:a05:6000:d84:b0:37e:eee5:80dc with SMTP id ffacd0b85a97d-3803ac6704fmr4258061f8f.28.1729868437473; Fri, 25 Oct 2024 08:00:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0kR0T6tO4HMLrjOiOdPK2NT4nWQw4oUfgmMiDyLMaWTYTtq+bTSQKDKbrlWpwhU7sEMawvQ== X-Received: by 2002:a05:6000:d84:b0:37e:eee5:80dc with SMTP id ffacd0b85a97d-3803ac6704fmr4257961f8f.28.1729868436829; Fri, 25 Oct 2024 08:00:36 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:36 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 01/10] PCI: Make pcim_request_all_regions() a public function Date: Fri, 25 Oct 2024 16:59:44 +0200 Message-ID: <20241025145959.185373-2-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@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 Reviewed-by: Ilpo Järvinen --- drivers/pci/devres.c | 3 ++- include/linux/pci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index b133967faef8..2a64da5c91fb 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -939,7 +939,7 @@ static void pcim_release_all_regions(struct pci_dev *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; @@ -957,6 +957,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 573b4c4c2be6..3b151c8331e5 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2293,6 +2293,7 @@ static inline void pci_fixup_device(enum pci_fixup_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 __iomem *pcim_iomap_region(struct pci_dev *pdev, int bar, const char *name); From patchwork Fri Oct 25 14:59:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13850839 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 995B2176AB6 for ; Fri, 25 Oct 2024 15:00:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868446; cv=none; b=ZJWQNMtKjjBf0VkSe6e647LLV3D3oyQhHuCes+QJAwatAbdu8cMs1qIGGCZLgu7ooWY1Ce0hZt/5UgbPX+ybiecY0+yThR/2594+9L10R6c5mBE0KT4ntX/OVsm1akcl4aJlPQ2eDqeCum0XyRQPQT5IkRu+uatpQiwM3nyxUhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868446; c=relaxed/simple; bh=s6xBjYgC8JsEjVYTXZALRaY3DljRr0l2UeRg0HzxlUs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mCf/LjRfsym+WF4p+ePXk6GtWDrDsxG+NOMnf7xgbML/TQmiZ3qaxhiA467SxFaherRQmXRymd/WkOvx+c+/AmersXLNsIOPoLqU3a5buhMDrFJE5/B6djkFHa7bWlrB5YKTDQ+NUI1Nrb5+2aAIpvNfOeAaOLy6Q75eVSNajn4= 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=LYLss4zR; 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="LYLss4zR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ryss9fvWehXfEU+PDJn7zlGdxW8bFi37+f8Je+z7dQs=; b=LYLss4zRzRg2Bi4zIc0gF+BDtc2tiiJKRudJ1rVGOPa3j1n2kFEIzGOGyDvCM9vyJ9+796 IWqf/yvdoOB2FgMl3fm+4TcBtZz6ONkXBIZS+d63Cl8P1Eyj5G7LyA/x5X8dILoKfpnZ42 rsrxTSDQkRtgeYibysNh+NYD8y/2YF0= 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-341-oofGwsRPOKW59y8QhOeGHg-1; Fri, 25 Oct 2024 11:00:40 -0400 X-MC-Unique: oofGwsRPOKW59y8QhOeGHg-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d52ca258eso1143136f8f.3 for ; Fri, 25 Oct 2024 08:00:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868439; x=1730473239; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ryss9fvWehXfEU+PDJn7zlGdxW8bFi37+f8Je+z7dQs=; b=Jk+qdHAKvfBLuRgRX5P2QmmvG5lyCRGlG35ejNaHJlwb9KCuKjdUw5UmAJtdtpZ/Dr lbScpzAvMFoEpcdwqYT9lQbC6z20LFmR0FIzbgeP1QWgWZJlw/wraDY/TIAPqAd/+laO W2Zdx4Kaxvxt6ikbm4DEmbq27H9SPlEUr7+e68gXqDH0KhegA8r1+uQgMRdHehSVISFR gi3qqv2mjV3Qxm7m9iN5rAPEL4VQkC5E7CZX/NWT/LQuuhhOakXvTX8M2KsweTgMHw+e 6U9aOQuIttpN0cP//R7snOvn+yjmERb/kHlJOjPhAGb13TR3NfXIZdEkwgMB5Fse2hh2 Ck7g== X-Forwarded-Encrypted: i=1; AJvYcCVAfhmJ45vBUXDpGYH91ZKUnJtkqvAhG27ms2vH2bBtMsbU0rf0wqXtXUQ7VdwZQyD04Nff1ktHgsvIooE=@vger.kernel.org X-Gm-Message-State: AOJu0YxOzjJeWVH27qt07REE7RWzyBRERgLIn0MxPyh0AttBjQf1+RpK g6QH98bV6KkmZR8MpU6Jm/yz6xSrSfdurE8EePONM6PhdijYU8cxQsNX9bnTUfi+Z/y3F0xJ5C5 OAHctqkDMUPQGeIUzzqb+6Jpi/o2ZZQHgNrGFXn/+u//pehvVA8j+barFWEwrPg== X-Received: by 2002:a5d:56c2:0:b0:374:c17a:55b5 with SMTP id ffacd0b85a97d-37efcf06dc1mr6436998f8f.14.1729868439580; Fri, 25 Oct 2024 08:00:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8ckOXkNlZIey2we3esP6YdjimmyCdm/ffeP6OkAIjJrVOU9m50FFPLlquaywIvtz5sXMgiw== X-Received: by 2002:a5d:56c2:0:b0:374:c17a:55b5 with SMTP id ffacd0b85a97d-37efcf06dc1mr6436886f8f.14.1729868438713; Fri, 25 Oct 2024 08:00:38 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:38 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 02/10] ata: ahci: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:45 +0200 Message-ID: <20241025145959.185373-3-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@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 45f63b09828a..2043dfb52ae8 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1869,7 +1869,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ - rc = 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 Oct 25 14:59:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13850840 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 E295B170A20 for ; Fri, 25 Oct 2024 15:00:45 +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=1729868449; cv=none; b=Zr0vY7ItZ0Jv2nhcQeaeku2NejThRlAKzrYrAOxRarkVfit5UAWJuL0T5Rqbqiu8wULwnPwSxfTIKX4IQVqm7AYqrl/OI43YC6N6Rf/Iz/rLWNVkrImzzkMXBaoVP0Aq3pWA47bkCuEXPF/3SmOCaCnaK8jGJBMwJfQ71GwATUw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868449; c=relaxed/simple; bh=YCSleCRL8+zgmB0F5bhpOuGHDhDr1YVS5o/lIBwlqhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KMb7yGRzhpZhbfkBN5BGAjT3LL1ogQilEBAWQgcNnEUuLiv64x8m8vUsHGUAUuHThSuHwJ/H7DxhZDxbU9G1KmpOEQ4Xn05SgN8WSmMV3vgJ8BKDuVhqNZNguG0j2661s7EBK/79vGzI+5RCbeebWQL13IHj2zOCbCZ2q9A/dRM= 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=fDEqCzl4; 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="fDEqCzl4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W8Pv00ipT6Qdh9I20/5aALEzhWkgYoXaIfeUPDxIxig=; b=fDEqCzl43g1WYj+cjbgUV1c5Y3ayMw9NO+JX20c4nZlSxt8u6HkGSzO1l0oJJXeLGTIWyj ZqkIl6XQ72Zjuj81L/9nuD5CisrvYwu+m+T85KT07vLIN01x1w/2sTKPohmpFnpwNb+z9g H9/dCggYjvuyC7Hp5SlGvD6BiHwCIRc= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-633-Go_NFJViOr6TREGYXmQr-A-1; Fri, 25 Oct 2024 11:00:44 -0400 X-MC-Unique: Go_NFJViOr6TREGYXmQr-A-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d603515cfso1009388f8f.1 for ; Fri, 25 Oct 2024 08:00:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868443; x=1730473243; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W8Pv00ipT6Qdh9I20/5aALEzhWkgYoXaIfeUPDxIxig=; b=lZ/++6iAb89dxIBD3RtU94R9+VTfntapQ1bS26oQeqU3QTOvGV/EwjJvRZk7x3/TUG ixQQYNaUiezbkPLNtPpDct5APgqanakC/CztdwzKr501fgBuU00XiTl9nJGz0OCEYGVf YSlM28GIncLYyNcJrIVsl0NL/mlQgSiNDNrek6K4ytIjLTLrpwzsYIeEXOloTjGRfykr q+FfydjT/3QMEyxIRRlZQnJ2CGnsso4Tx57MjtjCb/GqfGiF6ZpuE0t6UXDzxuDMGULH qjq/uq1z/GB2RtbrAnx4ZApke4EML3jIN+5dYdMCtVvHwYtVl7vcq4bkexFvnS3SPvOW pFRg== X-Forwarded-Encrypted: i=1; AJvYcCUGW7O1K19jVrpeaLXUtTkoHfHEEHyGDCw1Zu0rHuqN6BKZKcHRyXJhgByGB/otStkmBjqXqVFiMqgDVdQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwA3SflfcUC7VYhYByGDksx63pfktfIkQv+cSEG69tFrnnrMtFr yOG8t4PLDHpbofTRgOdK0rphjL0yeQNl3XF71Dic08BQwJ+uG3+lZsf3U5S/g44Qgj9MNjSzYQt qNEq35jmPQY1NAhVPMyb13SNguPFCb37hfOglrad8Ti8K7jmTH6EPCETZZCuEbQ== X-Received: by 2002:a5d:6604:0:b0:378:89d8:8242 with SMTP id ffacd0b85a97d-37efcf15f2amr6047615f8f.26.1729868442540; Fri, 25 Oct 2024 08:00:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFseA1GnH6pKk4l885xPTSVzTwbgSgavQh+OieTeQi98Ek+SEn6EQGbHopZP84s8uTkOnT8ug== X-Received: by 2002:a5d:6604:0:b0:378:89d8:8242 with SMTP id ffacd0b85a97d-37efcf15f2amr6047433f8f.26.1729868440625; Fri, 25 Oct 2024 08:00:40 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:40 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 03/10] crypto: qat - replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:46 +0200 Message-ID: <20241025145959.185373-4-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@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 f49818a13013..788a11cdb34b 100644 --- a/drivers/crypto/intel/qat/qat_420xx/adf_drv.c +++ b/drivers/crypto/intel/qat/qat_420xx/adf_drv.c @@ -129,16 +129,21 @@ static int adf_probe(struct pci_dev *pdev, const 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 659905e45950..115eabfd1f6b 100644 --- a/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c +++ b/drivers/crypto/intel/qat/qat_4xxx/adf_drv.c @@ -131,16 +131,21 @@ static int adf_probe(struct pci_dev *pdev, const 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 Oct 25 14:59:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13850841 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 5A84C176AB6 for ; Fri, 25 Oct 2024 15:00:48 +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=1729868451; cv=none; b=p6kAGEX8M9hDQG/xbK6bexUySSDuNLMarn8DmWu6pA+aZP0RtjvDwJ4Qb4vSa/K+FK1C8HfH9RvcD1TaJmB5rUzXc7hNarbbYOtZwhmOoGTRKJ6qBIwy1/Hb8UOjIROGHYMnBILTQy2xCJ1Oyj/+fLj8DdtBPcqbITpERZP30qw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868451; c=relaxed/simple; bh=sVXXOvwhjUtLTRw/diUu9Q79ppS0cnZqeXoEIt69lpI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n3JUCgdFeKpMLleL3ta4P0LCifgItc8SQgzQrId+GK9w4PXcqt+oxCrkCe8gFnQiiNI/Sfatzg0/1oZqL/6wNL46mbTGedDX3NTgm8Yt+nsyxrKYwwMMjCtb08RF/IB9vMw7GyiHu/cBvJs6CYkARkBoeJSm+3K7CGYu1DKXatM= 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=MISG4x3o; 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="MISG4x3o" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868447; 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=NcVaObSC/M1H9Whyn9Sm9wUdy5PG5I9wFKqHVmMGOas=; b=MISG4x3omCKbXjd+2oA6FJOHql21xGtVTZ+UAqHU5HvDeaOez6RZQ1ddXcZUJ2WJ8ynB88 SgrmeHcOEdBnK/cR3JUbJhlwR05rtvySVjEf3I1n17hfQOpvyoqks6DnfRMnPuQMaCmBBT UfN1L0AOS0QJzuz0lT4K/NDITyjZNOE= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-481-hAhKEobROMKn4iq5GGykLg-1; Fri, 25 Oct 2024 11:00:45 -0400 X-MC-Unique: hAhKEobROMKn4iq5GGykLg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4316300bb15so15143945e9.2 for ; Fri, 25 Oct 2024 08:00:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868444; x=1730473244; 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=NcVaObSC/M1H9Whyn9Sm9wUdy5PG5I9wFKqHVmMGOas=; b=GTiQNIts6S5BGQYO7ztfcULPVoEQW4vsBKhb6NoboX/8jWNQfue4DxIfmnQ4eXlLou ijPJXRmBAoSxzg227eiZ22svxpfAi9Ra7lnJhwByKpG4fWwkqI0SdRX1REY1qUqEURoR FCynZ1OTRj34vzgz6EqFrsM5X5ng1rlL3o9UAgEOK1acPDyl1GEzAKOQ55msu/s/lkAY LIKpdAR6tLF36kWMv+tXwpMdpLYM2TcWVfhuZ5AGzW/OY/rLdMigEEu3VBml4nkT45P/ uOAivWEepBvqu7JSJBg4fERRnmD/nx/Uns0f4MbOcnKo7ojq+bMDyFF51h43P+LFD+CV UVKw== X-Forwarded-Encrypted: i=1; AJvYcCVq1m3vHIV3zz+qGzmM9ewJ655fMRTLB6kHDUM4exthgq/PbgUwY0fi1nXo5GXlqEAYTdKyayCxeuoxpH8=@vger.kernel.org X-Gm-Message-State: AOJu0YxLmrONNhmLdsOAYYUJxFt6z9nvYDpfLgnnVuEMo5+sUQiDDtOa 5pMa5KuoyZniIkxvJxGH6hUYqNO2e7tjp5nUoiQkJmAcI4g9Psr3BQ83g9a7pLzMW1HQmVfTQgz RmBhYoxtyMX7AfW2bnieBzEPcOci/ZkfC3Ps8ZOema3//wRF6v3H+af43kKxgOQ== X-Received: by 2002:a05:600c:4e8e:b0:42f:310f:de9 with SMTP id 5b1f17b1804b1-4318c6f4de2mr45988935e9.15.1729868444122; Fri, 25 Oct 2024 08:00:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETR6RVW3pZ/du4LX4l4NN++/CwsutB2RaWnFX7zlgkal/P+HVGYPqgvnEtlOctQmPceTz6BA== X-Received: by 2002:a05:600c:4e8e:b0:42f:310f:de9 with SMTP id 5b1f17b1804b1-4318c6f4de2mr45987205e9.15.1729868442534; Fri, 25 Oct 2024 08:00:42 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:42 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 04/10] crypto: marvell - replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:47 +0200 Message-ID: <20241025145959.185373-5-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@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: Bharat Bhushan --- 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 Oct 25 14:59:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13850843 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 CB70017D896 for ; Fri, 25 Oct 2024 15:00:52 +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=1729868455; cv=none; b=UDpJtylQIfQJTkBax8wXP3I+ml35h8rXMyDlu5N2qdg7OjglXGfP3+L91DhKiaSr+4oYJicUBPclxa3O6oUIexRyL14i2lP2YLefkrlcLDSXiRfjgMphtmmUZnDvFBfP/NaT1pCsi0WjxMrtTWUZ1namhaIYar4dolLmT/Vpt4Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868455; c=relaxed/simple; bh=J3pG/0Gfw8HnALwZ/Br+hrSE4pEfpHhtl4LqImtqkrM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XlDLi/jqjlCEYENVxTwDr61vVeqKusm5sobyTR3LtPG5NAwqfn87jEmNDIbjL/eCuXnfvxYr6IGIR7UakzrxIJwd6bowQ5Dvv+UgMdn9e8lXCG1rfKy6d6QsQG1g61c9TC2WQWm/clVlK4lAXvaIAVNLWwJwWcSQu5FedGQYQwU= 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=K5vLwQ+E; 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="K5vLwQ+E" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868451; 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=tLUy2S875DNBeHIOQOxEOE4p7AHnezc+a90RKtjms08=; b=K5vLwQ+EkQIJCi4vLfHqPHOOvhsObCquNgBfLYHMjEoHHPGOx87reiJfKopjAiDM/khGrv Aho/7OXTT0sJcZwH/Dd9iyQVCt483EXRRpw7CrDV3jtEzC7mIrT+x60mU55w1bb4V+E+it dBEqzDJCX3oJVtvALWLM/KcBia7c9Ao= 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-331-Mg5a5fL3PFuMlXHU57sT7w-1; Fri, 25 Oct 2024 11:00:48 -0400 X-MC-Unique: Mg5a5fL3PFuMlXHU57sT7w-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d56061a4cso1083964f8f.2 for ; Fri, 25 Oct 2024 08:00:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868447; x=1730473247; 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=tLUy2S875DNBeHIOQOxEOE4p7AHnezc+a90RKtjms08=; b=Sq4W/SjS1soTQ3TpaHwc166TrilVSw22p+sIZUOqXvGUThbxZkZXh4606hvdtUZxJ/ dftaszovHVWCDr/iXYDFf8KxcQ6ARXHsypJH/Nuzd4jmQSP8grDgparwSr7jf3i3EesO 6B2PP9jId/xibtat+o9v28YeqZhE1Hda665hmCqwwCWbtBhsIYATrn2rxqMfpAe6bjeL Ny9V5ky+b9IquP9xmanqOG4uXY60p1n1mLyl1iRr0EySck4FGUszknTgPkNjIThEsTB0 2wBZl5FHYUMg4J9LBqlH51csiIiLgvhXGqr11qZ85cY2nVaY8Yyk85BnUDGgZhgZt814 6r3Q== X-Forwarded-Encrypted: i=1; AJvYcCUo7j/36fGh61iefCtUra6vlOh5nQah7AK45CBu3PKrCx+VO0rDJxYhqzGri6rj6YvSOyS7MxoE0k8IKoc=@vger.kernel.org X-Gm-Message-State: AOJu0YxG3LZijyvNMZjcQto72yYpy4kuGFYEZwHBoHVHNyPe+kYQKGZU FkZFCJ19cUsu85akPo6a3YA3l9a66PPx8QrxrSrBtYmFgeEKny++yVHrP4Rffuo+G8HqPWJ3q7y +FVPR625RU6WhuTl5ZbZ1dypiY3OoRic1c3OefvAIcbsgL0qVY9SGfOL/YJDRQQ== X-Received: by 2002:adf:8bda:0:b0:37c:cc4b:d1ea with SMTP id ffacd0b85a97d-37efcf93402mr6344635f8f.53.1729868446842; Fri, 25 Oct 2024 08:00:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6ZQPMgpVCbtBrqjfejgU4ALi6/qBZHusO5I0iFUt9VWaUU2evS88UKp9GOeAkaETKTdLQgA== X-Received: by 2002:adf:8bda:0:b0:37c:cc4b:d1ea with SMTP id ffacd0b85a97d-37efcf93402mr6344361f8f.53.1729868444438; Fri, 25 Oct 2024 08:00:44 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:44 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 05/10] intel_th: pci: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:48 +0200 Message-ID: <20241025145959.185373-6-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@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: Alexander Shishkin --- 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 Oct 25 14:59:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13850842 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 78928170A20 for ; Fri, 25 Oct 2024 15:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868454; cv=none; b=iDI6GkkTTEEEkuAVs9jP9tdNGLbIXhBPn5pN6/mEu/V77ToayupV0coKkFJGcKNnjpoyM2NR1UDIVENc7y34HMv56bNTtJrJ8AXJaAO6iyI80NZio7IC9L6F9fh9Xs4Xuh3UfitVkma/KWZWteM51eEh7fOhy2KmYt3uNwSzfGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868454; c=relaxed/simple; bh=fUViQ0wuhaRh1Z4rYxnCtcfkzxZviFoQ/oXZmPMz6Rg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HpNWPhnbf7yWVPAFhYvXLqWhHY6NEUtLu3pSmbS2jjS21UmD57I68LPWdlzJGjZB1qu1WSMv3Gd4ueOUvJGV1xokthBX+A8LiHWeGs3TtcJE6wdnFNiDeDkgQ3l7lul6QyQjrCed5Gd/frEAyG21eWjQdkw7QxWcJjmglqjr9XI= 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=jFCEw67O; 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="jFCEw67O" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2pA/Y9KFQGL5eKPmyYHAWaMItiz6sKe/fm026vyTOII=; b=jFCEw67O6KoNu2rIgik00Q9/fBKsjeXxPrjJhBbo+B4B+w3nepQZO/2qQtg6GTI1XmG2k4 +wYtIzdmE1tyvFd0DKdFvy/nX7a0xqcptwUXPesGj0W83lHYVfWoNpuNf15PUwgq+l+/42 xLvaqeMmYvLWIJPvko0CITakF3wS1YQ= 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-568-OM1v5lp3OimJYHZ3rXiffQ-1; Fri, 25 Oct 2024 11:00:48 -0400 X-MC-Unique: OM1v5lp3OimJYHZ3rXiffQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d49887a2cso1147206f8f.0 for ; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868447; x=1730473247; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2pA/Y9KFQGL5eKPmyYHAWaMItiz6sKe/fm026vyTOII=; b=h4kxhTifsHp+O9JqoqeaHZoYj7RsCXcw2jqCINmSRlDJyhnHcSxNGzAvsukbgGJyBA tINXDWV1R08MyessmlMvl772vHyNbxxapa+pocAa1DH8TE2cG8FRcjva4bW9qH9K3beH JUQw0UictMjVT2PK1YZaMV8FOeCM2tPPNxK9WGO/UiMxMSrXImcl08EQj4ROjaWiBeWO NQlIbR3QS+HrimUEW6rZ0Y0SzYQk0PLyTLr3XJj+v/rAfW2TPgKtL0ezUXd3s5Nahxfe 1rHVYFpEjXCZFuEUNrMxEx676i7PbO1w4JmnYGFsQIuMogMmi1AVM2ljYmBSSMKH3lnM eAuQ== X-Forwarded-Encrypted: i=1; AJvYcCVoB8/rBe6gsOTZbETKF5Saqz9VQgj9dg7AFy5oSHtVQqKqsaLGQ5BF66IuQw9vGlr+pxMXmRr7Yh+Q//g=@vger.kernel.org X-Gm-Message-State: AOJu0YzKDM9iPgdgjyYqmiiudZf4ljCHB/erBwZU1/B+PzBlmjnh0SfH md4aucG+N9EMxaB4KwPFaBRl3vljhluiqkEZd8dtTqoFfFjBcWeV1b0BR/y/N0NAhgnCxFaBmZE i+ejB54XnhNis+4j2n+kcB7+Hf29Mvkf6KIfoMmmvQYL/V6063+Fyuoqzqvce0w== X-Received: by 2002:adf:f5c3:0:b0:37d:2e74:2eea with SMTP id ffacd0b85a97d-3803ab671c1mr4935421f8f.5.1729868446660; Fri, 25 Oct 2024 08:00:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrImwuTr8UU6hSynSFO/Qk6OWlhES0U2PEH7e6DuZZMiwqG+LsgRJgOGFwOY24fOpFVbrN7g== X-Received: by 2002:adf:f5c3:0:b0:37d:2e74:2eea with SMTP id ffacd0b85a97d-3803ab671c1mr4935358f8f.5.1729868446141; Fri, 25 Oct 2024 08:00:46 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:45 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 06/10] wifi: iwlwifi: replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:49 +0200 Message-ID: <20241025145959.185373-7-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@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 3b9943eb6934..4b41613ad89d 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3533,7 +3533,6 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, struct iwl_trans_pcie *trans_pcie, **priv; struct iwl_trans *trans; int ret, addr_size; - void __iomem * const *table; u32 bar0; /* reassign our BAR 0 if invalid due to possible runtime PM races */ @@ -3659,22 +3658,15 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_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 Oct 25 14:59:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13850844 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 2ED7420D50F for ; Fri, 25 Oct 2024 15:00:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868458; cv=none; b=lqy3HihXQvblrqEgg1DrKGrYOmOYKqlHSMyS5toR7C5BzlcePXIdaYVEJhtMWphPGrPZc5+wTEaTkWZbFSmXgQaKExJcQnTkBdCVFdqCUwpvv2haD2ufR+l6oi171Uni1TStwCEjQ+QOS2osT7G/97BkZ+3TEfsCZ1Oixtz3eOw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868458; c=relaxed/simple; bh=KRhL2deOZRHNfuo7/CizyodCPj2p+YqlhuhaNJFSYuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZCzsh1owjiFhvAK6jm1f73YVtpC059RspFFXmfS8tnNmi6Fh3CVUh0eYCZkFzHgfvMnzq4C0+Mj/7Y6GBtTz30fTb1ZjqDDfRFHDdUkAKFj/OpEM/zG/yA7j/DBRf9F4p8vFh22+qqkpdiQs1E18btPiAOW7TL2VRYQAtpQFu54= 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=cx7wJd4x; 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="cx7wJd4x" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=cx7wJd4xp0QnxOyuePxlOsGLNF8VXGGUsQAbcutm3phFtaDtcl93+Nrm65kupyQUnrS8Z8 T1PqHfygBNfx6EWJi0/cZA2idFXpfzn0d8hUFsmbmS//rAPNFEDYMK2OpshlsRQgVSZ2UB RgSLkwmimcpZPymqWbpDd4h5XYhQpIs= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-493-XIFj8YomNaiVmP1-W2LIUA-1; Fri, 25 Oct 2024 11:00:52 -0400 X-MC-Unique: XIFj8YomNaiVmP1-W2LIUA-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d45de8bbfso1474069f8f.3 for ; Fri, 25 Oct 2024 08:00:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868449; x=1730473249; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=auxVR8Mc8ObJw60tAc6f/7dbrJ/IK7VRPiBDxLf8K+DrfyoewURI8OdoDwlYjFC3vc wKUl+SprlUXvW/0PCXIz4UxcPf9Ux8AlFGv0DeEqH+2lBHrKZlzX+KW8squeWcE2e4nw sT/qWn0OUp/yJIJNcGP0uxQrOmQwpNFzbfriQmBV8gFw44+2NCniYCx5Fj8itVGDznNb Njnzcn9VcEiqUiVqWcOUZAbUPGxnuVSmXMn2OBBGfVVa+WF8HSLR8/1E3sUoK3LO6RrV Dp+21jGGCoFmJF8tKsckc/ctb6eel7yxa1rhisdXJM1h0nOYZty6KFfXrZG8ekFvYvtF Y2oA== X-Forwarded-Encrypted: i=1; AJvYcCUWMR9E1/rNnjDmxNpOQb9qXm3nv9sb63zTeQV65ATOs/5I2RH/zFhNugzGtl2XKI5AzIlF6yp8hzhP62g=@vger.kernel.org X-Gm-Message-State: AOJu0YyF4OGgwARPw5CYv7/91BaWj94eWBvOG8+KBDOyk6b/0kxuAYbV 7Eg6ue5NoqR6rLFo31RHRUbjhmW3oz64e6WE1vGFlw5450fGfrms3h/jpScDgi3ZwMksTyFwp4T BMS5dh60cSik7L2bmwW1fdXMjRcwjYPe8Y/ggzwaixMXDslima7xW/xRKK0lh1A== X-Received: by 2002:a5d:4e08:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-37efcee8c28mr8039795f8f.2.1729868448846; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1JzvMg8cr6yZm3DrYA37QNNdDoszBRAqVfY9P7gwJlqkM8x7H1LKy5SQs7DHzYJeG4eaDSg== X-Received: by 2002:a5d:4e08:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-37efcee8c28mr8039706f8f.2.1729868448084; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:47 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 07/10] ntb: idt: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:50 +0200 Message-ID: <20241025145959.185373-8-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@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 6fc9dfe82474..544d8a4d2af5 100644 --- a/drivers/ntb/hw/idt/ntb_hw_idt.c +++ b/drivers/ntb/hw/idt/ntb_hw_idt.c @@ -2671,15 +2671,20 @@ static int idt_init_pci(struct idt_ntb_dev *ndev) */ pci_set_master(pdev); - /* 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 Oct 25 14:59:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13850846 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 2086D20D504 for ; Fri, 25 Oct 2024 15:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868463; cv=none; b=fiTNid3MMwQYQRYxMtzojufd9IivEkHwud39N7W0GtOo68a//zia9QSc4QrW2KdG7zDpTnVspwUyVL7NhuPB3NEhU/bVC2WJeBU3bWuSiyT4PM9KswbPnJbxpvEGXTTCgyx86/uXd6ve0DWMJRzVZ0igWdxcEuRmu34WVxpsFyI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868463; c=relaxed/simple; bh=RRyy0x2PiBX++bfjCGlA/9AZOm7xwGM5wtpW6IKXyVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o0EBevuRLe/Hbg+QISyrNXSeh61aivZmjqzjnEDhvKIhwu8wCUI8ln0cHPlrUgE36R04nXpY6PtDkrgPJfo4YHI9DXfjBf7w+ZPJf2EwJm4q3jWY+ZnI+e41O0bntNLraLCoYDe0rbMURqK1xIl6lmvTkjFWueq5CGdwyKFtCn8= 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=f0hQVPjd; 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="f0hQVPjd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WxQ5Vib/1yt2THpDXWI2rA9CY+VRhy0DxtAlfuLaLe4=; b=f0hQVPjdlwleY7yTJtNDc+/fnySlebBu0B5Avm3LeDcCiO+dkmgsFZ1RIJqzrWgwJW79DZ 5Fck5+D+7jh1c4UtJlIxiJ90VjyRBunQE5TaAdrjNjEvoCKun9HBtp4QLeZkmamy9JpZyq XwlxB9AuilZfl0X5exFaqO3hlNj165M= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-120-jgyzPVl-MeiRdk6T1dQmZg-1; Fri, 25 Oct 2024 11:00:56 -0400 X-MC-Unique: jgyzPVl-MeiRdk6T1dQmZg-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d3e8dccc9so1335983f8f.1 for ; Fri, 25 Oct 2024 08:00:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868455; x=1730473255; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WxQ5Vib/1yt2THpDXWI2rA9CY+VRhy0DxtAlfuLaLe4=; b=Qai9aPpOPh99yEqbhjtF3KfGqlwYFwCZ7QWclUeWjwFuty2INz3dqA3PgRnr3fj8/Z 4T1uPcdeRp7bDrGOan0c8IdNZqPYVMkARud6TPgh8dh8/kFNfFn0YIWxTyKkz3J4mcuB 4onL4ilzGxFJfUu6SL6kbdoaR5HDa1dziQj26AxztmAmHL/6wtSbeFU7mDjorC0pKnWA voCPnMn77LH0SJ6O4j1kP+0k2rJKdjMxzESi4gyLu9lnNCv3IMDaDsu39KVfAa94IpO7 tjmuGsSku6BfGGspoYfhmkSjooXDy+dxTSBgL7iSo9chlMysKuIGw/TsDKIocQciun5C A/7A== X-Forwarded-Encrypted: i=1; AJvYcCX+oXlAuW+g+Rk/nOiRsKeMt3+cYnmhmVHFEnTHJoL5vk5xPoV9fWsHbQQJjzKEpIKA7m/Aeys5ro6i/nE=@vger.kernel.org X-Gm-Message-State: AOJu0YwgqFAf+VtrvLbmik6S37QUbmWVQMhpEQ3sKK+2gd7ohh99wk3I IxQf/ejwn4HBQY8n/F5rs+E0qhVJwuXpWbNayAVr0KH95C5Q/WrRBcHb/eAGOUtzPkO91x8Vlb3 32vYnJC4IVKlsSS+6sw1IyVVsv2CNLlb62N0hSSNr/j/v0wdM4sye0x23gKXzjQ== X-Received: by 2002:adf:fa51:0:b0:37c:cc96:d1ce with SMTP id ffacd0b85a97d-37efcf1f8a1mr6808543f8f.24.1729868452213; Fri, 25 Oct 2024 08:00:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEa7Kz6+PrKx8KcDC+E98x5hc+UgRFrJFo2Tc4bVFvRSnBAJrHJ7dhWBhof8LHoIINcGd/8TA== X-Received: by 2002:adf:fa51:0:b0:37c:cc96:d1ce with SMTP id ffacd0b85a97d-37efcf1f8a1mr6808341f8f.24.1729868450198; Fri, 25 Oct 2024 08:00:50 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:49 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 08/10] serial: rp2: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:51 +0200 Message-ID: <20241025145959.185373-9-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@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 8bab2aedc499..6d99a02dd439 100644 --- a/drivers/tty/serial/rp2.c +++ b/drivers/tty/serial/rp2.c @@ -698,7 +698,6 @@ static int rp2_probe(struct pci_dev *pdev, const struct firmware *fw; struct rp2_card *card; struct rp2_uart_port *ports; - void __iomem * const *bars; int rc; 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 Oct 25 14:59:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13850845 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 89CE620F3E7 for ; Fri, 25 Oct 2024 15:00:58 +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=1729868462; cv=none; b=LMU4LnCAhvm7GamkvCZnywdLBiOlJFiRcVYnnGVk+/lzh324SXviICOdjSn2AunqXttt5CvOxHsPI0TdjN25gcDagHKLo5x/hvK42Ak8JaSsMdQTUltGzeZf7/VvlIw2flymdxNqDt33FwWClo1bK9h37YedbmUk/UvgAXOStwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868462; c=relaxed/simple; bh=x2AO4woPu9H2aNxl2TylFo7TB42POmIv8HM+dl0TTWE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T7vAsTI/Trfil8qLaf6teXtZSMCKSnci4maH8hr0cofDO6OicWm3t7+dHxlGt4ZNU5djES/cQWklKdB8i87NcPpSQYgisXHmoEf6X0ogFzHas4NbCp57H7O7KS3FRlNh6hFaEi0KThb4MS1UOcLgXonVJAj8LVPsSqVvLS4qxZM= 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=OlhdjYta; 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="OlhdjYta" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vZ55uYUf11n7K97VlTpkijb2Akz5QQrQmQxQWIeLt9U=; b=OlhdjYta2GD7oF5PEVnAb7w6bqWc2yb4RQQq4GwM8lh0axPXcwrlhNo9YFpwnWGM+SDor8 CZLCrKLRKwAx/tY1yCy8cf1HxssWIoE6XJtdXUuVA4kAxILX9kFt0aQl+5KHqEkxGQN6HA c79JqP5DMWUXlPCf1MDu4U89DUN8Ho0= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-260-a29Q1X58OtSJ7DPtqaLSRA-1; Fri, 25 Oct 2024 11:00:54 -0400 X-MC-Unique: a29Q1X58OtSJ7DPtqaLSRA-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d5116f0a6so1025216f8f.0 for ; Fri, 25 Oct 2024 08:00:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868453; x=1730473253; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vZ55uYUf11n7K97VlTpkijb2Akz5QQrQmQxQWIeLt9U=; b=aZkhXIeTPM+YAD3dGB1SIUxrhNhMMhmB5/jYpiiWGFMlU+F1dbTq3p/tpxkiXp7yMp tgZqbGp8U/zToAxfYnI3Yq0+GPfAEyzBb/Fg5+2cfcDTJeYsbRVH0ilSEbrANQV6YmO+ ZNhYnu5MKKgF9eq9l3v4rAwFpRVs/04pjmL9sBq8FYDvu+28Y1qaMqNhUwPhm9ZUWfBY Kk8PJD1BvOygEDxWQkVYX+hvQFkvofzsYkM90Fg6IsU2vKJIvROlvprm8gm81FU0lcHk mwt2txfIciPAtKNjp+5wpTzt9GomMbuqVn9DTD1BOZ70lDx4ai/Q6MUP+LS/96yAv18H Ti+w== X-Forwarded-Encrypted: i=1; AJvYcCVlk85mQNa3wmA4F0u6z95WV/+4fsAU9CpQK6ku9EByvqrwEZMhwGIzDLEHyFxGlqCwQDdaR0IRl+q7dro=@vger.kernel.org X-Gm-Message-State: AOJu0YxoCttuzWukk6Y6R0TRe1TM6n6O8qiDCJ2d9DWdhf1FQ2q+uE6S lcSIYm7SgT8xRrxVto2tyz2N3rjsKxe7KO4LjDjULg+Ozp+YqNhKee9We2vb+CEw5TRRia4yMQE eE9Ii6S9J2dwRFyVP61rMEbH+l8853Z7N4vYQofis9hL8QKaHvuXzJ0G0WEztnQ== X-Received: by 2002:a05:6000:178e:b0:37d:4937:c9eb with SMTP id ffacd0b85a97d-37efcf05ef0mr8444752f8f.21.1729868452834; Fri, 25 Oct 2024 08:00:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHuZZsnRNqLrqF9GwOZcr5qbeM2dWtXIkrXTvrx9EisXT4UszvhL4K4oEeTzFUCaGcEshlLw== X-Received: by 2002:a05:6000:178e:b0:37d:4937:c9eb with SMTP id ffacd0b85a97d-37efcf05ef0mr8444655f8f.21.1729868452087; Fri, 25 Oct 2024 08:00:52 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:51 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= 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 09/10] ALSA: korg1212: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:52 +0200 Message-ID: <20241025145959.185373-10-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@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 e62fb1ad6d77..49b71082c485 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -2108,7 +2108,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci) for (i=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; @@ -2130,7 +2130,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 Oct 25 14:59: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: 13850847 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 BCBFA21949C for ; Fri, 25 Oct 2024 15:00:59 +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=1729868464; cv=none; b=ojojzIUrjlVEJaMIN0RIJiG6IluPeDugk4jcpDXgc28rYZteBvg28ZMtApjWX01EllvTjpmq90dEjrBXp0j5RMl4zYuo1qExsRQn1JKMUFd7+h7Hd7/srsyStpI36jA5V6F/pyqB5h57S7iUNq9pM0pzPoRpjPFI0Hen+h5J+v4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868464; c=relaxed/simple; bh=RcTa7mPaWn9S/3FL+we6iyllf4n7RFykRGESqGJxd90=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YOVP6WudPaGwnrK41MxGtuGlXzxh1I1+RJj9/K/fsqoRcpvj/2qdyI5BmNMgNGovyWnaeQaxMKnGSU5cw9WKqQAUzzx90/r+fOrkLDNdmcbHYnZ0FaAeU6Ghdc4c5w1211xULFHX3Bt1GIEOsvp5R/ovI5PHqJLkQaWr/2VMaqM= 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=RqUdISU3; 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="RqUdISU3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868457; 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=AonUKd9JFeAmu2FkelnO1Z47g8svJdBoVMsQtMVmtG0=; b=RqUdISU3do1pwaj63hjQtKPcrL6jcHZeCaC4wm3F3kGaXAwiN3Df5LO2+iytCU4VwhHNgn TInL0oeff8Memm3fSb5NHsJsSXk30ch/NjEEDAbxiWgCe3YM81LuMX1Yeh4niBGmvuVZKS l40MOzQn/dIliY8pUG0A2eKNv2PYZyk= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-671-kZ8706baMsGnQ9Xz7b_idw-1; Fri, 25 Oct 2024 11:00:56 -0400 X-MC-Unique: kZ8706baMsGnQ9Xz7b_idw-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d4922d8c7so1209622f8f.1 for ; Fri, 25 Oct 2024 08:00:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868455; x=1730473255; 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=AonUKd9JFeAmu2FkelnO1Z47g8svJdBoVMsQtMVmtG0=; b=odeVtPyx8aVXeez7+LwNMHWXgbr8DiLYpYazRjMhXegIEiOoKSTXOGOxCd8Dv5z1/9 llz9CwQr9ImwyLnmSm0bDeEN2p20Qwa55poLUNlewDlXPHjBDPhi/rRjxKUT4Kb9pLfB W99oFf+4Nmcw/WkjHOQ9Tb1WAPBsvKPOhdn718Tc8Kk1QkXgBH3o9C5u9M3rDgOKnx3Z F1pxtQzh/5/Ipy5L9DI9js6AIvqHUu1wn9kngDAFNjN/yHaTEbItjf4lgyox8lsPoZUY 20/StjBWey+YW3PrUixCOjNv1DaXhX8j1A8myRVqNq7b17SNEIBoQKoYBT/k94gHNVWA O4bw== X-Forwarded-Encrypted: i=1; AJvYcCUlEE50+V+XaigI2x4sG40vMfdcAX95mEzR70WqlFwR7tlCoDGf+ibC+18bfYBHlwLE7aWaMxzT0eHRQV0=@vger.kernel.org X-Gm-Message-State: AOJu0YwlJlZOJYge7heADw8DbtU2qb8rKd3CG/Vl8gPeUfLgl0LpBJsb 0+Nf5rt8Pi4BOUTbMGpKYZy5h1qWMgauwiuLa/b5zgPdTBLSwliQ6PLjcGxPeoeFIPpY8atCWJ3 WHq2kNHJ8vTfQSALNI0ngi/und5ZMUtY2oJsSj6aA5QTsJ0l3sdDbqbTOs0Laow== X-Received: by 2002:a5d:434e:0:b0:37d:4d3f:51e9 with SMTP id ffacd0b85a97d-37efcf7665amr6749350f8f.40.1729868454501; Fri, 25 Oct 2024 08:00:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYS4KQfglA92Gzw16122qjYNkYIWyEgmDdpCu016/6uuxTInLXjVC7AfMuCfkKwlTQ2XYDlQ== X-Received: by 2002:a5d:434e:0:b0:37d:4d3f:51e9 with SMTP id ffacd0b85a97d-37efcf7665amr6749277f8f.40.1729868453962; Fri, 25 Oct 2024 08:00:53 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:53 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 10/10] PCI: Remove pcim_iomap_regions_request_all() Date: Fri, 25 Oct 2024 16:59:53 +0200 Message-ID: <20241025145959.185373-11-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_regions_request_all() have 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 5f2ee8d717b1..3a30cf4f6c0d 100644 --- a/Documentation/driver-api/driver-model/devres.rst +++ b/Documentation/driver-api/driver-model/devres.rst @@ -394,7 +394,6 @@ PCI pcim_enable_device() : after success, some PCI ops become managed pcim_iomap() : do iomap() on a single BAR pcim_iomap_regions() : do request_region() and iomap() on multiple BARs - pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs pcim_iomap_table() : array of mapped addresses indexed by BAR pcim_iounmap() : do iounmap() on a single BAR pcim_iounmap_regions() : do iounmap() and release_region() on multiple BARs diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 2a64da5c91fb..319a477a2135 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -959,62 +959,6 @@ int pcim_request_all_regions(struct pci_dev *pdev, 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 3b151c8331e5..b59197635c5c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2301,8 +2301,6 @@ void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); int pcim_request_region(struct pci_dev *pdev, int bar, const char *name); int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name); -int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, - const char *name); void pcim_iounmap_regions(struct pci_dev *pdev, int mask); void __iomem *pcim_iomap_range(struct pci_dev *pdev, int bar, unsigned long offset, unsigned long len);