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: 838755 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 82E89166315 for ; Fri, 25 Oct 2024 15:00:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868444; cv=none; b=QDHybRi7IlqG3YlBc372aJZ6skvbEjxzcstB319+3Fx7MEtmDnkL9e8HsJx62P7nEl3Sdvq8qL4c3Jt31u0simbQAgKRw8V49hFQSCXXCxZNttNgvx9e/59gQc1AfcFm4QlTok+G4SgRzKmxz/IrA8WIzTr5qUVFx+7KHqSxQVg= 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.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="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-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-111-1Yq5t58kP22QHPiCbMdRvQ-1; Fri, 25 Oct 2024 11:00:39 -0400 X-MC-Unique: 1Yq5t58kP22QHPiCbMdRvQ-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-431518ae047so17252465e9.0 for ; Fri, 25 Oct 2024 08:00:39 -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=sJ1wh0BT0eFfkI/dXi970MUUrbumeZ+xjZGBRbm5fPD0bUn1JxiU3xAxlZQQykuOdq DC0R95gzhSTre6mH0RshVsIBHKwZ9t2m0q2xtyxTs/zOhc9b58FMb6aOJEXPWodFyV8q CJVyJM+Hnw2pPOjeO6kpO1QmjunjXwLPtwc426Xa3bealb1k9gwpMJzj5lzJgj3LHvkb Mn+TX0byMeRLANrAbeQBx+oqDMCqkaAJM/aX2a9mx8XkXo1/O5AxGnqiMzHmLH8heN8V h36QDPpkBxxLy5i2DxzBcX0ez1m5kn10SiqWZBdRtIe90e9L/W2dycQflfXMqEpx6WDV KJnw== X-Forwarded-Encrypted: i=1; AJvYcCUWri5HMwgY9iXK7VUhpySTUMMAbM6zKsvfYF1mK8wSckkHwWWEX/fs65poWOePY67QIsSbqdWZ0MJZSlbwwg==@vger.kernel.org X-Gm-Message-State: AOJu0YxMMzDAGu/V2qWizfJTeOrgKPebMj2Bm6fs5B32noXuM6zjO2Zd lqDBjF8SWJaJURfXBsusNlBag/m/2rxoXFL+ZYWXqKlFcv2v9hIV2scIlnztqvQeZwll1tF2Fxq /DM4BjheFpvkr5Q7Ao6hR2JsVOsJnA+Doynvw/OQNrlCadzx/OH52dQv3DepG1Fmy X-Received: by 2002:a05:6000:d84:b0:37e:eee5:80dc with SMTP id ffacd0b85a97d-3803ac6704fmr4258115f8f.28.1729868437900; 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-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 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: 839017 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 C7ADA185B46 for ; Fri, 25 Oct 2024 15:00:44 +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=1729868447; cv=none; b=cjhFqm6AmhWO7OdMf69LMMmfkHlKiHQHh01nmn7I0crF+XZIQy4KW1ThCClocNKry55b/u/QgjzQNh4Jf0yptT65M30znyg0b+yVmGHPPhskLiU+NXpcfrW0d4lzn86zfkElLz6/xn3L/3yLh1NFRgxXy1ZTxg/IV/ozm5SBAlQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868447; c=relaxed/simple; bh=s6xBjYgC8JsEjVYTXZALRaY3DljRr0l2UeRg0HzxlUs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nJtbS72V4axtsscwvKldOsI7yIELCn8ujoahDqw8ngfOFaSUJExKRDWxK+IFF+98D4Ba177cFTFJGbbo2L6/aXbSIvq6gFpDagnQz9D3rKBi9samu9qBMGgGcl5duADLj8TazO4KUXu7Wey5lz/Dj1nwNsPhB1o/We6edpXlb0Q= 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=cQ58PcAA; 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="cQ58PcAA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868443; 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=cQ58PcAArz5T/X4smBwpjNaJX66ytSR+rRlG9UtPpGPBChszmEPpm/OzEWQm64HTo+kMO1 zd4qzdnh61twj99CWqFeeEyE+q+RYFE6RpPN9eCa1xUTkDmwZn8ha+VGt+ptWwlzKAid9H Phd4hEcwFGxzxsg9cUB4EeJqDoesjvE= 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-646-r_FzRhIrN7WvMheh63E6Dw-1; Fri, 25 Oct 2024 11:00:42 -0400 X-MC-Unique: r_FzRhIrN7WvMheh63E6Dw-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d662dd3c8so1125964f8f.1 for ; Fri, 25 Oct 2024 08:00:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868441; x=1730473241; 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=F87rYFFz/4yQ6uxZu4prznjPx5UoX2Y/Zcn8BWmXBT9b1/ArIVkYzPejoLzHVi5B+S KTlCjrMZyg5W98h7/cbvcXygeNqGM1PWtg+TRUiZ45PBwZjYKoFA1jMkXG1b4YC95RxU xhcBwFAXJyv/MxMfLd09tPsfhqHFXT8s2gcrnUhoOq8ZZ1vpiIs057/k4d9wBC1M4t+9 qiiQSrJJbrAoBZvN0RcJHpBRUogihDlHFMxuNFRcl7QTp/R1rAZJ2ChB1jWLYb1CFHHz KlKXVkU5r3NO0SrqR8tutCh89shTqST5BSszaIwJxY8vatR5BejZEnfHXwtnIJnD02lT DNRA== X-Forwarded-Encrypted: i=1; AJvYcCWmWSNtbjF5jxRHl2yj/ItgCN2zdk/K6cBU0mOuc0QlNEUIUZZypaDzOti9fU8EYXRU0tFliNFPhjHlh5vbhw==@vger.kernel.org X-Gm-Message-State: AOJu0Yx4NTWIL+ntBbZhS2C49oKuRvt25rLonxd4jjFEEkYLGn5QRYQb v7yVqWPy45wkNHfbl8QZB/FtUK3MzJ3pdyKVh1iZJkSgCHnWPFUJF7E8rXAb9SRr1JKVC12cU6r VttXJ72zwC1qwMh5IBUZ4hEJr/1sQUxXA0D3yhlPlFwG7n/MYSJCZwasHRzSxGiWl X-Received: by 2002:a5d:56c2:0:b0:374:c17a:55b5 with SMTP id ffacd0b85a97d-37efcf06dc1mr6437039f8f.14.1729868439950; 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-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 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: 838754 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 E29D8185B4C 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=1729868450; cv=none; b=b0ozFgoPPUsAt4kBEeSQn7YcdZQparmAlWYUJATRiFa60ym7CqioitDp0lhrcvWGblYBKr2w1pGvgRgvZFx5AJv/yRqrb0rYO2pCKOdwI1YeP2Asryf/lqhDk79SgdNlgBvy3qTFyr97r28sGnzk96cynTjBvo906giQRSi4T/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868450; c=relaxed/simple; bh=YCSleCRL8+zgmB0F5bhpOuGHDhDr1YVS5o/lIBwlqhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=baEkGvho+XjQHDjNQg7RVvjxnbXIvqgIe2z/8/cDkGlPJZpzSb0A9JwpyANIfIGUeo+xkRkLhNYfuIOAmrVg40ptWbTBNqUa/7ellbJpY3UNJ1qR7z92PTrrOW19tkLYBDk3IOoyNQty9P4iRxpfsI9lN10LkQowYgZOmrfUSXQ= 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=KA6neiaP; 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="KA6neiaP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868444; 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=KA6neiaPBqnoRKFTAcRAYcFH+6JOEEpN0zwJqx1xLw13CwhzwHGwkYX5r5O7kggy6e6pNp ZImS6zBaS+ntVdOWu6KUcTQnWlVSD6puwTGL7vqyit3aX9Bm7LDaRuAn/F14FBMqHhOajy ZUmw5qNfkhvcFmdCtcQ0Neclq01aa7k= 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-611-_ksxLdXONfy9VnurexeoTA-1; Fri, 25 Oct 2024 11:00:43 -0400 X-MC-Unique: _ksxLdXONfy9VnurexeoTA-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d603515cfso1009373f8f.1 for ; Fri, 25 Oct 2024 08:00:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868442; x=1730473242; 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=dnx3GtN+xadv5g/42xQbK5/CxnisXGkfUGf5Fn2HiVUp2AkC8/E2AgRn3F3crsQHn3 CvdFogvkrRRswv2zqefXYLA7DlOneTfHMTCJ0BVFCp+cDysshJrqZDjNNqeBCcQkuDgQ CVwHmplFXsBZNf3PTWyTJkhoaKxrmKylN+KPDQKaxfj3BbHdiOdV/GaOmP4uuAWT1guG LgLH3jgLAoIbSmf0no63HSwTOklCHtGcuMOY94+b6s7x5swWpxzUtWcJHr5/v51xfKgh KHmU9F1G145gXhFkcssWlevhM6otarANcbJZyeTCsIgpamuf9qPjWqXDqNW8UqSeWdyF rlmQ== X-Forwarded-Encrypted: i=1; AJvYcCVn9TIuyfZG2xoowyRRfMHtpdGT76voYZYO5WieloFKf+R6kKtKZ4SgISH4tzyxG+f3/n9Kpl7Bb6U8nCByJA==@vger.kernel.org X-Gm-Message-State: AOJu0YyUw+9KHj34LH8t9KYodjHCY/HONmBrodDaxxrphDBA+akDxPzE DYCk8bo4CW+pUOuNFnxT4FM+TZUrghU7f2izjB2KEQ4v3EdG3S9zL+3dnPMF1TST0YHStZcPrqK 442ZwTp4ZABefyS6QM+wFMFjTHzXWpsk87nmuMPKYFR3QyaXl2z481oNR2z6cobrp X-Received: by 2002:a5d:6604:0:b0:378:89d8:8242 with SMTP id ffacd0b85a97d-37efcf15f2amr6047537f8f.26.1729868441626; Fri, 25 Oct 2024 08:00:41 -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-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 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: 839016 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 94FB51FB886 for ; Fri, 25 Oct 2024 15:00:47 +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=1729868451; cv=none; b=I/nqUpE+f52Z3MTr+T8zMCOs+O0lJqwE/mPrYY2whkbVsaIwX2yUvUkqc8uumgix8eYxaQ/RHMZt+WsQpU3eCJACyLMXmaFBYBBj8GyJGCim2w/rUFevbSDCJryQhE8EYbAEHKzUws7va4x4gMr49lFvLcbRjKUgrxTDC/akONA= 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=Hh7RqGob; 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="Hh7RqGob" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868446; 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=Hh7RqGobcaey1HdG7uo5VLcr20k33r96SnAntKBlF0RtNXQ5K5oYl0TTS2bASQfZ/QRxJ8 8CSN+8DYu+lCNmYuDoSGL+tiJUMBCTxIiusKzogw9SQ9y/RLll5FZ10BmzZmdSlzXyMhx8 oXKK2kxPJp1uKLOes5VYp2M/rcqFPcc= 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-482-a7-QnO01M7y1SUxwzFqTRg-1; Fri, 25 Oct 2024 11:00:44 -0400 X-MC-Unique: a7-QnO01M7y1SUxwzFqTRg-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4315c1b5befso15184475e9.1 for ; Fri, 25 Oct 2024 08:00:44 -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=NcVaObSC/M1H9Whyn9Sm9wUdy5PG5I9wFKqHVmMGOas=; b=VkEIJgtaocMvKjSLWMR+mVm1D82d2AethvErlQtxyb3VNbFHNx5dleSJsTZH+F5gNQ mJlM0VdYi00SFr7q9TxXowvvINUDRzgj6UA0W7rlrJP55mON1ldUk/JUTY9FVOd5UYA8 5bPTm7KXWOUVlYTVUhFT9raDA0+VNA1U/NllZy2B7bJkvs+xVS0bjDo6XtOy4ZpwRIE7 P55PYI8Ecs5ft9uLAg8JB+ngLN6aE/BRrhGJzwDN0YTNT1VDv911MRsiYDPtiIV+Vj6/ TDwFeXo9WQgPqbEjEypXzciqhVec2QlAYi3XsS77WCfGseM9xGJvb2ySL8tAVRfbOctl zCdA== X-Forwarded-Encrypted: i=1; AJvYcCWGvQJ3WB8h/eHWHDLrIeuFTZMi8I4mdt5+Yxf0VwaxwROM8Q3SJ0ndyS/1mYOsr8/6oAnuYdHyxhcWTH3I0Q==@vger.kernel.org X-Gm-Message-State: AOJu0Yx5dzJBDbEaqFfS/dXSJG/S6jWHqjATPuMXqaoaoP+zWiv2SA5T EEV1rPoXeOytueyTV3Zhc4wx0wdHp+bmhaN/QDY9oYor+OsdI0AwMsvQifyeHlBQd8jsJBVBSI+ 8G2WrsPQ/Li6C9OQE+8uQlTY66EuRZJlyLcE5qyZWvRrFNB/b0tz7jcfJbnTRwme0 X-Received: by 2002:a05:600c:4e8e:b0:42f:310f:de9 with SMTP id 5b1f17b1804b1-4318c6f4de2mr45988265e9.15.1729868443443; Fri, 25 Oct 2024 08:00:43 -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-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: 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: 839015 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 5945A18660B 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=1729868455; cv=none; b=IBaB4L92Sk0AxodKI1wCt4SXOjT1rGGxPApHTfoj59NSGVJHia0TUIxC6Wo8m58PyKqnTI5GVUo9a/sPtU19+EguoFsmmznb4l4c3VZG6UDh7UQ2D/hENkElyn7TZZ3lhRrihufO5wRFeX1Oqunc1BdUL6syQbU39oqvXT4LN4Q= 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=Kd3lMhtM; 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="Kd3lMhtM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868450; 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=Kd3lMhtMO1ALOx+bXOWGT9vxXKVfZAVQhyBKFeAw7cDQ5H0jW9hO3pb5hj0hIq1a+s9CQO ynf0kSp/RYG5AVtOVvI9W6Jl1mt3E41TfOtZ57flwYb2aj74qx0GHK/5JcxjGri8DZKeEe zRC6ARcIwBpZASSoCHHfdwS+493LQSs= 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-444-KkklunTDOLOHdhPikC65aw-1; Fri, 25 Oct 2024 11:00:49 -0400 X-MC-Unique: KkklunTDOLOHdhPikC65aw-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d56061a4cso1083932f8f.2 for ; Fri, 25 Oct 2024 08:00:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868445; x=1730473245; 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=ICbobCcynaT2cEnjsDyl9EhV0TE13J+5RiajUsDkQai59CwEMj/0XQqKXYrx+0xRtK u+pPP7wfROwN6JnY4OpzViaLNwe4Xkh8yLM/mmGqAZYuOYoASm+6YrjFEWk/pfgzEYrR K3kNGkpdwgx4b8+vnCvYVnbueMHAUZ6YxNFZvcKjN3smcUSe7GXa5qVvcZRdD6NArqDx dsFoyb7R3k3XArOx3slBIhHfvKmqfVpISuPS7inFz/7uAPiB959jmTvwom7qIO+vHkP5 Cp7k+7LCBXkcy01aMEId2t2L8WQU92EGYij+enz0WNQrftRBWOnbftrDJBQbDfrFuQFp IEeg== X-Forwarded-Encrypted: i=1; AJvYcCW1Vax+SxbNsQif4t/nggX3E+3cbHdR47bMBmM45LQjezYmfYqD9WFkM/6C6FdsMd+HuzTlP0+fi0R2oW3c2Q==@vger.kernel.org X-Gm-Message-State: AOJu0YxRJKu8N/mPvu7YOxsjzIXWZ6xw93sUFcDArburTDFT59YN7axs 3Ua5+XUHngPkrnLcmjkYhPb2WiZsB/+hW3SeaqcVuhZuc+aVFQkJKc0nD/AZB0Z5Sm3Qyl+i/qe 1ZwhRqE2L0iF9xvmhOky090KMe6PJwh4gyAqbfKTphseCVUaU2T3MRNfkCsxwZWjD X-Received: by 2002:adf:8bda:0:b0:37c:cc4b:d1ea with SMTP id ffacd0b85a97d-37efcf93402mr6344441f8f.53.1729868444931; Fri, 25 Oct 2024 08:00:44 -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-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: 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: 838753 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 E704B20BB2C for ; Fri, 25 Oct 2024 15:00:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868453; cv=none; b=D4HRF79dBns0XuPpUzyOnZ870CAa3iw4Wq42C+LFv7vA2s/5LzVjupzZOHRNh1aHuAlGHy5OlIBJWx2o1eaqaB0TsTyRFd3glLUOsobUPtiUBcH1StWIK8pwfsFhlQcKvvW06aUeonilkILTV47KwZrY2FY2NZWPYdedLABVKUw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868453; c=relaxed/simple; bh=fUViQ0wuhaRh1Z4rYxnCtcfkzxZviFoQ/oXZmPMz6Rg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IKLhsXS1/JiOY2sn2cOZOnVoUfkOrqYKHf6aU4kvEN2oRoBeV/5bYFM9kGCwmffbe5/je9g0ymskaspONnx1u8M4mqkTjoDBJ0VYwUcOYsVHwOmDqc+3BPvnKv0IDOTHmzm+vB38uzXH6nZfQqZ4sc1NMhHrZJUCfvCq8W+Io1c= 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.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="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-295-aMBVBFx7MiykUZIgILQmDg-1; Fri, 25 Oct 2024 11:00:48 -0400 X-MC-Unique: aMBVBFx7MiykUZIgILQmDg-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d49887a2cso1147193f8f.0 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=2pA/Y9KFQGL5eKPmyYHAWaMItiz6sKe/fm026vyTOII=; b=jS+sCbeuhD4Z2MLdLKgDGIWi/ylBblN0xb3YqNI4SzZkMwwC7NDNxJ5L9Xt3+ifgDS SCFU4Xpa2Pp5TA9lapOEXWRsSlotVVIsTcpntoO/XFKb1ZmL/kvKbmB6nzEk8eE7WUBP TZpY6HLyeHsJQqYQXzDHJg5whfQOcpq4YYtrNb+hVIEPng+KoFnwJKBtPndRReW6Cs7q iMDKWqYAjtVbI1/PoDdBqkye89uahquYOt5K+eImeuii3ZOhfKEu+n7YLtV0uVaF9vvi ex0Se+kYfrczyPHbaawdmwFQpj1cyvc0WUrB3Yo3GDbuTIXJBbkBToHHqOz/Grt9KX91 xuUw== X-Forwarded-Encrypted: i=1; AJvYcCVmbaPfZ9VJrrqsPSdmiEGjr0qoJ1aXDORCBynfaeeWewGlDkoVnpRgP3eOjhcKYzM9tok4MIjFXigR7dVxEA==@vger.kernel.org X-Gm-Message-State: AOJu0YyRRVrse3OVhVn+Qfqu0q2laYK0uUFL8Q+zkez8wxrjmUxGuq9j 67GKBU4nhiSD/FQtKwPCGMPVxgtHOivdtnfRt5I3dmecFzHNoqHnO1pgoA/3FIGCAH+BZoNtnP5 8rfDaFM6hIwcklCA8PcFVJSerkVjufirN32ZJSMd7+CC+nfHcTP3HI6GZCkw+0r4a X-Received: by 2002:adf:f5c3:0:b0:37d:2e74:2eea with SMTP id ffacd0b85a97d-3803ab671c1mr4935438f8f.5.1729868446675; 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-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 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: 838752 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 2B4F320D4E1 for ; Fri, 25 Oct 2024 15:00:52 +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=1729868456; cv=none; b=GYhuvJxVidrXav8oxsOnYLciWSg/QIFMRxT6gO2d0r1L2SkJ14kdwe+ZTDwO9Ki8d78fB0zC2ij+VCIZbtly6NQu6Donm6gRIH90O/1WjDcvH6f4h4Hd69oPCU915O90sLTaZgRt+l+3ABKuCaLTi5byaqesQjepGH1/HPWDEN0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868456; c=relaxed/simple; bh=KRhL2deOZRHNfuo7/CizyodCPj2p+YqlhuhaNJFSYuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mfVh1TFhwA6sz3smV5P6EuDgToEG3ZVtwFVilNDZhJM3m8g+Hfqr/zXPoNV8+KGY5FeGp/iwHRCE9j6AQcKJPN9D9iko4pL5yKPIfclautaO3Pwo9EAX1Lw5liqp5UBPFtCT1Hy/DZhy3BWJROn0qaB9FsCxv9/lBmgBnlXc88Y= 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=hI7XqJhg; 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="hI7XqJhg" 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=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=hI7XqJhgfOrmPC4hfkoBooiTyABwrEMbqoag/WV44ENrLnPZCPzSFM9ytZiTQbcMz8XCMQ 6w7jPyxv5Wh1GpwjBvh+qzvLMWfxePSlAUprcF9/96cG6LRlKO28GvrIWNeGxr1HCjBMJN 6PdyQXH6D+6RhYYwWe9xQkgu50nRXlQ= 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-314-o6dARj5POxKXvLCltk7IOQ-1; Fri, 25 Oct 2024 11:00:50 -0400 X-MC-Unique: o6dARj5POxKXvLCltk7IOQ-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d60f3e458so1427455f8f.1 for ; Fri, 25 Oct 2024 08:00:49 -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=iwIegNvkxpbrnLaKBbCjlUWo2/0Jqp2zDIMR20i1bCVqHGBs8RF6e3pPu02NXL3YW4 k+6WebAi7/TzRe0mhzSSmvs3rHJS93Rgiq8hI35iaJT+sUcYzfjD1clGNr0iGCRqz7Yr FFe187/ispZAUSCqlWvbG+xT46ffqvOR61g4WrLEfoa5dhJQZVcAvoSiJElnTUA3PLDE EmKay+coip+lEniI4hkBL/xTI0N3uxVhLOgaIvL59sQvOySbOBu4L7g+5I2DOvP/KgdB y9VTmWctw2d6wHKUCnKbTrB/A5Tsmyoxl5vsIWaB4qZQeqU27tzGRd4pWN0A8xub4nYz HwmA== X-Forwarded-Encrypted: i=1; AJvYcCWQde5eq9wt8c2hFaISuVaXSTjWJYdFc35rzWOQCxG07z+GwBnoHD65xesVoDEydMlTaVw256OutjL0Zn+Y5g==@vger.kernel.org X-Gm-Message-State: AOJu0Yyqan1GM91btHxFQu3vYDFr94WrmtTHiM8r95xzj3iVORGvNvqE bAKKIB18t4jdAgQpQPDjkV2iid3XItJiRBbf+VhMD3IHV8Gstq31vx/NkuDPJZgZvktCiBySiAU DYP+wgZ+9A4ujd+XEjNSY4eye5oEylJaBou5pcNchYg+s5kgh29PGbw5SR8SFxF4f X-Received: by 2002:a5d:4e08:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-37efcee8c28mr8039773f8f.2.1729868448831; 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-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 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: 838751 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 1384620F3DA for ; Fri, 25 Oct 2024 15:00:56 +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=1729868461; cv=none; b=gj/ZXhcOYZ735DbwBXTiDgYgmoK20w5gB+gVxtJLEAAQaqrsmaVeDqPdotb66ziBoWwHN50wvXt7ptgaESBK5Eb4U/whNmtK1fbYSwe49wp61nmkQCeW0wxpAr4SUdS8Bpu1xWOCyhfy3YFb7PuUy/e4v2zSpbgEmiHSKn4XWuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868461; c=relaxed/simple; bh=RRyy0x2PiBX++bfjCGlA/9AZOm7xwGM5wtpW6IKXyVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DluClwXkA1okZxn8+dN+hZ08BoOFHG81+rAZyrHoMtyU3QK4tvsAFSNW0PGNQSdN+9Q8xWUbVQVE7RY4sesMtrjzc5N/aALyKaAKlpWh2a0GJjyw4DpZQ8ZvHabzS2olU+PC7dr8kHvAtFu64OqFNyFOyOPe9Mdm3y1wi4rw8C4= 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=SKQ4GU58; 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="SKQ4GU58" 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=WxQ5Vib/1yt2THpDXWI2rA9CY+VRhy0DxtAlfuLaLe4=; b=SKQ4GU58S1LeeUgmird6w6HpBX0uciMdcsgIB4MX6IsCnhzxB8dB71qXYuADkPedVoKgzr 2+whH9i5XzevMbjACq6oET7MiAz5m7TowcttvjWAej8PsDzoU8KgJBoPtzNj1mwrfa0fUu W2SB/X+31Go7hzaCQh4q3yVaZtkASk0= 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-150-y9qzAWlfPxqZaV4AsRG_Pw-1; Fri, 25 Oct 2024 11:00:53 -0400 X-MC-Unique: y9qzAWlfPxqZaV4AsRG_Pw-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d67fe93c6so1116893f8f.0 for ; Fri, 25 Oct 2024 08:00:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868452; x=1730473252; 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=waCVBDQ8MDCMzT45lLza7py3Pj3wiJKJTgvwUEuJPIeG1Rm2ZtZdexU1EXecbdvR8b X2zuAma6GX+atJartbi2KQsIL89pxAA8ZEWr3dHDXwauNWJDzdGC8BWQQQ5Ts2cbdmd9 ClStdlg1tzE7/+vYBye/JMvYFUoZ3bPhKHnQ72C26Y17XZJ1AQvUApFsAkzZ0Eodndv4 6dYLjc7/rj37YPcLxGGD7rHYPhsRjP3hPxypJefbN2LeNCc7YxVFwFDOT66XJxnj3F6l sj+BcudWL2PFAr0U51FDb58sGXb6v8Nig186LlpdZivRop7Fp/2tkGRtM4JBDMR95KrB ERNQ== X-Forwarded-Encrypted: i=1; AJvYcCV1jD1OC9DE4szVCTKInAl5248eV14zRneIM/5OAt2PFEu47vfQjA8OUukTQ+VXGVrPOfQjl/6V7ywwr4i3GQ==@vger.kernel.org X-Gm-Message-State: AOJu0Ywz9EWCKtz21dPMCIdPlSQBiErQxKOv8V49D32rGmxlxQz7IGek 9fLNrAAivq9cwU4mAh+p//78vWYcDcO+FUtwqX30aLRCWOemB97hEpKP+Efl+0HFZP06LYHSC5N 3cx99UjT1nWd53faZMspyEL4QV3s6zjEECRkpBszW+y4xVM+VwVT/Jwtw1haFgjiP X-Received: by 2002:adf:fa51:0:b0:37c:cc96:d1ce with SMTP id ffacd0b85a97d-37efcf1f8a1mr6808539f8f.24.1729868452212; 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-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 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: 839014 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 BEFF620F3D6 for ; Fri, 25 Oct 2024 15:00:56 +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=1729868461; cv=none; b=P4y4qxG+y+W0xHzcO8OnkfTK2hR4glO+zrjwNsOAPayOSfKjGIS3b/SvZtlZ9wLZfNeiUHki9SEorAYC4ihxvPe5gQQoRyJJg1bPhbxj2q95cqcUm1UWKcgxTzbWDSC6v0Ox5eycd0Zbv11GvXVrm3Xdd11KEkxRhj/pMgldYUM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868461; c=relaxed/simple; bh=x2AO4woPu9H2aNxl2TylFo7TB42POmIv8HM+dl0TTWE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gbvv3mlJE/lEhY5NXQdP+PmdDUbsfCF5BXHb2CztoocMLiDt/GqkkDd7fZeNzi2bO4DoKreLTBN6fTNusg2vXPydm/TA06ohb5rK/BF1QOIqZz1Y4AvUJeqESRGAh9Io/SnSL5DY1Exk7SngI1rhTCBOu7qgcJjqGgedxR85CPU= 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-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-298-XSWIVHeqPK6CnhzrewElKg-1; Fri, 25 Oct 2024 11:00:54 -0400 X-MC-Unique: XSWIVHeqPK6CnhzrewElKg-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d5116f0a6so1025224f8f.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=DqWCjCxKTTDedocIr8FgyUkMgS0/jiZ/xmENPvC6VbVdVoehafGtARodvqOOYVbDiR Nqk8u/ejYOAaxbXfEDjNzLtwt+HVM4bh0W2ybUSAb2O6k0pQFPzUxAHH9S7NPSNo3qOs HsREEcHf+GkW56wYveOvNPle5bX9Y5zjuqS0UtHWjqpE2IzOpdLpoHgTpCwrf0mYNx/V JRpKTHPDhGG5xqW0vUBr0cVEojESWNrJFMkukWhlQRLBMwf+k5A62K63h5kS2Mo9RAjB d0MYTkRf37FBSI78JqBQQHnJr0xmlLPqX2ZDnZFTTPUeCEEoBXLogEORiKTZ/TQV6grn D/sQ== X-Forwarded-Encrypted: i=1; AJvYcCV/NfjAsnuw4/2d0eW79ewyE691+usPmknFj+PIG0Qr0qexr5sxW70jQ6hFhBtSiygnxTVDQvhspOfQSAYEGA==@vger.kernel.org X-Gm-Message-State: AOJu0YyX9tjOL2zj7/AgtGKXPCJuN5kc6whC7RStMobjk0aRj6OguImg i8BU7PgV3He3NLCQULQc4cQ843sYqiiDX/in6JUfewPAbvrtsuXTnU4Mw/o92xv+LOPeK+kmjum jz3d+7n7DMOHjv7SnZxH7qVm+OxkcdsLSb/JowBg7u3ZX3ZzHvR2Z0hkz3gjP5v3U X-Received: by 2002:a05:6000:178e:b0:37d:4937:c9eb with SMTP id ffacd0b85a97d-37efcf05ef0mr8444799f8f.21.1729868452896; 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-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 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: 839013 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 24FD120F3E9 for ; Fri, 25 Oct 2024 15:00:58 +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=1729868463; cv=none; b=YC6cWSbTlE4LJ5V9KyNKZNGTicR4Zn8+HN/hOwF2MiPoJAyFl2262YOnyG/QiF/JW3BQBi5UYYRRt1ruCVz7xEMlXB7PLP+7oWaDY0fJFT/X5m2oUa/TPuEEbCEDFckR/eLgXSCbklbp372ZEjuf65hb682ewrqk3qL6hmIFaR8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868463; c=relaxed/simple; bh=RcTa7mPaWn9S/3FL+we6iyllf4n7RFykRGESqGJxd90=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Kc6gXEOrWEuNeuyNxjytdwrEA5Wkk57A7VXASLwEXHTSr1pwSF1lJEJFWADGeakAkpt9rl0iL6aRQJbudAGZFsByfCyEGdknHKn9XLzLvkeEKi2hhBseYqtaNH4NF2Y2Pr9ICQfpzCLdWu4yNMEicMDWFmsnQ5VxbbaTofaOM10= 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=WAsVYMT4; 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="WAsVYMT4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868456; 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=WAsVYMT4vDgE+tBIGJRU3RXgIqedUTfzOkMNwWDz0V89SIQGqpK3/1Muq35LxIAz5h5VX8 2z5l6IiL4zkyvdFQ9O0VPgs7D/dQhPy6FV8jWvYRm3SMBpdu6ZFcu1pj/+9th2ixHs8tMD pvjFlWQWBzmbEWW80tLhPeHRD0S6Gss= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-683-iYqHJ4BUPx-5ZQutvaD6tg-1; Fri, 25 Oct 2024 11:00:55 -0400 X-MC-Unique: iYqHJ4BUPx-5ZQutvaD6tg-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d45f1e935so1129170f8f.0 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=1729868454; x=1730473254; 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=UpvNQM2a13CNgpmRmq9yuxv2qlipLkmzYeF9/RUG51ruYkOTZ7oRUIqYQev9NJeEWR vQDVB+Q7ZfaVeMdFBMD5Mg0ApYKVJgF8wr2eOW+76TP8f2M64va5lx2b2G8HLVhdet7m uiE5ltkPWMxenqeQujnauP9iDp5eVMmHsCZuC7IfmLc2sLD8I0X1SknpzP2f772/f5v5 JXCeMgUIOkUqSgKdVcb7UOt6ZS3KbgAZ6P8DQLGnV2GVHwT3ZHZ+hb36+tnnaMpfB/uH NsnbfGrelBvMj786TVKS4xFBg32CQWvHnGDbFtVDDjgr7RRlSzhVm5u3hN0Bvcoi0abG Y6lg== X-Forwarded-Encrypted: i=1; AJvYcCUNks/GJxR0brvILADs7iwJ9flNsbZyeeQFqMcBLf8PsrpUXBsXncAwAsVq6IL/nB8QHHGZbvyCqXffXQMxkA==@vger.kernel.org X-Gm-Message-State: AOJu0YxQzJ+WWZDBs314cCUza3uf5qV05fMjMLdobKQjtJlEL8f5B/I/ tfPxw4Y944RqMzaW3nMbIcWZtIPqkTZwPsm1tU1wJ8tCVIWcnOIhv41dKFsrOpFXmaOfqg/NHYv yKsqGsCw2RxxxeMd7OhNPCRdC/rBNEeOzD2zx3RCbxXPVTdr9ExSJR0uXxRD7xCPw X-Received: by 2002:a5d:434e:0:b0:37d:4d3f:51e9 with SMTP id ffacd0b85a97d-37efcf7665amr6749329f8f.40.1729868454480; 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-wireless@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);