From patchwork Wed Oct 30 11:27:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856387 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBD5B1E493C for ; Wed, 30 Oct 2024 11:28:17 +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=1730287700; cv=none; b=rd6Dzuu/N/xyw4npe4CiMLRhkVstp1okGmvfV4gZaequKsRRuV8wT35H9eRNkNZs9TDolGE1dnM4FktkgQLwXtdBuDUc2xDkcpaQ85y3FNzP8g9OOronrUG20EQebJys2zsQJ4x6VQImoZFlXix71gwDvFamGAPtDxZWQAfg8Kk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287700; c=relaxed/simple; bh=q3TYZ53foBadD/cMlyNi2anAEGoKt2ZxGv1qO1diPeQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=C8sk5ZjzJd4vleLilfVno6oK7qUpdm6KTMLQO1KYWh8+mQ1rvhPi233Ryg6HJVo/IBM57uFSbNaoRRTPx3NpILxgUxO7UXMrgRcYoQb3kY2WPa674VJqmvbxr+Q5yora0TzXwBEvFgHUfiGRvOous1VA/HTvQGna1uGlG5vFQSE= 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=GTTRGePb; 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="GTTRGePb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nmhs99F0aBbo/KjdAhIjGloV5ZKJmf6z3p3cVimWjlk=; b=GTTRGePbPl3PDUVuWGwdUTaKu9cWWev1SbaVxz/Bye0mWnjBaWxnSucraZRIeoJT0KH7vi Cbknc49doWeH2n3WGwk5W053UkVxaB74LVNKTqopodPmdJ1mqAqx7jkYIM9Q0iVzP5xQut A1MYZtP4x5tU9Od3HGCSxx+ZyFmi6WE= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587-KFEV-urlP1iTAXVNRlASHA-1; Wed, 30 Oct 2024 07:28:15 -0400 X-MC-Unique: KFEV-urlP1iTAXVNRlASHA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a99efe7369dso71719866b.0 for ; Wed, 30 Oct 2024 04:28:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287694; x=1730892494; 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=Nmhs99F0aBbo/KjdAhIjGloV5ZKJmf6z3p3cVimWjlk=; b=r8FtgtbbF70J/wG4ST1jucCp+tElyQG+0kUL+KUEAj3KEa6/2IpcOaAGJ3jZOfIxhr oGsN7q8PSVBtT2zKrvW3vGZ5O/2tl3tCJK86bIgEhBNRdgUlfSQ1CbXLjFLiT681Q8L4 4C5OSq6X+N2sjUY93UmlyJhrIwQyFnrSsfBzsczNehgjmLiR1uUe5VMB3ad858E8cZrr 8eIDwSbzun/9Eqy18kEORyPBqS23XhQE1XDX0ELIhAgznk2b3lV3qCQGdp0MgHRzev2P KtSGw3WmBOI97ZcGkcAg6NzHb/BLdta1F6jUdV/bkG6428UIYnH7SdSZ7Iec+TYiPX+0 WNeA== X-Forwarded-Encrypted: i=1; AJvYcCXe3YWBN+6ssOM44V8VcmNGFmd8XB6ABqP1Rt5iJC+jDlk/pnrupsW4ljDEBajszeEPdNxqxHYkA/PVkSwS+w==@vger.kernel.org X-Gm-Message-State: AOJu0Yxj6mjap6Unrd8deCsEJC+msLhM+YEIL0xtqPVOW8umK84xH29p 4hrlW+8LdgUftPeVJoYcyYBr47eqrR7zX3Q9CgAxUmyXs7epZ/OMM+ZMRlSIXP1xVgP2XXlnkm3 F/HwBtsm1V4DwfeKlFLdKHV65bHRvp+0yGSKcOcsn61TlpKJvy3w6JAY+m1CxOFyg X-Received: by 2002:a17:906:7955:b0:a99:ffa9:a27 with SMTP id a640c23a62f3a-a9e40fd6b13mr170563966b.26.1730287694548; Wed, 30 Oct 2024 04:28:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1NLu5M2018jLIxJX+Z/i21emZn/jQBhcI0nUHdCEwPkxlqgV1lXWB25R+uQkV5ZaptpnaqA== X-Received: by 2002:a17:906:7955:b0:a99:ffa9:a27 with SMTP id a640c23a62f3a-a9e40fd6b13mr170558666b.26.1730287694067; Wed, 30 Oct 2024 04:28:14 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:13 -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 , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 01/10] PCI: Make pcim_request_all_regions() a public function Date: Wed, 30 Oct 2024 12:27:34 +0100 Message-ID: <20241030112743.104395-2-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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 Wed Oct 30 11:27:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856388 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B6E21E573C for ; Wed, 30 Oct 2024 11:28:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287702; cv=none; b=nHzZzKw4dVQBkTOj6FYbdho/HMX8nhB12AiKWIgMJb8nxFyio1ibR/HCIH4Iv3c79HqzGtHFNGmSReBxPfXbPg8FBVDDdyp5tXxsao8HQrTWBoowRP8RTJEfJjqUIgWzwfncP8E5s5LJ1rtXOu4OlHmPR+L/yQ85yZ5/wXO6bIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287702; c=relaxed/simple; bh=s6xBjYgC8JsEjVYTXZALRaY3DljRr0l2UeRg0HzxlUs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ecAlm1o+ciWY9U9vChkazg3v4n88Bjc/vjMin9iiotwfOX5GctHJ/GFTTX51S8jPatkcpAUAZr11SuTspiXKx58q2BPYDlTUCY6zIumZLzcNtkdXmqsOER9BnpwBXlL35BvVLexug68DZIdWh/gw20LRqyFg+t05tM3630JK9yk= 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=GSrXIOuT; 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="GSrXIOuT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287699; 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=GSrXIOuTRVYGOZQFP7vDGsgDudzH6yEq4looFJNF9MUEi2iujAzFLgww6c7w8t65yw4WB5 wV6d/IYN5R4eLgA9GxhkZ0yOMxkOGd8iwuJA7m73CVYVXwa1VOPN+niOIpr42KYlysCOb7 9D9/vQI5H8EnvpAJRGYjD22UOZJhTYg= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-297-wiE3fxUaM8OIGbJpVyXplA-1; Wed, 30 Oct 2024 07:28:18 -0400 X-MC-Unique: wiE3fxUaM8OIGbJpVyXplA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a99f084683fso469651366b.3 for ; Wed, 30 Oct 2024 04:28:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287697; x=1730892497; 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=q9Y/NodKsFX4Qc3Ntj0w8E+43o+13c8jyWygBSpYRd0n5FeyLfMgkg8MHKjsOOCJiD cRSAFjUdByA7I0uXAhc+Z4kDOlaNzVgxp6Mss3E4AjWLw2GTkpOy9Y/YZF1V4T7BmlyX J2S6u8OATsn94cQXmX69D2dQupMjaYe9/F23hGSEbPC2J8WJ0emZ7aPAnQZ/1lG9ubhp 7JqvhdAGn4ApyBGYmezMLNTKVveXpImeD3J7XsEiVxFic+LAzzk/AFUh4Geso43POXh/ Fr3ZdX4KVhyzL68O7RIxz8v9ozdshFqCVgJf1bFmyMMpjuUrgat+h1YSxzN7+qRAkBNx APKA== X-Forwarded-Encrypted: i=1; AJvYcCXvvGLKFYISN7C+7uPT+VMf9cD0EnuFG/AQpgWCjrZnqJd+PcpAPiU2tK4xIpEl1cMBRc9nm4/1bDz4Ngs07Q==@vger.kernel.org X-Gm-Message-State: AOJu0YyAfcZJPrj36PUQYPKEmMMvoKtFZkVEv3AcwrjmAKschFs5A51X LN2aGkBmffy301G3mshmGUf6dTd73qwzfxjQgcRaBeg7VorNvzsnQANSvtl/T6yrGsYBprOMj9o N2TfXEXHypXz2CpCZF6LuMNq8n3JqsY9V+FxfnWatMSuqZ48UEabvKnfc+Ydk0rSv X-Received: by 2002:a17:906:c112:b0:a99:f71a:4305 with SMTP id a640c23a62f3a-a9de5ce4681mr1673679866b.18.1730287696740; Wed, 30 Oct 2024 04:28:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+Qw372/fguBgwjcPRR6Erm7ak5aSYWpymKMS+PzoyIfq/UJQh3ycjqPNXeYK3ELeYeYalQg== X-Received: by 2002:a17:906:c112:b0:a99:f71a:4305 with SMTP id a640c23a62f3a-a9de5ce4681mr1673671966b.18.1730287696232; Wed, 30 Oct 2024 04:28:16 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:15 -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 , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 02/10] ata: ahci: Replace deprecated PCI functions Date: Wed, 30 Oct 2024 12:27:35 +0100 Message-ID: <20241030112743.104395-3-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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 Wed Oct 30 11:27:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856389 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05B491E5020 for ; Wed, 30 Oct 2024 11:28:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287705; cv=none; b=O+m7hJGNBprLcwSPN0eq1hCKPknpkkSJ6BcX6k1m7m9Z3FEuBvAICU2xT/83lCzyUCpTcMhsm02NGlqG78FURdIf3Dnj3pmrn3bRQz+f9Nl/PDWduRXNhVwtuScG58mTz+P+NOWi8tI+CyYjgA4qs6+tQN9j0swk9w8apQacQXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287705; c=relaxed/simple; bh=YCSleCRL8+zgmB0F5bhpOuGHDhDr1YVS5o/lIBwlqhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AwqbMCzfNSmoTzCkG3IFK3FQslmjSzWw/plCWDh4WoARbPNk5fwy1zwdZbj/HUT+xKEwYFgKX4yki/huIIDKJvfislyExxynlONWRqRlFUHhcorxa5D/NA1iHK0BysCjy3Dyb55LnkesialRcfMmBNGZWoD9gvHMI2LumvUMrJI= 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=bkdv99AX; 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="bkdv99AX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287702; 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=bkdv99AX1zJN/9YnJV91+4S2oU+e9CGW3G6xJbsdPeCSba7Nu29ZA0OeRr20HlmCOc342E uM4cNk3itITz/lp22P+HrdPrsHB0vRff2iDVHQpDXE/IgqPw/3jMafZzylZ4OKgDL8pkBJ 2mN6jFpHe8MPsfa9XWo+tU4nLqmDcSU= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-279-5rGpwqcROPeUcmE12gGw0g-1; Wed, 30 Oct 2024 07:28:20 -0400 X-MC-Unique: 5rGpwqcROPeUcmE12gGw0g-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-539e0fa6f3dso4940453e87.1 for ; Wed, 30 Oct 2024 04:28:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287699; x=1730892499; 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=H0/jRsXp8YKq3tHQHhTif966SZSZBLGK6mkDtn+67Aw7ms1phBodYNvAa7npfD/8dL NOWRZ/r5e7mOwj8fzf/7i0MfVxXACTnchBT8bkUwLHJ99yifFjC2CVE4n1q7s0IQklCk zFeRwM99Hr8tMKpEPds0E0VZDHJ6q/5Q91hqXWHZmkYICpQb0hZGxPrrw+TMXxdF5BVR BSOnzD/ZPMJSTa6E1g9zaHYWMp8lpvSetwwV1iRrPHtcoJjyZn2DdMK4CtOHE7bgln5Q cXTsegRcjpozJjg6dEoaOOrJ0QE0QPxHTrHQcrjpJz16QKe/xN0YGDVPlda6RexRAtAO GKIQ== X-Forwarded-Encrypted: i=1; AJvYcCWtV7t+CYAy4T+ZahfE2ECrgjfqZ7LJtZ4mBXNbATkP2uMt0iLVRgxRjLTKSUDBeo1kBp0XFlRjM14b1UYtQw==@vger.kernel.org X-Gm-Message-State: AOJu0YyeZrfOH7pL0gckVoeOjsseX8Mh46M4FoIe4ku1ZG+72F73EsCn LLHK1xuepNpbVDnKvBri+3U5EFKfbYsAj+gWGxZvpWDCcJ8z4pGrR+FeoZ9zO9CJZwMVMM5FUcC lAQdDjH+dP+103nFXe/FZwEaqdvKsULOTO5bKlWqayvpUOkpV5uiop1xRaVZD7x/I X-Received: by 2002:a05:6512:3d06:b0:52c:deb9:904b with SMTP id 2adb3069b0e04-53b3491e062mr12333049e87.38.1730287698735; Wed, 30 Oct 2024 04:28:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBPHC+7mDGBZejhuxNPIAbldUy5rOv5CXnQgrngWn35PZTJpvTSwKiUrRZBkTh6tcloHeZoA== X-Received: by 2002:a05:6512:3d06:b0:52c:deb9:904b with SMTP id 2adb3069b0e04-53b3491e062mr12333000e87.38.1730287698209; Wed, 30 Oct 2024 04:28:18 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:17 -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 , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 03/10] crypto: qat - replace deprecated PCI functions Date: Wed, 30 Oct 2024 12:27:36 +0100 Message-ID: <20241030112743.104395-4-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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 Wed Oct 30 11:27:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856390 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CAC61E9066 for ; Wed, 30 Oct 2024 11:28:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287707; cv=none; b=rQr9iTwXCDusLmH2iWMxrbg9vVtUC6wqrEhHm2a213AtIzoINls49g8LZnxMvIq8wZRVA96x4uspJtSDeF/g36Jq9+oEwJVaFu/1/nkDF1ImBc+iOjQLq0Dg07LojbZtOsWJuXiXmq3pAGd5FvsEAS0HID+khoXfsVuabcudX7E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287707; c=relaxed/simple; bh=sVXXOvwhjUtLTRw/diUu9Q79ppS0cnZqeXoEIt69lpI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZobJmqo0OHOpqv696fMWhn2qcYzsa7XX51JyyIqHdppqAWOgPmaQWWikI9WMxuSaIme2Quz+bfs3YTK/ld5eZUQL4jfhSBTnaptUW3dFw8lL3dKd2UmBXEJabAjs+yPEI8YtM/PBIfXxPOg+AE27MrcbZuXlv9U36XUg3jUy10w= 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=cCdf/2E5; 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="cCdf/2E5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287703; 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=cCdf/2E5c0LtngjaLCn8QmG/SzIrJdqiBl5fC6KKONcGeooj0rrEdEcAHjIhzg9TiucNGJ iioQNRahrsRCMOy9x7N0M40B62OKrJHEiM4wM2xKhs0i/ed9RwMAOEadlfPI2VlHWV2ujj 9d4499aM7IeD9Fgo5uxr+JtobMPRjPw= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-186-RKJHGg00PNiNrjoNsmP7WQ-1; Wed, 30 Oct 2024 07:28:22 -0400 X-MC-Unique: RKJHGg00PNiNrjoNsmP7WQ-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a9a004bfc1cso412996666b.1 for ; Wed, 30 Oct 2024 04:28:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287701; x=1730892501; 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=nbl74KR8fEnXU7MntGtzhR22kSnUBm4pMELlrMebtPy8oO8v147HiI0xtJGKYdoYqR ga7x3xaFkdZ/lTIPZbA2jagaQDZ0RwndPJjM4IzQfDv2Map4uqEg5rPZY42hHVItbKf4 7cdgxU91kxXIJi+YCC0XTLdCGtVrnKxUHdztelvz2TovRTms9tCr2Xbjfw4htjX4jY0u 3FW6jSsxu4+slX0AolcZEpzOsiQEVcRBUejEVVsMCi1Rv9ycUzbdbuxaBF6xg3NP0PEr nuW9sHoKEiYoCMrUVKkVcn7wrl6WyLPdP1+1PVPdT24Yr78KyvHVBEpjIxIOP55NU92A ueZA== X-Forwarded-Encrypted: i=1; AJvYcCW7GwdK9LxhhmPz2spV9c9v7Qn4itriWctzL6V8Y++Btek/yvh5gzwmbNMqYXs/BqCJtx5mhcxm8sKwFmf99Q==@vger.kernel.org X-Gm-Message-State: AOJu0Yy14Gcoyav4902NGv/wuldOLsRq7Pdyv7TQzMdPjXE2qMcG3h6O lCnfh/Nbh6fDf3wLjp0Gae41vWqqULm9vghUV7vQegWbNJzp5djvNEkB/ek8aCF0uiY7kXZvlOY DfBM2SPwNzBsMt/61cHccf1a1BoU5YtEoue8qLrx62LCXDO+v5I+Juc7qkZ4N0zVn X-Received: by 2002:a17:907:96a9:b0:a9a:a88a:466c with SMTP id a640c23a62f3a-a9de632e59emr1415762366b.61.1730287700893; Wed, 30 Oct 2024 04:28:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGudVnW4el0kwXnwPwEMeL2fjTQivAxmW2c9/C8Z0/IVDdT8lY+OqbI5Fm1jj0o+gAHD8cpew== X-Received: by 2002:a17:907:96a9:b0:a9a:a88a:466c with SMTP id a640c23a62f3a-a9de632e59emr1415754866b.61.1730287700250; Wed, 30 Oct 2024 04:28:20 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:19 -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 , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 04/10] crypto: marvell - replace deprecated PCI functions Date: Wed, 30 Oct 2024 12:27:37 +0100 Message-ID: <20241030112743.104395-5-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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 Wed Oct 30 11:27:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856391 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29C951E907D for ; Wed, 30 Oct 2024 11:28:25 +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=1730287710; cv=none; b=XXVsdITLdiM9mjCI2iiaFHeTmnAly0YAVQghUhbgfBj7SUHplnVjgm7eBLkLIFlOdqHcYr2qSCVb/lhTZBpmu2oVq4ga9iA42cucNhg+xuK6m7Z2NtTYp2TFTmayKY2K+qOZMLWmBEYHnUarqTJyMRPklyAIT6WZPDQv5IK4ZJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287710; c=relaxed/simple; bh=J3pG/0Gfw8HnALwZ/Br+hrSE4pEfpHhtl4LqImtqkrM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ALI6RN36xJluxQ/ewxZBgpSaonZncBPCZfdoRMjFBOox56S7/IlslbF5x/F8llxLKtrvLX+Rgeb6Pg/VLyU1NIpw3VsYGayl8Dn51IhPM+c38shGDSD2voW7cHLcVxVtrGC/r1HxLqosKzjkhr1evu8Pz/4Uu0y6gMGa0tIJx+g= 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=JyXmmXoF; 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="JyXmmXoF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287705; 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=JyXmmXoF5pGAzoiakSse6gqp50VJoMjCKCTbHVId2ikC/2Y4kCsBwjo0FjR0u7EmtQFP5g UCBeitrIUPcFtYAP7XXxOJkR+oyOi+Sy1in6xzSnr4N0/YJFISJPpUdVps8SguvgqY2da3 R5VlNBlWIILnYe9tZC2+H714eouwYTw= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-342-7vH41AXLNemhPynFcxDu4w-1; Wed, 30 Oct 2024 07:28:24 -0400 X-MC-Unique: 7vH41AXLNemhPynFcxDu4w-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a9a01cba9f7so120896066b.3 for ; Wed, 30 Oct 2024 04:28:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287703; x=1730892503; 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=fbMKNrznhmnQ6x9gts6JTR9rJhIJyck6sIQmVrw4Vk6ffWkk6rB1b47pBDj1nE1yN4 ztf+3eIhvZfB3Fq+jmF0PjWn65pU53ID8/kmGQm8i17/0Nb7HiwPmcFREDb91lFQOKMj +YKXs//vZ68xSYb+1budZS/DKoENclEBHDgtzdAtITpi4evvzswsL92w63+hCG0b+fVa KjJFJQCZpTk3qz2JuOqktqoBhqqe8ZqqOYwjlex7Lg9NnkFtddWc44QQP6ZFkqXpG63R jEpLTkvD1KKPuleGLCnPZqybrcitUlPis+h5XzXk4uxPM5ipdgTZX2nXAxvsDK/jJz8D r55w== X-Forwarded-Encrypted: i=1; AJvYcCWej4T5o67PHtNQB5sLzpjJL5yCCiI8VqOlEO3Skyp+1092omAfTq4WMekcwP2aRylJQZuH1icFPyL4dU+3Jw==@vger.kernel.org X-Gm-Message-State: AOJu0Yxz6AW1OTgx9pFbjciDarh8723jBxPEaeeJ+gIr4Xo3wodvfnaK hiW7RtNx1eAzp+PDOWqT3k/h/dDBF58m6tnSUWU7f23VaKCPzvvX4im/BEORd6lwqLehAIsIDGu IJxk237oluusv5z+jrAHonoBEDnd3URSdzzW96ojBZ8+DgdPbQku8OK0r5UIf9HRf X-Received: by 2002:a17:907:3a95:b0:a9e:3af1:eb1b with SMTP id a640c23a62f3a-a9e3af1ebbcmr190402266b.38.1730287702733; Wed, 30 Oct 2024 04:28:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFToQp/dfLAgkkWdoKZY9+BkNjMsRPPHY3dBsz+y7GusLq7PV1rFcL96Aa7HB79+WgO83hbWg== X-Received: by 2002:a17:907:3a95:b0:a9e:3af1:eb1b with SMTP id a640c23a62f3a-a9e3af1ebbcmr190399766b.38.1730287702314; Wed, 30 Oct 2024 04:28:22 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:21 -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 , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 05/10] intel_th: pci: Replace deprecated PCI functions Date: Wed, 30 Oct 2024 12:27:38 +0100 Message-ID: <20241030112743.104395-6-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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 Wed Oct 30 11:27:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856392 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB6131EB9F8 for ; Wed, 30 Oct 2024 11:28:28 +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=1730287711; cv=none; b=Ppm6oQGxTv1E8MApuc/IWvJbxixg+rlJeYpYW31Ke+xFCHSfCODDGterFH3hXDBOfpyBtjz3F7kmIP7XI6PTKPbyKC07x4QPZlflrAEO2MHZGlhWmKNuB8rdfwOw2AhEDMfEaPz0C8CvVYxJqRsyzokzxg8Up3NvqxXD4sGgKI0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287711; c=relaxed/simple; bh=QqrTki7e9vRgulG4RoLLB4/C1pX/5pt58FH2V8wlJVg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iV/Oct2hlm3zFVn9frcDqazZxgqaJfsEQqRwjEbZzqCri99qQW01ECHqJikELBIfdR0TTY69L/onlnF616E3XoaMoIXgMAV3qOQ9IzmZw+ldInUBp02EChhSP+mpgh9ILcWD/an04OUmPV+5QMx499IjjL9efvhEf1wplRMBvPg= 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=Ri9SWFz1; 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="Ri9SWFz1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287707; 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=A2mjAvsnCtejFog6952WPlUz5OJHFOOlk35n7fKqpM4=; b=Ri9SWFz1aJRSBSnkW4sLfD6m6vNgHDQn/heNqYtJPseE2sz9f5N/6KgMyGuNEUQ+pOa93M riEL+m3N+/vnLwZ7yOycTK4WXpoR9EeU0zPR1RwYR2KLV1kucAwyNoih79vw2RPmpUSQhk d5BVQNhATfWNoXzVtLoZ3wo3LYfKUQg= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-613-qNRs6c6BNHmlEF2BkTu-BA-1; Wed, 30 Oct 2024 07:28:26 -0400 X-MC-Unique: qNRs6c6BNHmlEF2BkTu-BA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a9a0d8baa2cso78093866b.0 for ; Wed, 30 Oct 2024 04:28:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287705; x=1730892505; 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=A2mjAvsnCtejFog6952WPlUz5OJHFOOlk35n7fKqpM4=; b=P7GRzBzLbmGHMlwP/upLTtdDSHCVFy4JIDDmeeuhCGvIWrBAqneN/F5G6sCRdyS8a4 dLgqrQ2AWUA9/BoaHZUQDdn6Cd/Gw+1pKFRIbA9fVM7bwdRn7eOLARi9+6G05Low7Kqz li1nJsVA18J4ji8GpZaHwhX9kmU/kzl4RYkpy3lbmO7fPM2xw80TggoL8oHekqVheIKB MKZgMF0Wl9+xG+mHQlv+1PGTHjfgz5qln/UPcv9xssiPZuGviG8Ba8UJFwSa5rHXmUGb 92NjwdypplKuePpDmO+902v0UYXfi1rCKbky/swF4nVRlYcy9VDBqm6Aia982XEHBcs2 57GA== X-Forwarded-Encrypted: i=1; AJvYcCWrjlp8VJIgGb/OfAPoxw/H3ye+78rk9q9wwjcZQGsz10vy2i69hI4nxXkqBUgabiaQ2NO4g8sbr0k+Me7dDQ==@vger.kernel.org X-Gm-Message-State: AOJu0YxKLAsYH/rUmPqzOCrXcp4i+IL6tJfzlxvlhEvdBo+gk+wgmzEx bEMHc5qgNVbJbzqV8or9o6PMhxjtTpg3OhN7DSn1hvtQ6HHzHkZuM3UEb2vSflyvcozbpDTpoFi wh9v5mNztwO9x9e36k6cV6Sz3Drd3dWG7yWFpEnOgWjm9/GsuSmx0UAjxFFHRtDm4 X-Received: by 2002:a17:907:9628:b0:a9a:4101:597b with SMTP id a640c23a62f3a-a9e2b38c911mr465274566b.9.1730287704831; Wed, 30 Oct 2024 04:28:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4ON6XbTaySPnV3R7K/gjgoiYFn4kvGUkKymLGG4I2FjjIR+75rc4iLvNfjp7Xook5FqfydQ== X-Received: by 2002:a17:907:9628:b0:a9a:4101:597b with SMTP id a640c23a62f3a-a9e2b38c911mr465271166b.9.1730287704397; Wed, 30 Oct 2024 04:28:24 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:23 -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 , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 06/10] wifi: iwlwifi: replace deprecated PCI functions Date: Wed, 30 Oct 2024 12:27:39 +0100 Message-ID: <20241030112743.104395-7-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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..4839dcb199c4 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, "Requesting all PCI BARs 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, "Could not ioremap PCI BAR 0.\n"); ret = -ENODEV; goto out_no_pci; } From patchwork Wed Oct 30 11:27:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856393 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 455091E5719 for ; Wed, 30 Oct 2024 11:28:30 +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=1730287713; cv=none; b=X9hJCX68HIKyC9A2XrjCYPLjcslngVgc6BX0WyGQfCNzUZ3dciVdnbO2C+jO2u2Nm7sDS21bZicLsmm/3hVbxSyQedZ3Gv2UPHtrIlq5Ksojpoxvi112rEwf2kYtT5SS9IK+bKA2kUW7IHqR4TSMujbhkaeHOUhJOYytdU6IeJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287713; c=relaxed/simple; bh=KRhL2deOZRHNfuo7/CizyodCPj2p+YqlhuhaNJFSYuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hvfgDLIl/zUjbv+sqrAvHPh29ygbBtRDlxu4jk9OEs1u47CU3mwan5tI5IP8L3y7W7SYkz/ljt9UHJy7g5R/Q81CaqXWWn3TJiiUq5sDG8B9F3M0HIThOGnWwptlLX+/a5BrVwlFvJ1RvO1y2wRaba7+JHPh4yQHmFdAONd9890= 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=J7jRbX0h; 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="J7jRbX0h" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287709; 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=J7jRbX0hVHL2M1vCqMTT+tQCHtcF9d9Gua+sCGyn4JkzE+Tcfu1E5BAovGorWhyUdDXr8V EiKsvkdtdl57ggjMfOnb0AD5XdlZc1kLqWGgNavpw5EbcW6O8RyRmNgJzCK9ISXRVYNiaG zk2eigsA3vDssAklEjrMt8UTWhmkPc4= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-102-rhZwi90hOFyOZKBnyFUJOw-1; Wed, 30 Oct 2024 07:28:28 -0400 X-MC-Unique: rhZwi90hOFyOZKBnyFUJOw-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a99ef476aadso477931166b.3 for ; Wed, 30 Oct 2024 04:28:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287707; x=1730892507; 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=caCtblNe/V09Mg/hkjWn8s7tGhhkYDesKIn8OrUAKDxA1dxcB/2mjV6jbdfRqeGBaR 8OT9QuYKzsBhguyBlv0cDGs/CJKW5ZLrRiJJWGmCcGNxgjAW2nMalo5HzA8HUmI1li6P W+d/iRJaPVJoWM02jvATtvYX29B2vfy7Vs/lexAp1rVt5RPYxrohXqI8TXowsKFhcs4a BsD4sFOvOT0GISl7rWdj490pA3sTiOnVdb1SSAXm9S5qr888QyaEmxVQ8HeXwCaAp4Ib JeI9f/NfmVnPhWrj6RE4VnyzXs9s+EdSnT6FECr3XDkRAluaKVrlq2OKjgMOR7+hsTV9 vbIQ== X-Forwarded-Encrypted: i=1; AJvYcCUutVJXU3mVxbWVU/qHtXPewSq97911H4/0JxZSDmgjWdfGzVAVuAyb1svKKtH6cwC0ZGbbUa59smNy/mG3ZQ==@vger.kernel.org X-Gm-Message-State: AOJu0Yzv9UyexCMwMoa5YI6FKLcaHkTBkv5sVJX1Dzz1WVq3yCfVVd9p 1UBFVliXqQZYgaEh0jexoxhcR3cBBZd3wjanH+mRd42hL+0aI8I9RHYc7POtV8L6Zj/z4ug25dZ waRn55jeIzRLz5bxtnqCUCIi/s148HVl1I4pXIijbT20H+XVwWNu0tt3dMnWYUas4 X-Received: by 2002:a17:907:2da1:b0:a99:375f:4523 with SMTP id a640c23a62f3a-a9de615a8f3mr1351690666b.44.1730287706878; Wed, 30 Oct 2024 04:28:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwg1LvHm/sBVMIGSqZqjkRb+x/AHkoEL8qETnnIUP4SEpWG85yaxrXSuFLHiSID89YoxWbOg== X-Received: by 2002:a17:907:2da1:b0:a99:375f:4523 with SMTP id a640c23a62f3a-a9de615a8f3mr1351683166b.44.1730287706365; Wed, 30 Oct 2024 04:28:26 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:26 -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 , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 07/10] ntb: idt: Replace deprecated PCI functions Date: Wed, 30 Oct 2024 12:27:40 +0100 Message-ID: <20241030112743.104395-8-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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 Wed Oct 30 11:27:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856394 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71AA81EF935 for ; Wed, 30 Oct 2024 11:28:32 +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=1730287715; cv=none; b=ezpv6fcJWiGR0hyFIOitakEyjmELclgDqDokYXjD706t19GzH8YEyEVO5kWfos5UUDj+oKB0fPwjWDp2waLWQ94zN2zGexvmwmksr/LnL79rI7CXZH54jCxoOy1gfYVkMB/jmSaV+WVPsP2gaoCGjaCkQHukRM4BudSVw0STCJE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287715; c=relaxed/simple; bh=RRyy0x2PiBX++bfjCGlA/9AZOm7xwGM5wtpW6IKXyVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wt8qvQ4e6rzbFmcQZg8YypN7sMeutv2wOJBdE2NLbcUB4TpKeWkPPmITcvt9kGEZNfZ2vB9DhNIBnM0toJVwWSSb4HcAvoQ/77sWZkAKNzbHrJuxxrccJe1BjHN2a37rwEFZKt3g1v7jXRcRGohGUYkEXpHQfJNRgd3CWN2O9JQ= 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=CmlxPzbd; 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="CmlxPzbd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287711; 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=CmlxPzbd8N/NMLkrpXGjy/sciUPMMkUAyZpGKp+EVu5iE/EABPVdXauuUYQD7e45Zz/92X kKOSBGjGwgVFg7o+dFvfhYhj1w67BFKeMZE3/ksLK8Y7k25b3bg8tjCsgBlu0CDMFvfNWh 2RxhbbjFo51gIgbp7KTrjpo8a/09f0s= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644--6KrEfeePAaK4esruzF6Ag-1; Wed, 30 Oct 2024 07:28:30 -0400 X-MC-Unique: -6KrEfeePAaK4esruzF6Ag-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a9a1828916fso96260966b.1 for ; Wed, 30 Oct 2024 04:28:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287709; x=1730892509; 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=LGxO0pzBLTzbyfiMCP2SKVya0K25PMh0uKOiXMD5R3veVMy7o61gGiKMk0Qle/ac7Y z1bECffmmMSk8TV+sN3KC5pngMo+PAUurbhcEPWe5svJIqfCZgj0CNSbmcSu9Lfey51Z Yt4OCimoPgWOWYI9jt+TZXDdrVbu8Q/81g9+cRVybf+xqOX6dI9SqMH6cWdbMoe+O+5D xKoHCn8z7Btsp29B9h7XuyQkwjDJO1Gwb0DSspgxEEsJ0dhVkh7p2fSdFh50YU3HHHsQ 2mn+0NlYh2SeaYmfxxOusJOpzQ1U+LS+eb7ATzauuOt5vGamP+G1mIeaiFbri7Jwh+7r +TyQ== X-Forwarded-Encrypted: i=1; AJvYcCVweYYgTMqnHA6DlS0mykWLixD9hFU8sSXK+qyhxq+A7sPNQ6gOaqOfLJ91t/u7/gp6MXAfERVa5l9yY7YAJg==@vger.kernel.org X-Gm-Message-State: AOJu0YyvDGlTLtR04oqeqBR0UtEy3lA6aujVUgWLeKk8Rqi/g8TXQqT9 HX4LoS0N61qdOdcx3pT9f6gkSYEOYw5j3oQ7pC2WjIBmZjz9igbczJ7FHgvq8kBLjHUUHwONhcX ExkSzZRlZPA/Rp/eKCCj2jr7ZDFsglGdYAA1uTIupTm5WSNDOFgrcEvWwbHogQY3y X-Received: by 2002:a17:907:7f8a:b0:a99:fbb6:4972 with SMTP id a640c23a62f3a-a9e2b6333f2mr407080066b.25.1730287708953; Wed, 30 Oct 2024 04:28:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFETLfwRScQnX2tbEFkH21PzK0bXXqnKMORp76UY23sUZYI9iNafni9BvKTHyCoXNkZxPgyFg== X-Received: by 2002:a17:907:7f8a:b0:a99:fbb6:4972 with SMTP id a640c23a62f3a-a9e2b6333f2mr407072266b.25.1730287708339; Wed, 30 Oct 2024 04:28:28 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:28 -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 , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 08/10] serial: rp2: Replace deprecated PCI functions Date: Wed, 30 Oct 2024 12:27:41 +0100 Message-ID: <20241030112743.104395-9-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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 Wed Oct 30 11:27:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856395 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6813A1F1304 for ; Wed, 30 Oct 2024 11:28:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287716; cv=none; b=p3LTOM+VA9KbhTixJEFy2bZxvJaO+LrvS5evAn0OG6kvgxqllBhXbnYy7i9v+9NOUSlX2vIjETBn/LDYL+LQHdth6cI8JDMVJhvcDBuPBkULX1pJEqMfEqm/wDkaLsBb9a/rrueAhOhHWhhcjNafeDVsmPrF3ZAjxEu4lgY19cU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287716; c=relaxed/simple; bh=x2AO4woPu9H2aNxl2TylFo7TB42POmIv8HM+dl0TTWE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YrgpKZrkch44qEuq04bH5HEcgcb+njowL4Q02Ptwy7fnFX8RsuQLA5tlEoBB3iRcqpRfCoveT/Bn4NSODCdIoIb12xxR21y9dACpB7miX13pGgqW40cKoS8VV0x16XC8gJ3wJvBKtPk5FCQh7yTn9zyIzV5nFHC6Q0szCvyH7TE= 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=FRrJRJhs; 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="FRrJRJhs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287713; 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=FRrJRJhs2XXlhUn5peCAD9N/8GMk7MbA3NcC7sP+lw5rks6fxAnc7YpDL7mak1QLpnKQf/ DkK3dCQRoJGs3+HVDj/+BVYLwA5ojtddBP4MD3rUE7BXhKTlbvEom4eo6XJIob4EHOlDdn /nCQ41kfM2UkKSxMrokKqtWJzPuuUWs= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-472-dQcp-iFNMvCno3lWe2qFZg-1; Wed, 30 Oct 2024 07:28:32 -0400 X-MC-Unique: dQcp-iFNMvCno3lWe2qFZg-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a9e0eb26f08so224397666b.0 for ; Wed, 30 Oct 2024 04:28:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287711; x=1730892511; 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=eRyUmdQmPolvaOda3RGkKcIaIFGYrfLnYPmuzl94giZ67Sx8Ffb+t2E7ib2iNs17qK n7+iN+q6yp8Qa63JEjVoTCYo6J0a0pyU+/gmP7Pqh1AYmWRcQSmovWtUPaD4GUHaCmKi Rrq7y3xxXWNxZ5Kz1X+xBvF6aO0HDMJIUcLccn0+vdew7nHXMlCbiAA4KRBhpHW9nApZ teWrqSrLB9mXRU/NxhUPwv4EY19g+fg/pZNaQL3eZdR5UNEIOxkVSMszEQiUXVB/oXYW zMOcqldbEwvHHUuZZmHiaZG3itsd4+ljcW2R9Ax/FzUJfAjYQ2zUxCv3zkOoLO4p1tef ipmQ== X-Forwarded-Encrypted: i=1; AJvYcCVHzp2+GV/AqQgGd7j6DHOFzgrKyI2+uigVLr3Tb+lv2uxubvilAxMhjkXX6fXT85WQXzHlLkKdbBiHoIjRyw==@vger.kernel.org X-Gm-Message-State: AOJu0YyXsMeDEUi0V+x/rqesF7cVIYFCGlxxhfgpH4uOK5pKLDvKXMD4 bCt+wJ/0K+zUl3EpvC3jNRLc2a457QyYOC3OLv2AX9MNzGdGlcDVvaxNiHvr3EyiQZdwdhONdLR fCBziM9lo//pPpuTkYJLCIi2X3YZRtVmkMTVPGL6ktX4JUv59lfNyMUc3Vv/PQPcb X-Received: by 2002:a17:907:74d:b0:a9a:1792:f05 with SMTP id a640c23a62f3a-a9e3a620de8mr312284966b.31.1730287710787; Wed, 30 Oct 2024 04:28:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEypW41JHp9s0QMpUNgIGz0rguEz+SlI+R6m1S08Xc0YathnVPUssPJwfq+JcR1+Av7QYJ0Ag== X-Received: by 2002:a17:907:74d:b0:a9a:1792:f05 with SMTP id a640c23a62f3a-a9e3a620de8mr312277366b.31.1730287710210; Wed, 30 Oct 2024 04:28:30 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:29 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 09/10] ALSA: korg1212: Replace deprecated PCI functions Date: Wed, 30 Oct 2024 12:27:42 +0100 Message-ID: <20241030112743.104395-10-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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 Wed Oct 30 11:27:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13856396 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47DC01F4FC5 for ; Wed, 30 Oct 2024 11:28:37 +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=1730287721; cv=none; b=bCGCW313vUCq/IelyAnvMQjJ06/Zpn5FXT1ObR4mHuxqXxn6jktHJALBdm4U/8Yl0XxKcHYLRr3c7BcJ6cwm8k/aF4ZAahDA1o3j9oaubqSDScbewf0B8BOzfD4POVRT2JBV4HL9v05qgF83GHLWnoGrtmsXIBkIH6f1gg7zCjc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287721; c=relaxed/simple; bh=RcTa7mPaWn9S/3FL+we6iyllf4n7RFykRGESqGJxd90=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ppg+q5otXSbP9FtLQRDpoVYkM07zmRExwVBEVW73+yBQopdEFYuYJLcM/0bXc6niDxoA8dOTuH5AM/ddhZf8thcoAI2C9zJuV5OsF9be60Pm7UVA4YlDP0/8FmHGXGBRJNqSSGU5IFIEFKwuIouwDUJTPxuZcp5BcX2R8EAb2u8= 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=cb5Xd0il; 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="cb5Xd0il" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287717; 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=cb5Xd0ilPBBaWgivrtAdkCRAn+O32q5PZwRo7wxhfXQY45vX5H1yufUg/kf1sbLhZ/CwPp 7BwJBkeMiESh40Xpc7UP1z8QnIer7Zp+rKlHOM+1r6BRqHv9aLS7XW0MyG/g5jxi10mNlN e2En1aCBnV9TMkSenWJSWgK9T6dU4QU= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-222-WgI24tsqM3ucSCy1A5bNRw-1; Wed, 30 Oct 2024 07:28:34 -0400 X-MC-Unique: WgI24tsqM3ucSCy1A5bNRw-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a9a2ccb77ceso449116566b.2 for ; Wed, 30 Oct 2024 04:28:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730287713; x=1730892513; 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=nhZ3YaxHA3vo2DbvAFVrSMGzb08eUuHT5lGgTjKKyNSf5kugR+YW9FiyMl0LgyBrWV gvI/y+nn6YbGHT942RIxw3vsfG3fWZrvmSu5CXBQqjY09Qa/adjgE7RX6OjqBAqZEufy Rm8A3DzA/JtqkD5g/e7ddhoWAk9JN9RjEIuFiJLD6LiGLtUusj3QoYP4LSN4AZJjKSIY 4dfaWx8nKTKuu6+O+VZ43eawEP6Qfd6ctULedhxeWflDB0Yoj5ELmG5ntlN2y47A2q22 rAnWxkitCOUU8I68n3+Oy7nyY3Rr9q9M4vP0gXrUsFspc6e8R0o7xDPG/4EpDNGCCEG1 u7xw== X-Forwarded-Encrypted: i=1; AJvYcCXNASRK81qLyetXU68KBWrnEdFe1TShQvQ8D6htST+0ETIZmDwGxbhdzeiEZ0KFNA7jPCjm1CiUzoaQiW3Nlw==@vger.kernel.org X-Gm-Message-State: AOJu0Yxb1uQWCulVcrjUpLsC3MtBm6ddEI3h50ltdsFJ8STJZP/1+BkO BwhOpJlKnmJ53kcLsVRw/gMA8VW7smIBDI2lH/K2/nyecgBMZ9L23WSDedolTr8VFQ/5uL6LI5N ZLnFREHZwyMs6rn4b2MvOFmM9/IKi8WLXYibM1XYFhtBCLKnrNieXOqLZpvTGnC3f X-Received: by 2002:a17:907:7e9e:b0:a99:61f7:8413 with SMTP id a640c23a62f3a-a9de5ed3f62mr1263547066b.23.1730287712720; Wed, 30 Oct 2024 04:28:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECBDZhscrw4tCBL0o4Kt6cCMrv9Zz8RT8gALW9gtsyNUpNxQK4eXUsQ13M5SbZdU3WEUTpkA== X-Received: by 2002:a17:907:7e9e:b0:a99:61f7:8413 with SMTP id a640c23a62f3a-a9de5ed3f62mr1263541666b.23.1730287712225; Wed, 30 Oct 2024 04:28:32 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3db7:f800:98bb:372a:45f9:41e4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b30f58991sm557324566b.159.2024.10.30.04.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 04:28:31 -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 , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Jie Wang , Michal Witwicki , Przemek Kitszel , Adam Guerin , Damian Muszynski , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Benjamin Berg , Breno Leitao , Yedidya Benshimol , Serge Semin , zhang jiao , 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 v6 10/10] PCI: Remove pcim_iomap_regions_request_all() Date: Wed, 30 Oct 2024 12:27:43 +0100 Message-ID: <20241030112743.104395-11-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241030112743.104395-1-pstanner@redhat.com> References: <20241030112743.104395-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);