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: 13856376 X-Patchwork-Delegate: bhelgaas@google.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D98A1E5721 for ; Wed, 30 Oct 2024 11:28:19 +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=1730287701; cv=none; b=hPG7aM1MConlghFxZOvbV/AqbwprHoKWmuKEKxvdwVGZYix7PfySf8DdnfcaGJSKCeXx3QwR9EOlAsMCmH1K6GTCtN1EDwscgFgG+vD7FIJQFlk2wnBVDHpy/WevBmNHdvYjZM1RVUYFx+8ZLmezEKxDmBnUSFb23FlC+OQUHUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287701; c=relaxed/simple; bh=q3TYZ53foBadD/cMlyNi2anAEGoKt2ZxGv1qO1diPeQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lWzGMVnL8/QvZqFWmApOeNCjE/EuHOoEsTpsRFJI1Qd3gqwqQI9ZGlUON98C0WE808kjEV/jEt1sor/4LLBYDXXLLjVdPhQil8eRSkfTVzj31Nm6zttHl3hmIr8FsfJjTa22prUhIADDoLW7Z6bbEKI1XOO/HzbWH11CpTFkQLo= 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=dykSL0Ho; 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="dykSL0Ho" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287698; 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=dykSL0HocbY5FZho2yM87p/oLjqYTBloenGlCz31zv6euj+ESRubr+ovLhJoKmSMxRjvwC AC5be7WMXL78bPYe4cULh2LTgn30Blri09rCqTUcrKxuF/bx8XsPAd3GeQKZ+S00sJx/tr PGvSIp67joPPp9/WjYxLqjAMx4Y9uHM= 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-107-797DPN2RM_qLo41N_5A3JQ-1; Wed, 30 Oct 2024 07:28:17 -0400 X-MC-Unique: 797DPN2RM_qLo41N_5A3JQ-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a9a0ac0e554so79621066b.1 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=1730287696; x=1730892496; 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=lks4dcTizA/tf7wyCmOx/9V0lakHhTCL025/OYLyqH09v+PPh6cPoFhiYcr8KuZE+Q HbHRReVRKlwJY/Rg13CxTDeOCbOxjN6Qz+ebqfV4OjC4lRZyfMO8upiJdXOmUdZYSLUA 2G0yLrozYUqE0MjfTIGEpiE2blU1JW/Mn5IKTKcoA+cr3FCxckVryzXpPSJfelKGkNzo DmUQmCkPNi1Cyi+gU5zMnLEBvzMX4MSfTQebCvzqLe060bE6zpasfgX3+Ondc6aJ7rog /f7HhZGH6Gu9uSdYNkN4IAUP1kQAbjHeLrzpmU1Yw5Bz5/NFAyEigdjk5DOcnZmSOeA+ 6Utg== X-Forwarded-Encrypted: i=1; AJvYcCVCOTuy0Z65IoKBJI+nHRGZyh4+ZfbaIEf01otrFQHW9h5zyy4Gzt7pxbkypAldIw3Jwml5sgrc7NU=@vger.kernel.org X-Gm-Message-State: AOJu0YyidrqVekkxJ9vN6as22/Zr3gS8lrv2YAZvY11RMSOOSj5tvkvd RWpJ1ZyF8NF4BraNkvWoXoVx2dcFLArqy+hCcfTajW9fSUdeFhcpOJlMWIZo8uvx6qx7ME4bmy9 1XKI1vSPUPXXil3zSoBZuwSF43oojUOu8q9eEPrvqQyQVxvLoYm3u2ADLzQ== X-Received: by 2002:a17:906:7955:b0:a99:ffa9:a27 with SMTP id a640c23a62f3a-a9e40fd6b13mr170562266b.26.1730287694541; 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-pci@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: 13856377 X-Patchwork-Delegate: bhelgaas@google.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D5E71E5730 for ; Wed, 30 Oct 2024 11:28:19 +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-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-643-VZVc8WW1OZqtnFajrX5URw-1; Wed, 30 Oct 2024 07:28:18 -0400 X-MC-Unique: VZVc8WW1OZqtnFajrX5URw-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a99f084683fso469651966b.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=OA6uFM6kuNJwwbDlGstmaXTs3ON0U63ZV4vD8u9WjI2zZf6Yu/ZHE332Cs3ddBhwi4 +46QlBZOl5WKaxXPNnftmzIdF2wa9RB6zalTf4aLXhMj+o+B199x9+iGOQ4NZuuOTZfQ KiYh0zg1WLjLAS0bXXFZ7PG71BzCeVHWmHmcHQGqT3sOxIY++M0YCyKrLZ0qgER7VMNc Xv0SF6etjQtIjvXmDUYE5mUW1B2BCfPpv719iPRTwCnjoIDsy/ZhSe1bxPdIzM7p80sh eClhQWMKrkzHhYOPWhJV0/pOeMql5ULYgA+ziBGm/GrzjTYkFwY4h4lzha22XZIT2irQ uNzQ== X-Forwarded-Encrypted: i=1; AJvYcCXlL7QF6LFCUfPIrM2YfQLf8+sdjp6EZme44svj0D0bSBKhiu0F7u0vvurfz3Ffc0iJrQtF0Ebu2PQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yy4YjH4KQeoEQDlNF7NHrq3oZdOo/UcuPJ40q1s4i1H8sSSQxkW 9OGal+Nd6wB9a8nOrmD5Z4llyGBGkYZFRaVX1bQq/sCX2bmQw+1fKQwS0IXZ+yxqjK3apUfLa6F D7x06MQ9D5CnK5uVhxL6Mk3/O6ZjK4gYIN5h+tIfYrfSMZYZR3cB+jfLjqw== X-Received: by 2002:a17:906:c112:b0:a99:f71a:4305 with SMTP id a640c23a62f3a-a9de5ce4681mr1673676966b.18.1730287696703; 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-pci@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: 13856378 X-Patchwork-Delegate: bhelgaas@google.com 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 BB1461E7C3F for ; Wed, 30 Oct 2024 11:28:22 +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=1730287706; cv=none; b=nD2Jc7Om0CvhyS7zJYyiYewUT8CKkRxFXvM2ol7fu8+e2wiIxFS0LPkTkw/bFjQOzgXwa2yDY33PY6lVe4XkhN/wNETqIuRCRPNzskP4I71e+dVAH26nhfkZc+7dfM/qXS0zUnLSBgV3lym9SopFk71BjC1lm6MDz9oP5YRdbtE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287706; c=relaxed/simple; bh=YCSleCRL8+zgmB0F5bhpOuGHDhDr1YVS5o/lIBwlqhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LHaezfC5dsm/K0mKg4wx9hz62HmDW8nq68BmCq6/KftjMfczQGrCAEU3xkbn76igxP9UqZtW5Ni86WIChMjjpDKrLFY89AzWJmqT0jYHCEut5QoP0G0WREemh4hiCp/4CTW7qXLPNOt95f7MViPnAG1ncws8Ir4Osr9kkixG5yE= 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=EVAxjaG4; 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="EVAxjaG4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287701; 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=EVAxjaG4Z4CAWwFRwkChz+W3EM6JNQi5hf+smGKVteSfT7wjRSWox7m2mkc/juG7d5122p qbMEU9JzoVzJjZNAcxdT0ivWDxo9oXg7vxjUr+gB3unXwiymfk7OTo5e071BnPOnBngVNT mF+F5BNwzJuuVbUv3nACXRc1Slcj2bk= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-VyofK3RaOQWLn-GL3CM2mQ-1; Wed, 30 Oct 2024 07:28:20 -0400 X-MC-Unique: VyofK3RaOQWLn-GL3CM2mQ-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-539f49f2443so7376529e87.2 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=fiFUfzDca8dAJV4tZInvwXrJekOL7W6DdMqonsClTJRIoPMTCr7aqDADL05LsuJp/D cMCCmpyjTUJa6N2aYWPRsGzsK+RTiHSXY/jxn2M2y4ZsCuPVooREvEYDnOXQUtLgynWf R8uDZSe1cVZYrOPAABAeIa9Fuoc+3MmPlIkVQfSLQ0IIf/BSkXgU7omHIBAt0yf5JW3n 1WbhnDBWqy8gs7ZhJ4yi0deTdBNLVh+JARXfRJs5XuqCEMLC4deiPIHCIsxEX89NV6q5 NCEM0Gf+/pHHxx4Dj/pDjewbA3/oQsXQg83tvKj6CsBLFuez2qUNVlRQYJC70Swegw52 T9Iw== X-Forwarded-Encrypted: i=1; AJvYcCXQYL/wjIfJoFGV2AjlkMbBaWFjK4rvE4YZCAmlL9lG2AVT70RyTeYl0la7aS7h+iW5O4KahciOtg4=@vger.kernel.org X-Gm-Message-State: AOJu0Yy/QF8CbIz7ersaBRdnkZlwbJXzAFKxB8+QKmrSNplVqDngE2PP cghDvsly3tXG2K43N+6HI5iyo3BCKoutdtmh3bsz/kizvNrLAVf30uSok16BQxPLzGh8XGZRPbh 9/DGvLwjiT2b8g79KwCW2roK1IkDNggjHBUXw7BcO8n2SICLe5RQo4S0KoA== X-Received: by 2002:a05:6512:3d06:b0:52c:deb9:904b with SMTP id 2adb3069b0e04-53b3491e062mr12333070e87.38.1730287698751; 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-pci@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: 13856379 X-Patchwork-Delegate: bhelgaas@google.com 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 9C86E1E4928 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-556-P5XJE0WSN06mZukgngzvaw-1; Wed, 30 Oct 2024 07:28:22 -0400 X-MC-Unique: P5XJE0WSN06mZukgngzvaw-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a9a2ccb77ceso449096666b.2 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=JjI74UUCsIQiKlxFPTHOQZmrVZwh1lpN230MhOAdbNKKRvZVje87Ev8q8Cwklprow7 uyvwwbf7Ox3kDWzxL8wIVaWzhZ0Iu8kc2XeimHPqHScGmNleGd3wKmEKFXq0jfNh4ho8 lT2qVbdyv+yKCkIXzcxJKRvejlKhMjnDWH1+ekWBkntWfvOae7TeK1x30/tQXJMHjFC8 E7V9uEixVtUxriGNFHBxUHbOalYvcCpyn4KdPZ18uw22nDgKTD3cy2/dcn7CYVq+H2Hw 5jxVjbrpc9ynIEJ203HMd/K1q0TJJWbev9mu6s7gAVn/8v8YmfI1TWhL/wG5qM9Nc+Xf V6NQ== X-Forwarded-Encrypted: i=1; AJvYcCWsGaHlNtNIZeIdrbBnU3slZlKOn2pDDSDh7owJhQFliewnbc3NMvA3Li/fhPjinorkwDxwt/mb5Jo=@vger.kernel.org X-Gm-Message-State: AOJu0Yy38GQebsLy65u9uScddZ1at+0vBXnbWJN61K1fXCaYG6ouHLe5 /qrIhHKwKWBG41jBzRCebA8t951nxgklAxVBs18Gg1b/lPFFNOgVUWCHeWAptLJo03UdSzo6fn0 /LPbqZzK4pidcVRgegZUi/jSl4VzzHaxT+GEbR9GjHqs03wYyy3bJ2FPjhQ== X-Received: by 2002:a17:907:96a9:b0:a9a:a88a:466c with SMTP id a640c23a62f3a-a9de632e59emr1415761766b.61.1730287700876; 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-pci@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: 13856380 X-Patchwork-Delegate: bhelgaas@google.com 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 DCEC91E5738 for ; Wed, 30 Oct 2024 11:28:26 +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=1730287709; cv=none; b=IorWiY15NpnyEYlcEZRqQojnrFcHVUpGogRsp1sERFGjmYFSuUGnaTcL/lt/DcnSg2tFAGBLFS6igssWZR6niuEmalJRWASsxD+iO92Xy0+w+E2vM+jba2cQ+gSrRPjpqTT5KihukayedlJHFNt0me2OgLzX7hXGgrjvOXq2VzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287709; c=relaxed/simple; bh=J3pG/0Gfw8HnALwZ/Br+hrSE4pEfpHhtl4LqImtqkrM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OzvVmoWQLO0WraWLVBhho1Gk3DJikBF3R9IuExMEMXbMKA6iYmmOuLgzwDHOenDDwmUihdmEwcwYeOufcl8mJ0KQAaem1/+nY+SWGt5hH3oevqqQHKkSRp4wvbn9SqpSsAlMLUYXSWxcGw0AAOnpWc5PpE+4D/vNCxk8fOWKThk= 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=KKrs7Mau; 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="KKrs7Mau" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287706; 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=KKrs7MauxxeEQPIHrZFTN+YXZxZK4LG068geFRPfZ0i3WMOIO9BYErrV+cXSwW86bGk85b tkX4aUfoAIzAuEqKn1LwByHoOQh4vK6Tpau57zppYS7lsS41NNWNNYsBsC2dSzoHWMPBa1 RLmmbLwM640XqQ9xAk/FYMl3SQbiM+U= 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-342-Ur2qVSQdPHSl9UAPuYhU8w-1; Wed, 30 Oct 2024 07:28:24 -0400 X-MC-Unique: Ur2qVSQdPHSl9UAPuYhU8w-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a9a1e429a8fso135465666b.0 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=rDsMvWI66naJoVkQBvobo6BtPMbxZv8KYjCdAz85M3og6BuWCdYD2DXzEVg5dM6sEm rJ3M/pnaHP3yFKL02e4lN/X0XH81MCrbdJofEYUEprSrGpwnxhww+e0BpaHIlT+ovg/3 dbuc3NJpg8QBqTLcaIv3rI/7a9HDLd4t9GzAT6j1KhUlC3aj8WwXsAi+BPLCZd3sjDWm zNL6pKmGQ/5BEjWRTiEa+oUP05ifHazKzTR17vdsetML8QhQ4vk5V7cQRrj9N4siyah9 QgcwrO0+22vDQOxL7khH0/sFNy1SrFNW76CcpYPDh+YjhE98etMMzsswg/75KazFTD6y DouA== X-Forwarded-Encrypted: i=1; AJvYcCUUe8+EiuZs9UK9YOFf9K9XCQi7t0KiHNTku2GJKySOch+7UAvr2iBPrAc/Lz99O7qwO0nuLJPMrmI=@vger.kernel.org X-Gm-Message-State: AOJu0YyDvCHHfazebwvc9oMlVvgiKF82hiOpL/vMZ1ZIwlRCH2tMvxGz X/mgE/KpgViWde8CLY5jTk1jfiBs60U8a0CBFA3/2YTB4kSOT++P4uN/F0nNTnP8qc7m0ghYNyE 3ufn8cPmQavnFf0RyeVW1jkZMfTbWloOvm9V/AwxxGDHa0lHADvMOjJBEng== X-Received: by 2002:a17:907:3a95:b0:a9e:3af1:eb1b with SMTP id a640c23a62f3a-a9e3af1ebbcmr190405266b.38.1730287702750; 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-pci@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: 13856381 X-Patchwork-Delegate: bhelgaas@google.com 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 2F3361EB9EE for ; Wed, 30 Oct 2024 11:28:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287711; cv=none; b=Rc+QMkw3EuKV4j2GZS1yPzoX5nc5qfNMd0iv1eCq4xjECwmR3t7pcoKBbdbBgcAHkqy/4RGKUXrhHqUmRTDdq3M6mTwxJSO+TgFBtCqX4D5cUorsiltY4VZdkOxLz17qSmn06qE9Hal7ej0FAPu8YngqaMtJLJyeI16b3XYt/dk= 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.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="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-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-444-Nj7GM8bvNLKlA_g_bTPYAQ-1; Wed, 30 Oct 2024 07:28:26 -0400 X-MC-Unique: Nj7GM8bvNLKlA_g_bTPYAQ-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a9a0d8baa2cso78091766b.0 for ; Wed, 30 Oct 2024 04:28:25 -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=fw9AZaPSbqBnudTU7Vt3/a03qD6Bj7pwtJrhiFEVdUNI4K+uPMLVy5f08nZDtee36X HdEdtZHnqawr822bIHVi3OEU5vxAZ8K3ZfWaKiXOXgt3zW0EcpEvnVjx73attTkaReJT Rjexp/uvLElxlvCy91QfdZ97mvaUTm8Km4R/LjTB5F1YCLl+IU6S98ZfJ16FHMYQCLwV yG1aLbfmeYpKVXqLDHYuErz57cgexcQKsnZMJXtg9Rd03UbxD52oZwJIiyO7RFMeXXWK l39N5dg6NHpGO37wr7kNv98J3wUKA4PGyXK5KTgmhcvI1hfFeT4MfMNfY9Q+vglR9GKa uD+Q== X-Forwarded-Encrypted: i=1; AJvYcCV1zJdFJZO7v0TpTRjBEQI90dOJpRNJj+dFswdVJfmfZ8wpIeeVy68teBXkgYEiXVWTGT8iKta/7W0=@vger.kernel.org X-Gm-Message-State: AOJu0YzX57/hLJ5lXVyAGAQWoudxIAMv3XFsYwsUAiF8NIQf6KXReO9C gq9dRChrOe3rUobGjwvVlBvGqN9bGPx+bGgOWUgPlR38t7THQnv5T0dwPkODbTyOH58AbcQRnfL hmRqDvb/yVPTShxob2RjD0AhDaiEhA/qLJrURkqULiaU5haDo/t8f1ujpsw== X-Received: by 2002:a17:907:9628:b0:a9a:4101:597b with SMTP id a640c23a62f3a-a9e2b38c911mr465275566b.9.1730287704834; 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-pci@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: 13856382 X-Patchwork-Delegate: bhelgaas@google.com 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 F188C1EBA1E for ; Wed, 30 Oct 2024 11:28:29 +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=1730287712; cv=none; b=HbbM+eNrt6kHu+ctbRQqM1iXocDCb541K6JCG3mGlVEVhmZ8X07Qleh7QPmTHo4G+s5cj1za7QUuAwho0SzpBKkDMJcUcRNnBU6fTN1lbZBoHkgTldZ8p3mYqgcPuFbA3P7vzOT2lje6MT83ecXY/cUtGlBG7M7vKz1YQuTy0rk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287712; c=relaxed/simple; bh=KRhL2deOZRHNfuo7/CizyodCPj2p+YqlhuhaNJFSYuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IwBztz7PxjtslBtIhvGhlUZRbe4rRO4LGSPBGHdzGvBsIDy94TUd5Z10OUxgtQZhOC8oDhn7QVAnDzKTIccfLweVHM6iPnLF5DXBU/zcgOnBd5lEES39YnpwQW7A573X0eTJbBKWo85vIrkzH7ZQTvjrhLnHwDaupS4zz/er0f0= 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-344-ac84VgXKMaKk0Q-ZaHgpXQ-1; Wed, 30 Oct 2024 07:28:28 -0400 X-MC-Unique: ac84VgXKMaKk0Q-ZaHgpXQ-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a9a2593e9e9so468151166b.0 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=N9tYrV0odL8T0lrKlc6JpvYZtkLlYMkZ4+E2TueY0qrQm5E4pddO2VBIB/QZ2MKtZV uEmzDzhWA4afzapI2ryawG8+dW7HIOA6NGEjPbxe53wyW1anbGAfrOdIhpg3kWogxx6m 2iKzT1/VgLpXgyowhVkXGiW85luAE/1w2+qBtsPYtflBDIse7cIe5yymzfn3yX2gGTJ2 dP8IL1aoioojl5dQmWNJwgpzLN5mqt5auPb8Lj3mQLPaPhHdprFa1mB7L6q1JAQJBqwI wFLMUVwcIQprwUkuuKZtxLhBqNsLogxkX8kiz+k9kdGIpPSihxC9oU2JMSY5f+s5W6M1 UqLQ== X-Forwarded-Encrypted: i=1; AJvYcCWhGFQAwIJKLEqLFPHGmr5/Y8DlYPRRqM4TnjG70e+bOYZ426ynFcUfMatGrq9CRWbE1vwVH9pmNw8=@vger.kernel.org X-Gm-Message-State: AOJu0YwxfpWfE2ElH9XZ06P3nv76WGz/eiICXZ8VIw2YDfJTqaK2qlTK 7zl0DU0r0iSQ0cu/OcZUrozpCdzf3/8vwxawSaFXjav2PNKcKcYAB193E9KZEV02wQfUqR2B6Ul Tw9xaBqBDNi1qc82A+wx04ucv2nj8wifugQYM40Dd9LICNLgRlvb8SviM5Q== X-Received: by 2002:a17:907:2da1:b0:a99:375f:4523 with SMTP id a640c23a62f3a-a9de615a8f3mr1351686566b.44.1730287706840; 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-pci@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: 13856383 X-Patchwork-Delegate: bhelgaas@google.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 632311EB9FD for ; Wed, 30 Oct 2024 11:28:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287714; cv=none; b=BLDWV2sQ1Q17Jua8TH6SScoEMk54mEY7Fj38BS5+J8N/g/mGAmVZ3qXhAcU2RDeVUDODDn5KvgvzYj6lIYamVnNHljLJ34uMXLalvW27qQmIXo8RNTmv2JYbc3isVZ5BXx/JV5kRmYcB5Gj68Oh4JoQ3ymk8by1NSLtP/jgUQm0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287714; c=relaxed/simple; bh=RRyy0x2PiBX++bfjCGlA/9AZOm7xwGM5wtpW6IKXyVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gNhKj4pUPoijsCGHAwaJvOMDJVQCkZaEY941yVuzVjCmdwT7KuX1qMMNH2dp1NsFwyAG8JSHDhXHNtY9YqQfKMMdIVKSdNEY4xb3+1DASbhbxzVUEQu25tPGj/G4MC0n3yexkN7Fthbgq9jPZDrvjDZVWv/Rog4P4ydILF16caY= 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.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="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-153-9Ti3mL9gNkif_8yidhSPQw-1; Wed, 30 Oct 2024 07:28:30 -0400 X-MC-Unique: 9Ti3mL9gNkif_8yidhSPQw-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a99efe7369dso71747566b.0 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=QXX/j4g1LYoZCn0FH7GmGuZa0xqfRmPOdcs1AAOWcHQY7XJmOlPQt/zsK4jqieLWiP iPPJOUXmqp2XE/QOe9P236CHmXOs6VgQt8HpWcigVNrXLAYEgQrOoT/ibmkICed+m3xy 3PBRA7vyakb44JzorjIpEPRxuaOvqnn1yG0iUrcuUh2yymhfijpvBG/Vry6gU9MK5oE/ R68H7THyl/71GWFNt9utoDrrxkDMSao04oyx/nrMkcLhPmifGpzw+8n1FO0gs002+gzh 0OgLBvD2bVh1SvT3nPF3ZMGS6XdNys+DjEFGRJn4DyBRh6KXptL5H3jWf+pRKa2uJUjS Lajw== X-Forwarded-Encrypted: i=1; AJvYcCWXwE5HRGY/Xr5zOFEaSau4BqtEa4R9+5m9M3Cd1w/93fFH0aFC3aRBZAPMFdeJdDS3iDogpUJWu2s=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+e+4aj66qy2WngJYTvOw/eLxXDgLd0FriOKg65mMsjJ2lEYzX QGXtjcgB+4aDfywDrkfmt23xXdRDr2hopGPJ6MbMzaFmii9UUDtyjEKj45Stho+dycL+ji6/ast N71qx8TeU2ojrKiWBru21ebT56fnY/gWkRbdoHboFSGg+udGl2JdJH/E/yQ== X-Received: by 2002:a17:907:7f8a:b0:a99:fbb6:4972 with SMTP id a640c23a62f3a-a9e2b6333f2mr407075066b.25.1730287708812; 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-pci@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: 13856384 X-Patchwork-Delegate: bhelgaas@google.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BBAA1F12FD for ; Wed, 30 Oct 2024 11:28:33 +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=1730287716; cv=none; b=vC5YUJ4VZyIFB4xAeRRZkZpkVXzyeeeIT+wMG686C0jblfvPUGQXckC/gceQRVHin1PWlMnnyupbiieqVnBSuPQ77TD5Yx+/Qv4OZ30xX/SBStPDtx/C7jx2imsiAZb98I07XjHmmuV24qGLKsV/UKRm7h+WE9uMmkP6DfpdnzQ= 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.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="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-631-hAxBF8-lNnmYK0dlQXxuPA-1; Wed, 30 Oct 2024 07:28:32 -0400 X-MC-Unique: hAxBF8-lNnmYK0dlQXxuPA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a99fff1ad9cso524468966b.2 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=mlkABHpMIe/fgaP+ikm8+zFY87H1L+yq42vpwiwvNIdNlXZx6dkymrzWG9kSWkO6NE rhV3hYNqCsOgAPVmVy8oY4WgverqVztQZCmvUKdSbWjKGKQFFTSKeenrkubBq9KRg9gU 1v6U4ewsQYtf2I5/3l1I3ue1K6dWoDAYEBgtCtPFoHYStm7pXPPbXQkT/ZVtsj9Vamh+ 1H+AgLSCryeiZ/LGVGioXNXczGFMYH/1XCvHobo4SG4S/M/u91Dzlk5ZaWUD4HSneBgj ovWCK9o45t0INxTS2eOY5RDFQjKNTT3qD18PNJLA1Bgp4tTWcNqA+JD41iANAPe1HP4X hHXA== X-Forwarded-Encrypted: i=1; AJvYcCV514SoabT0sRFUmAJYzlDmOw+ULLHwcMaro1pxjm5v+UTd4l+vzJEcpweaOSZQQTZczTCs82YQQUU=@vger.kernel.org X-Gm-Message-State: AOJu0YzeUoj0AGzgRk6wnBFrsY11WZwr1qUZS8OuF/S8dfFfsc9JpOr+ 6Kh0tUlTZ6CWaZCTTWHF0M4niAoH/rxMdyHGH3kYr0JKGKV+FADuSOvsB7RppGqR8a0bIDm02QV YzKTOpt/W4se4/46F4LRM0Nx00NwLydPZAbn6SPxgTFoUMdYazKImj94Ddg== X-Received: by 2002:a17:907:74d:b0:a9a:1792:f05 with SMTP id a640c23a62f3a-a9e3a620de8mr312282766b.31.1730287710754; 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-pci@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: 13856385 X-Patchwork-Delegate: bhelgaas@google.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04EE31F429D for ; Wed, 30 Oct 2024 11:28:35 +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=1730287718; cv=none; b=kxavOKbH5y3nY255IAABEdE6BmnMHo/vIDUH6qyAanQLz7wNXgvj9bvrrMwNGhBmSQeRQA22aFnckvE7Tsmf0H3LEW3sJ5uQChWQ/uYkIDvFzx8h35o1fQEuYq11iRGY9BLyO2CIuCQ0+S/Q1daF4pCGe6fTY3IgNDjrvQw4RWs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730287718; c=relaxed/simple; bh=RcTa7mPaWn9S/3FL+we6iyllf4n7RFykRGESqGJxd90=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t4Gw0ccoVbFnt7sqnhZnnXqDiymDdlfG1k7tlyDjGOOchvlu1h/3gUA0vAzl///MofM1IBIJ2tYmkKq90oZJMGM3v2ZJVXW0HKFY0SgZSNkx3qePkVxq2xjLvwj3+iGjzRrGnSLElAPW/AYYuVxYLETe7xGeSgL2c+jOjgyQqt0= 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=SnxrXjDi; 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="SnxrXjDi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730287715; 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=SnxrXjDimBjgUX6T95zJml/beYrou6O23cav1atLuZ/PasMamrDfiRFyJr7i1tE76MQXRr m5O55dJfT/0xTQeVkVseGf2oMCZEzHPzF/5WU07H9HrT6TPFULC7xCkaVsbZDPIAm6b7TF BMMd2oy45qkbUkiNau0cdZtC3nRXGsA= 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-671-A0kuvBbcNYuPfDIqNTNbJA-1; Wed, 30 Oct 2024 07:28:34 -0400 X-MC-Unique: A0kuvBbcNYuPfDIqNTNbJA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a9a2ccb77ceso449117566b.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=e2JpOKq6/tctZuraoFLgzFzqziX7SzVi68RD2OVRvg7toYfFRruGMmJWN3AhK5Ny63 Lhr9phCVhP/8r8uX2y2Y8TUTZBxS24CHv8hYB+T2wA9dtWSkrd0nUBlM+Ze0F/XWbYwj 7OhZE4go5D8t3TV9HGuu5waoU0iWUuLN3J3mrBc7SQikddts7nokgUJHdckgovFwk1se 3U2/mG0kxKnhszRXzhSxcxJmge9boxMrJMp5TCjil4CSlTIIbx+G/cF8QsE1+CNDvbvG QneRY7DCJ9qOIE98W7StykckOeM/5alfroy4USTP8C7biUIudjpr1KXcdWO68XD2r+Y1 J6lg== X-Forwarded-Encrypted: i=1; AJvYcCUlo6IDoMzmS4IgMJInKayw9nJ4nYzNf5F7WFunHp7OM5KH3bIJBAvXf/rN4tjAZkdhTnxA3DJ2EpE=@vger.kernel.org X-Gm-Message-State: AOJu0YyBOdJMghu3GX8KsM5Sri5n7KgOpOyVrkUyUlZ6x/CWAl9/tKVW VL7yrFpQkMMeSVi+x3CbuC7YRyb2HeuxzM90X8Nq5cP4+NV5uhsE3cT+XnxOEInz6IwrgNgYIF+ zxsAwTQuITSszlG595J8EfSpFe7FEcyemHLHrnZQuIg+MGguFPlrWWn4FrQ== X-Received: by 2002:a17:907:7e9e:b0:a99:61f7:8413 with SMTP id a640c23a62f3a-a9de5ed3f62mr1263546866b.23.1730287712719; 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-pci@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);