From patchwork Wed Oct 16 12:41:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836592 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 F2435208D63 for ; Wed, 16 Oct 2024 12:41:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082509; cv=none; b=qfcbQPAeVLLInjwxuvjxXZcL7dBmmDta560l2b27wlSLcV8sQoUNwRsY4XYe4uXOh0SN6O2ocC/ZGThtW/+aYStgItECYyV+LrJVZwKDZHqdyIu5ZY/jT/h6heOQ1XyEWAscMGlYp8Ed6xzlQfFSl7BrXHaHmprWYDuhHzxAtbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082509; c=relaxed/simple; bh=pzHm+p7iOQ3ZHeJddCbAsTb72gDaFZfayku/dAdnQvc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=T08t+SWJ2wDBmwjc/JvBg1e/2/IaRPkKVOWA2WGZufKmGTr3aNdJLAhzBBNcorBJhrwNWGaEMe65jgf+632Maa5CVs1MrgvDhU0YHtqIVMRs2ZQ9szlNEA3+hQXeMYl3C8L26GW2nk7i5ZSQxzqapCPsE/wPzuFKzxxB++8DJTk= 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=Diju1pwo; 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="Diju1pwo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082507; 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=y8B9LV+ler/WieU+IGPE+8OX97zcf6y+ob4ao9vxZG8=; b=Diju1pwomIomH5zgPhRZq49bmMcMohcHZ8QV2IfJvSRhNyoHb9ADftsZMqXgzXyMkXw0Tk oC5v/vuGD08RwsyBViudujRWz6XQ23E92GpAiUztQL7GlxiqJhCiNyUGYZ2WPFpaX+zQkA hMFYeAQqbX9uUdJ125vyIU47TzjbtWs= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-9N9HOfKTNX6hZHLsjFYtlA-1; Wed, 16 Oct 2024 08:41:46 -0400 X-MC-Unique: 9N9HOfKTNX6hZHLsjFYtlA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4313a8e81fdso12689305e9.3 for ; Wed, 16 Oct 2024 05:41:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082505; x=1729687305; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y8B9LV+ler/WieU+IGPE+8OX97zcf6y+ob4ao9vxZG8=; b=gMJrtfJN/ilf7VqqyxvyHHMpTKh8z8o7/KT2FKmVvIwjx97BaPEqvZ/kLR5QXh8m51 cQKxj2IMr8Onh7SJqAndX5jPLUjk45+IEQkGi2AIex8VKcsL+x1TtZt2gH0rRQvQ3SCz /xDbROEw2xQFpkTSWMuJLaib8FxlXZ5zRWKRf+elrEHXr5J3eaVXV34J/5q0Y5C0CXHP 4hWb07Z/B9XujO8aFFDV08AOi099NoBOk7buRhTW53SnGUpqLSVum5qWBu5KwDRpeFB2 mXRfvYWfwWCtb6oxHMSuhZXyZ2owxrOEqyUlZZyb5MXDhXPt6nfQUH6i1glps172K2a0 nWww== X-Forwarded-Encrypted: i=1; AJvYcCUOgFB0Z2VcHKUOBYBr76G5n+5JDoDpOmVMFY366G0eG5TBMSlfxsv3YJBIH+2cxgt5coQFxtLL6riuJUo=@vger.kernel.org X-Gm-Message-State: AOJu0Ywhz6XN6QkbEl+bJ808YS2dqzXhZ66vi+WOBut5uMdWJs+C5rUZ Embh+Jv0L28e6lyCAZ8iNK2C7q309lUmzssKFu/qyEFEUzUwD1XttEzuVsdC9+bQlAXXuvPi3J/ kQlC7Dhf43XbcKeStYGRE+1EvhX6XDqww6Q2u5QDvBI/qC0qZg6Qh2jVAlLSrYg== X-Received: by 2002:a05:600c:5251:b0:430:5846:7582 with SMTP id 5b1f17b1804b1-431255d53a7mr128784765e9.7.1729082504820; Wed, 16 Oct 2024 05:41:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGxF9+2xYoc2iAcnZEJLUiZOKpsxfW9lx+KNsJOv5CduYI06lG5Znx9zhblHV4xRBC8nAdSQ== X-Received: by 2002:a05:600c:5251:b0:430:5846:7582 with SMTP id 5b1f17b1804b1-431255d53a7mr128784405e9.7.1729082504314; Wed, 16 Oct 2024 05:41:44 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:43 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v4 01/10] PCI: Make pcim_request_all_regions() a public function Date: Wed, 16 Oct 2024 14:41:23 +0200 Message-ID: <20241016124136.41540-2-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com In order to remove the deprecated function pcim_iomap_regions_request_all(), a few drivers need an interface to request all BARs a PCI-Device offers. Make pcim_request_all_regions() a public interface. Signed-off-by: Philipp Stanner Reviewed-by: Damien Le Moal --- drivers/pci/devres.c | 3 ++- include/linux/pci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 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 16 12:41:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836103 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 50A9D208D73 for ; Wed, 16 Oct 2024 12:41:50 +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=1729082512; cv=none; b=OJjYJJKPrVaIFTu9sHiC65E51E3+CV//Gvw02Wz8g/qgb13aU+FIsMuJOhfYILyHPF1XXm3hjQ+yPUBEd+9zqMUIUUm2gdTjuLjZKRa8Z9CZAzJVFjuBqas6Ot79DU3Pu7UbG+D7g8k+3qaARaLESIwtr5EsZIpnSte4H40ITJI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082512; c=relaxed/simple; bh=s6xBjYgC8JsEjVYTXZALRaY3DljRr0l2UeRg0HzxlUs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=n4NZdbtzYHs854WeJSu/EgYVLXCZIkqLJPxub1GdKISWcYVqqvE74QFQ19vDc8eNVbwvPea304PWfoS8l2fS+LtWLbI8663rUE0uWb5IrNEt5zaFA/liA1AZsyCRja3QaPz7+fGjikr59VkhpCi1E/pRlf7GiXO0UW1kvWtLycE= 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=KIhU+P9Q; 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="KIhU+P9Q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082509; 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=ryss9fvWehXfEU+PDJn7zlGdxW8bFi37+f8Je+z7dQs=; b=KIhU+P9QwyzCV/IoNfzL1OVzXJzgc9RNHcIvvH2v2ssLd0To0H9pwqCRVqx3eUSTxK8Pv4 PX+cdEHn8qZIU7FRDUjNlqcsvvuhVZBFCqQtUbCLpm/voWmeQXLIx22sfTP4k3R2rITOmE cZXbKH/Oizx7ZoQfc7UVP0KgkBW9++I= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-578-xENUJrzbO06WtJB2uoYnSg-1; Wed, 16 Oct 2024 08:41:48 -0400 X-MC-Unique: xENUJrzbO06WtJB2uoYnSg-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-430581bd920so42344525e9.3 for ; Wed, 16 Oct 2024 05:41:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082507; x=1729687307; 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=eEf9nBEUAMrWRTDHGJL2i5FdfETnXoxRRA+rSUXlB3d9EgKmS3zqQKrrPKHGiXqeU1 dXKtdubOJ98KBCHKyHpCDfTBcBV4tqgPWGaYRr7+VEdZDYld0FYuO3feaePWgf1xG1bW My1VS3C9mL2/ZScUPSwPxnMVMLxrZVTJOJx6vhLwaJw23aZ6Z7E9loopen6U0wSuz5kX st7URw17fdw8LdCdf61MtMo8XtC9v0lc2bRtnZOjhRClrhbAsQ3OAtkUOq92YHrei7X3 lzM/WbUZm53vWqSol88zAybnbM3qBIjJooKjPBFEuI7fILfFMw2xtMq3RwLMg6vBIejc 0ajQ== X-Forwarded-Encrypted: i=1; AJvYcCXbuEk444dy/XVunsUkuO6DWuK6HCFrmuTcZUcQpaxl8TvOy8vyqpTs0PpJvkDuDx/r9bu4voypq8bWbiE=@vger.kernel.org X-Gm-Message-State: AOJu0Yxetgd4Qu89hPGYNM7K+7Q9Pemtv7UgwlLV+3yF7PWEIVOd0KC6 ClLj596WqdRAVdh8bPgT2riRyjTYvuHdlERqkyZuUzMhwsszEUq9SLkcXcn+sFU9bA38JXkanhL bgB8B93mmMIppZ17EGH7ibOuugd2h2MW0WsqHOcoCUp4ux5MDktBopa3BlTegBA== X-Received: by 2002:adf:f212:0:b0:37d:5113:cdef with SMTP id ffacd0b85a97d-37d86d5031emr2847109f8f.43.1729082506802; Wed, 16 Oct 2024 05:41:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3g7WDoy0OAOXsVjp/NQI6haQAc/DMZfeX+i4c5TwWAdZww2/S10/ufFMtzSgJ0/qglNahRg== X-Received: by 2002:adf:f212:0:b0:37d:5113:cdef with SMTP id ffacd0b85a97d-37d86d5031emr2847042f8f.43.1729082506229; Wed, 16 Oct 2024 05:41:46 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:45 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v4 02/10] ata: ahci: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:24 +0200 Message-ID: <20241016124136.41540-3-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 16 12:41:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836591 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 9F73A208D82 for ; Wed, 16 Oct 2024 12:41:51 +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=1729082513; cv=none; b=OKVOkdku59oAKWYGlfAkoVichB+cB9PDV1IhHCJZQF1BKpiKzUGllbtcxSygDzPtWxV94Nf4g6l+orU3L0Mepfo769jH62QTg8hgP24jcQtwnhKZfEJxqxY7QB6EZ30fS9hpEmt76ERMfZa2LpwO81swmfIplO0VBMMvDO05sUk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082513; c=relaxed/simple; bh=YCSleCRL8+zgmB0F5bhpOuGHDhDr1YVS5o/lIBwlqhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eo7ROpQ958hJv9gD2nieEHQut1hwxDiWFAye+UgaheDJuVykCyY8kJMxt1igOLxBLGY5ELA60AZiVxZ22D66Qvcr6SAIb1kL5srarjxq1YMMoi1O455ATwuL1lQraY39IECR/fNDenwKKIJtUMsPjv8Mu3fF8GXHSq+vY4CVAVI= 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=K/N81taf; 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="K/N81taf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082510; 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=W8Pv00ipT6Qdh9I20/5aALEzhWkgYoXaIfeUPDxIxig=; b=K/N81taf0MrKCmBxDBlyqQ0GN9gJkNDLSJH5oDJ8VUwTzNntwyfltXbpy+KzJI6gN3/TtI HfrWcL1P6XAQ90tiZiMUvX0IrqpCzPLuXPtxnMQi57iFL9RjhAFDGiJKstZZxDt5wIF+h4 oOncLr+SJL4asI7XKUyyLCGu4RL6lZA= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-623-GB56Vyj7PQSbHERBCBUNrQ-1; Wed, 16 Oct 2024 08:41:49 -0400 X-MC-Unique: GB56Vyj7PQSbHERBCBUNrQ-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d4854fa0eso3349834f8f.2 for ; Wed, 16 Oct 2024 05:41:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082508; x=1729687308; 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=Byb2mtferILe93nwfj65NFUfPD/VWgTxsfUKSLgRYUZgmDwqJ9f8UBVcfG6ZmyYpQN /BgdujA6pOfEGOy5Cv8KPeqWZFFMge1Im8XngiF/TWODI0k8yvCAUm+1+SA6P0Zw7xRs Pt+y1sXvMavbYBdxow638fY12yC0B/Mm8o6zjGMPwF0TFJS9eOIRXzUWLIHxrwwifdlh qJW98b0LLaiAZrvX56SA2WGl760qbrGNVDDh5H4Pe6XGvu8mtYJztETkrpvINfQ+srnq aI+czMLdsNe5Ik/ODuiqbdzR98y4lqh6QjarUwErvZ5apqd0xYNaaJD8P3WL4NSAq4CV zBow== X-Forwarded-Encrypted: i=1; AJvYcCVvoCYJZwwizCd8wNZSOEpvdlEp5/Qnj+arBYPlE0T/C59H3cUvqsgyg4+tGUh3+RFCBFqq63cQyHsvus4=@vger.kernel.org X-Gm-Message-State: AOJu0YyCp2kmUGb4zrf75mw9WDFlnm3jX+7G/X7nJfWrcY4idl5qEQC+ BGpQUluj4YLvVxX3AYfPBVagX9G4Kg3FWhcEm+kBU1gcFCr2YguETm9y2xRbAl+Xo4ml/ddG7Yg oDHYAIaehESi7fvE0uDvuQTJ3qlMc+1W0mP+0IOm/AN2Sq7vm1xp45F1LFKqO2Q== X-Received: by 2002:a5d:6c62:0:b0:37d:370a:5248 with SMTP id ffacd0b85a97d-37d86d5577bmr2997237f8f.39.1729082508499; Wed, 16 Oct 2024 05:41:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZFf3YMQtDBztciPqJ2fi/zHZMLQU2JKkhwWU7eBvggnRvVoWkn4lFSqQuDt5+GBXjzzR48Q== X-Received: by 2002:a5d:6c62:0:b0:37d:370a:5248 with SMTP id ffacd0b85a97d-37d86d5577bmr2997196f8f.39.1729082508065; Wed, 16 Oct 2024 05:41:48 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:47 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v4 03/10] crypto: qat - replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:25 +0200 Message-ID: <20241016124136.41540-4-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 16 12:41:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836102 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 9EA5F20C01C for ; Wed, 16 Oct 2024 12:41:53 +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=1729082515; cv=none; b=i4pZBdJSHBLZwl7G+r2j00dahvZZtvh6nZeh9Fsu+6cnHMfJaxGVSSSdrLauxztrh8wZ1PHDjwfhe2Cq1ZquIUoumm5ss6HaiR0haaV5LQxe1TNVCpSuJ2RARZF5KznegSyLTJDxuZ0UeavIjpHCuCx3Qrya/b/yS2ZzJSy6f80= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082515; c=relaxed/simple; bh=oVo6QvjNlOPmijXz1zHLQkfiuuBuqfV474IJ4VAK4xU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KG7w4lXSO0++hiLO/l1abcJQZky435fjSFolku/anMoEgWaWD30tPR6YU3IopvXVpo2cQFQd7HFubUmcqB8/FkbO60MQxuCSIIhb4ztmO8PsKe1BGs3i1otYDZV7HRWpqxhbQVeUJNywegmJxQ8/ff+Q6imGq8HGwDoIe7JZdzw= 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=d+5tQpTC; 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="d+5tQpTC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082512; 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=CkbzS05iowN1f0M3rgo936jPG3Sqbtimq2cAJDorb0Y=; b=d+5tQpTCqYF3mnxGq3MWVTlSmPtKxITrG4BIHBxo4UgVmZswU8GvAT5S8yYjqe0XYwGSGD vtJ/KKRnY9vm7FCZvBTq56EQFqF/RvXz5SJLUzSoY5596CkQNYkH7voY3APeM2htZohf1x xUqjF7cqDGhGIDhPkPWHxFi6rG/l91w= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-154-djF4RCSuPW-J296Iw5Ps1A-1; Wed, 16 Oct 2024 08:41:51 -0400 X-MC-Unique: djF4RCSuPW-J296Iw5Ps1A-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d47fdbbd6so3063256f8f.3 for ; Wed, 16 Oct 2024 05:41:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082510; x=1729687310; 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=CkbzS05iowN1f0M3rgo936jPG3Sqbtimq2cAJDorb0Y=; b=JGl5hJxtty2al4YBgu8ROsBfBjE014LvkthhHv/UbdllvESFByxaQ5x97+KCPS1KDX G+rFv+xhOtwshaIku0uSe2ulSKuGvVyD0VSZJmcLepo1Ajdfp/kitn9Dbou0p2ngrEBq GuE3kCD0JCol6GusWrMjHSOEkXLJZZIqT5qXj1YDsE2sc+ImzUQFrwshATwVeWIra6j5 TDMKS7uhGccZ7inSHPGXm0pRNJK05qs3/m6SpAQ2VOHPwmr5sy3CAik6JGMTi1g8+69z 4E/Pid3XuEwDsfIFY1x2c3s+TAq+xqqgjmRc+FM7dZEWCZJ5DEq6U0H6wRIzolh9Wozo tbVQ== X-Forwarded-Encrypted: i=1; AJvYcCUk1ukmDrPRsiLJMAYGxx2Q6k0biqfYE9PpfIOInCVtf/vxy486wAyykPiVkuP8lSxuT6iH0blJPZZct0g=@vger.kernel.org X-Gm-Message-State: AOJu0YwkftNDoP+8cPu7IcjHPKJStotkMUp8lcErSFv/aP9MmXOeuFDx MvmYt2VCg0ntA0zHGgCH401/5agVLYiOzB3vxOxsE3HelXyovkTalmFmaZMPrzCQUEEtKxWSwQm 87Rc76DMkl5zGEQgJWmdmlPoiLuAg+elw7OUWGRtwAVUeDUGyjqwfKZwhChk8UQ== X-Received: by 2002:a05:6000:1101:b0:37c:c4d3:b9ba with SMTP id ffacd0b85a97d-37d5519998amr12212245f8f.12.1729082510384; Wed, 16 Oct 2024 05:41:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFK1gqBE/jl0UfBUACkKIQmrpKFH7ZX+GOEOp/3UeRC+ZbEAEi2K3NnzF3HBuuhY4BbNlHnw== X-Received: by 2002:a05:6000:1101:b0:37c:c4d3:b9ba with SMTP id ffacd0b85a97d-37d5519998amr12212213f8f.12.1729082509847; Wed, 16 Oct 2024 05:41:49 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:49 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v4 04/10] crypto: marvell - replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:26 +0200 Message-ID: <20241016124136.41540-5-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner --- drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c | 14 +++++++++----- drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c | 13 +++++++++---- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c index 400e36d9908f..94d0e73e42de 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c @@ -739,18 +739,22 @@ static int otx2_cptpf_probe(struct pci_dev *pdev, dev_err(dev, "Unable to get usable DMA configuration\n"); goto clear_drvdata; } - /* Map PF's configuration registers */ - err = pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM, - OTX2_CPT_DRV_NAME); + err = pcim_request_all_regions(pdev, OTX2_CPT_DRV_NAME); if (err) { - dev_err(dev, "Couldn't get PCI resources 0x%x\n", err); + dev_err(dev, "Couldn't request PCI resources 0x%x\n", err); goto clear_drvdata; } pci_set_master(pdev); pci_set_drvdata(pdev, cptpf); cptpf->pdev = pdev; - cptpf->reg_base = pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM]; + /* Map PF's configuration registers */ + cptpf->reg_base = pcim_iomap(pdev, PCI_PF_REG_BAR_NUM, 0); + if (!cptpf->reg_base) { + err = -ENOMEM; + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", err); + goto clear_drvdata; + } /* Check if AF driver is up, otherwise defer probe */ err = cpt_is_pf_usable(cptpf); diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c index 527d34cc258b..d0b6ee901f62 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c @@ -358,9 +358,8 @@ static int otx2_cptvf_probe(struct pci_dev *pdev, dev_err(dev, "Unable to get usable DMA configuration\n"); goto clear_drvdata; } - /* Map VF's configuration registers */ - ret = pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM, - OTX2_CPTVF_DRV_NAME); + + ret = pcim_request_all_regions(pdev, OTX2_CPTVF_DRV_NAME); if (ret) { dev_err(dev, "Couldn't get PCI resources 0x%x\n", ret); goto clear_drvdata; @@ -369,7 +368,13 @@ static int otx2_cptvf_probe(struct pci_dev *pdev, pci_set_drvdata(pdev, cptvf); cptvf->pdev = pdev; - cptvf->reg_base = pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM]; + /* Map VF's configuration registers */ + cptvf->reg_base = pcim_iomap(pdev, PCI_PF_REG_BAR_NUM, 0); + if (!cptvf->reg_base) { + ret = -ENOMEM; + dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", ret); + goto clear_drvdata; + } otx2_cpt_set_hw_caps(pdev, &cptvf->cap_flag); From patchwork Wed Oct 16 12:41:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836590 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 197A520E02A for ; Wed, 16 Oct 2024 12:41:57 +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=1729082519; cv=none; b=S0yFCJt9IWhdO17zUepL5scJVdoORFRnwV4k+EZU9wV4MrMM1ODh42yGjovMk9ZcdEG/Vo3HqybRogiTFN9uyyD5dWzUOw1iCI2iuztl77itAqpgB8NJ30aGZdwfg3C7YwLZi93tx14xdr2EEScnTfU0kazJyL5BoxXBzXJDP2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082519; c=relaxed/simple; bh=xqbcT0teETgc9gYJIx/Gpdlf6NMW2EiA0uF/aZLVnhM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XPsfWKobeXBAlJFXL2Okq+IQumIsguwQ2Ee7GjZ191jXGRiKQyQN8NxHeEF7VExRjd7Aai6KHeUDLyQ+00/URwQRKjcRlPrIzPmQEtmnWbtSdkmbuZl6evy2jl5UixW/7Y1p//DflioX6wReDgg2+UOhofZd90R74jKOdcQXVq4= 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=QR84tqvM; 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="QR84tqvM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082516; 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=3HQZvfLDOQXSIlF97X3lGTL3T04sTNcN/H3+TBJ6Tw0=; b=QR84tqvMHEquxrwJKCrg/PsMPGr0L8z62tZ6utdsip3Ffv/gTTgAdIhsJJ9NAWBQiKklt/ ik4ovyu+gVs8Rcq/ZGnSNa2UBpjpQhq+yZfCNJ062wLJtA9/DPlJ9BpqDU6LCA/ySciINT kNBXVSk7xsM5LPA1Ce39/M8+TPwvymY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-689-Y0WCkk4SNAKLRbJzOwl0EA-1; Wed, 16 Oct 2024 08:41:53 -0400 X-MC-Unique: Y0WCkk4SNAKLRbJzOwl0EA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42ac185e26cso41379025e9.3 for ; Wed, 16 Oct 2024 05:41:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082512; x=1729687312; 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=3HQZvfLDOQXSIlF97X3lGTL3T04sTNcN/H3+TBJ6Tw0=; b=R3rnxzUD9bnKleWInlDey1osOyl09vpby6D2NvJfN7yA1ongHlDiaVluhNankTn8En 2ng9gbwAH9AxERKVhC8ZO3Ckzj73H0S+WsgFo0c4rtSsZgfZF58Gx8bpDuOnsY0X3wQw 6afaPjPNh5pZsYZXvI1DFjtXuV4XL3sUK2S/QymPm1hZCeuiVSt5iiCgDCZOllpPxOFE oHjTK5izEkauM43gQVe+l0QcqVDgrRw7sAX9dK3+6Bp+lvG/hJfeDCpaOc29sJvPdv+u ZiS95aeLim5/sxGo6Vi9HGDik78AvNpXSQPcRpkteML04jCbQ6Xns3UDJF2HY5t9UbLc 5zlw== X-Forwarded-Encrypted: i=1; AJvYcCXyUSjf9IjnRt7RJHYM56dgJni5yhIKAbdtuHMF+WwdPZAqjI/eVgspgC5n6nMWv5nF+qpTYZKfYk8XPBM=@vger.kernel.org X-Gm-Message-State: AOJu0YxJtefDkL0NYDt1ATMfE6+B+jxliyWfeswEFk21xRXbU9hfE9g2 1tm+ivLufOhRZHEYI2/hNxMZKl7Qij8ZUywWbDNI0BKS75FvoNteEfc5TKoo2SpZIIhjaQC5b7V 0hXMyAmGqeFrt+bxWoBup6yXKrZ2fc1HzDp/xmUuNJqNBj/5n2fU6PNBT1E2MXg== X-Received: by 2002:a5d:5259:0:b0:37c:cf0b:e9e6 with SMTP id ffacd0b85a97d-37d86d5521amr2837775f8f.42.1729082512126; Wed, 16 Oct 2024 05:41:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuuOf1sTYXDilZR7nD/RZHfWfnDIJXaRup8pfdRiWUJNRcHMmBtXXl2psjBzvHRiWx8thnIQ== X-Received: by 2002:a5d:5259:0:b0:37c:cf0b:e9e6 with SMTP id ffacd0b85a97d-37d86d5521amr2837729f8f.42.1729082511712; Wed, 16 Oct 2024 05:41:51 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:51 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v4 05/10] intel_th: pci: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:27 +0200 Message-ID: <20241016124136.41540-6-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 16 12:41:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836589 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 16C5720F5CA for ; Wed, 16 Oct 2024 12:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082521; cv=none; b=iTTGmo+AO//RcKAzqaO3g7jU0E1IyGc2JwL88mqqrz41yyFDbeQ+0eI/G4wC6LAyKAjnyrUUev72ygsJqX1T5JNmIChayHHebc9GTZfGRlvolviwTfp2+3wYCVG+IcnSddINynRO9860W1RzLR6LIEHPiYO5qOzlCpXCiS8sgTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082521; c=relaxed/simple; bh=fUViQ0wuhaRh1Z4rYxnCtcfkzxZviFoQ/oXZmPMz6Rg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pakXgx7oUqT/9eEKumlHEQbYPkVD7VqOS6JH+fuIEwAHNnkzFsQ0I2++oCoaizzcJq4kmxX5HapYh91w9uuLkpqIKtTCLnNpHJHuP/+aUpau0ZT9iMSQU30ijOvksgAsaS0x5l+Gs/BqJ4xcsSgkFmuYIjigS3sVgTFdhFsKxkw= 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=Q0vUR1dP; 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="Q0vUR1dP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082518; 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=2pA/Y9KFQGL5eKPmyYHAWaMItiz6sKe/fm026vyTOII=; b=Q0vUR1dPP7U9sAmHTCkYK9885Z3nOC47QkH4tEW0biZVGbjXpLKTliiH5TpPWUhk3j5dWt IqpvHeSsLLjVo2G1W6LAT5jM3qRHMneXHgBirwH6WwKnMUI1uAv0Qov80KvDMIkQr4nLEp +G234YO940N4RJNJ6TSl9KBd3r53FDY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-121-lwhaKbJqMBKVeH7tZ4twJg-1; Wed, 16 Oct 2024 08:41:55 -0400 X-MC-Unique: lwhaKbJqMBKVeH7tZ4twJg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-43117b2a901so56042585e9.1 for ; Wed, 16 Oct 2024 05:41:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082514; x=1729687314; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2pA/Y9KFQGL5eKPmyYHAWaMItiz6sKe/fm026vyTOII=; b=AZ7VD9yimyRPNe/6jCd8y/NOTpQKpONLaxScDpC/gAN81MZ4sI8ImaOtByzNjz0va5 G5/9Q7Lrdm6eKq2LbW1u/a8XNb80EDWd788xAPllrOYaZhj8qFkDV/nAfcHiajLNEO/v WbrqSoTtWkU5GDiF3cZ5nk3qfPcduCbpZn48N4gOulSJFE/soFfpFNsiqwfn4+j5ak9N eojzI7bLT/yfip6GG511sLCW5+/2a15spgmA55DtzJYsk6x6Wtm6HvTSniBg6FhOx7YK c52rEAGjSVmhoyzJecTcVRknmBrcFRQeWIlNCr86ONyeuST84dDLErodT8DcTg1Aevg/ /rpQ== X-Forwarded-Encrypted: i=1; AJvYcCVD0LdmaRNN9l4+UQH3yT4lMhFO6pOkInIRiOEmCZMW9tT6XPdA52s4XP6vbJ0YMnFIUfHXRsmrsk7iuT8=@vger.kernel.org X-Gm-Message-State: AOJu0YyRa2jJfF811/BI6ZHxz5WHK+5IjUtSChYl8c2qkrDvUEBaG/wz su9RdAyAcbZQxDGxVl/7LAaWZWLUSEU1xcKOv1eoP2VKvjMngmiDEOgYmZCYQdedFjcRLMSJenc Uxy1GJ8Iy4VRbqTVOl9u2Q2JFsedjIDRSD3lUnWZdIxm0wmf78Jb6pqPcTp643Q== X-Received: by 2002:a05:600c:3396:b0:431:44c6:9b1e with SMTP id 5b1f17b1804b1-43144c69d10mr51163445e9.9.1729082514070; Wed, 16 Oct 2024 05:41:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHRP/BuTiWCzH6fd4BbV0uMaXkt+guEHku1txQLYMKYVO9MVZ59DOYiHB9WTaV8Ckg5o6YnZw== X-Received: by 2002:a05:600c:3396:b0:431:44c6:9b1e with SMTP id 5b1f17b1804b1-43144c69d10mr51162825e9.9.1729082513565; Wed, 16 Oct 2024 05:41:53 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:53 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v4 06/10] wifi: iwlwifi: replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:28 +0200 Message-ID: <20241016124136.41540-7-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Kalle Valo --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 3b9943eb6934..4b41613ad89d 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3533,7 +3533,6 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, struct iwl_trans_pcie *trans_pcie, **priv; struct iwl_trans *trans; int ret, addr_size; - void __iomem * const *table; u32 bar0; /* reassign our BAR 0 if invalid due to possible runtime PM races */ @@ -3659,22 +3658,15 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, } } - ret = pcim_iomap_regions_request_all(pdev, BIT(0), DRV_NAME); + ret = pcim_request_all_regions(pdev, DRV_NAME); if (ret) { - dev_err(&pdev->dev, "pcim_iomap_regions_request_all failed\n"); + dev_err(&pdev->dev, "pcim_request_all_regions failed\n"); goto out_no_pci; } - table = pcim_iomap_table(pdev); - if (!table) { - dev_err(&pdev->dev, "pcim_iomap_table failed\n"); - ret = -ENOMEM; - goto out_no_pci; - } - - trans_pcie->hw_base = table[0]; + trans_pcie->hw_base = pcim_iomap(pdev, 0, 0); if (!trans_pcie->hw_base) { - dev_err(&pdev->dev, "couldn't find IO mem in first BAR\n"); + dev_err(&pdev->dev, "pcim_iomap failed\n"); ret = -ENODEV; goto out_no_pci; } From patchwork Wed Oct 16 12:41:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836101 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 EF3FD20F5C4 for ; Wed, 16 Oct 2024 12:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082520; cv=none; b=naAI1t+7EQaOtms14gRSkBYTZmVtWXy0gFsEmG7Ye1Eyz2HXJLa9XTHOkX0UbheLPOkADlLv4AjnAJENKA4RXdvjpx/wyOLoxBmgxwQHokp2ym7NTSKjhRoAQwysY54Yb67QHrUVHISrw80wBUZPcu3prcZlwzKcI5VO605tgmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082520; c=relaxed/simple; bh=KRhL2deOZRHNfuo7/CizyodCPj2p+YqlhuhaNJFSYuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nglWT5IVXCA4AzzW2n6pN3uK1alOQYAsa5NRZX4T2Fp8AKmAFraW/eW+vEeQXG4g+0OqphVqvkUnSQL2Rk/qe3yiS/j2bj0rO5PfwCsL+ZhRgP9PWXn1YE8cCK0xsnGCVufp4yvbWBJimmKgA5c7bVFMrz9PQ+l4Iv4jdzHQ2vQ= 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=dSAaofN3; 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="dSAaofN3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082518; 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=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=dSAaofN3gTAsghdXGLb0CK2qlLGpTSdcXh4jMx2S2MKf0S7CBDJru6GlMq1IXpG/NbwGEo j5ezpfYflhM6qFqODMcz6NlwAr/lmEJTGA5P2PqqDMToFnCzLLe8aTq4Fx0w1HBRa8UFEV ElxKHE4H2X3ALpqdj+8q7aMAJOZ5aEM= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-620-_CE4bYuxPFyrW23IsqoQ3A-1; Wed, 16 Oct 2024 08:41:57 -0400 X-MC-Unique: _CE4bYuxPFyrW23IsqoQ3A-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d589138a9so2469735f8f.1 for ; Wed, 16 Oct 2024 05:41:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082516; x=1729687316; 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=l9a1jc0khFmG5zXZdL6hpIT0WBgiTHQ3lTFA0Tyn9GimLOz/h20G82aaLYeDlehhXD GyMMa8Lo7QpXz8XFkfzgLrBxMp6yYMfFagyL/eOiFXUaHVJfxgWD6Nb/5hXeXSZVRRgt oMInPxTqEn3ZiacWdZSY+xrxuhU7Vfvv0NjeL2MVXVFcpSd6whxe0Sva1lgaARpnGQ65 3xd52IAQwAv+BUS0WTZkD7sQKsMWRvFRUXJf4E5R0VtSdJDFbM1dAGyW+0DipJxR4nhn vkDG0Ct3GERQV151PRqnrt4fdI5MX+6BEiitdgYof0FTmzWdv/TOKFNC2McSeX/fE4yV 2W0A== X-Forwarded-Encrypted: i=1; AJvYcCVF9r9W9YGC5gmI99PKN9EKaycC6RZ3ZDgaKes8SLppIY7o+KiDyUZM5Kq32ei8NTtGpxj42jl4ngO2Uco=@vger.kernel.org X-Gm-Message-State: AOJu0YyYPycmC0r7GQxugQI2JR1vHn3qr2Ag7zEY9A4G+c+69i2iM2V9 LfNd91gf03MAHyQZ48P1Y3E0iYG4C7L8QHLeF48SG5foougpBB0KqRC3MIhOCBtHVCjYnhiSTrw m2tyLJlu65b303C8wvFwNJ1w1LTCKMaIe8w2sKX6NUduAXKcKpjz/g8L8LbPD6w== X-Received: by 2002:a05:6000:e51:b0:37d:452b:478f with SMTP id ffacd0b85a97d-37d86bb6b99mr2654868f8f.4.1729082515858; Wed, 16 Oct 2024 05:41:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFK2H8/hCpU0cwTi4SjNpk9gLTo3Rp+q9K7qNZEaDsuWbxh1ss7QKO67/oTjHSIwVlBMGEQyg== X-Received: by 2002:a05:6000:e51:b0:37d:452b:478f with SMTP id ffacd0b85a97d-37d86bb6b99mr2654843f8f.4.1729082515414; Wed, 16 Oct 2024 05:41:55 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:55 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v4 07/10] ntb: idt: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:29 +0200 Message-ID: <20241016124136.41540-8-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 16 12:41:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836100 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 B86C5210180 for ; Wed, 16 Oct 2024 12:42:00 +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=1729082524; cv=none; b=CXyjljPZNAc5tu13+gkV/jMVbti9++tVCHCwv2ibdIZyoHLI8kp7agJvD4febV+bPE7TeZooNKeqCKWgois7t94y65KMUXtk/qGGMIdvHl5+2gJ4b9y3jDbEFY6iKFFx6MmPaCEzEg7K1YyDYykXnTJB6VGefbEZvvz0yI2UQO4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082524; c=relaxed/simple; bh=RRyy0x2PiBX++bfjCGlA/9AZOm7xwGM5wtpW6IKXyVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Oi3b26A/+Uf4bVe+DwVZ9NUi6HQodlySPeFjDzT4MLG/pppEpz+G8ceVpvwcP84jKv5R6xobkYK7P6VKQ5fm2yAEySB9GPfPBTcyCCBqQyeEekBQPmYOISwJwVRAN8AuU/uuIg8rBERwPmHPoEOW4Pv481wKJXZ/aJYJqTe7RBk= 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=jGUty4ti; 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="jGUty4ti" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082520; 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=WxQ5Vib/1yt2THpDXWI2rA9CY+VRhy0DxtAlfuLaLe4=; b=jGUty4ti7qsFuM6vKm3BLtHdIGFX8gTh3leLgLXrf5Y7gxug/nVPEDSzbBNZzdqYGt5Kb1 YATVowz64TrWh+tquIKa7FDt4HImoWAxWLHUVrHLDlHT7spWXe/Qq/xMOnd8tD678a+bdZ aqA4XHl5uWqn80Ze5sGXvTBvaDWzoeo= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-683-hFR8ivgrMxePyuyWV5N8KA-1; Wed, 16 Oct 2024 08:41:59 -0400 X-MC-Unique: hFR8ivgrMxePyuyWV5N8KA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43056c979c9so41428015e9.1 for ; Wed, 16 Oct 2024 05:41:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082518; x=1729687318; 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=e+6Jd3zRo7oGt/HpXKnJKpjCV8xZlNNYVm6RsHRIk8LrgVrYhNgC21heGZNZJgKSME G+3ptlGn1eh5+86eTxk8IjeOXnNjUx3/HXDvwSEV49SP9YzHY9pvKgYibJtLNHJeHY3T 4StrzwgWt4S0NUlFWrEeN2FC2ddU8blYsyH7fAx9LERbPjFUEnu6bs9kVRQVcDD/UPZW ND8+XHpK0YOwtH5h8Rx/htlBFIRBhZ3ZzXYWbSjgOIfM9CmJ8aE9dS8W7Hw1lUq725Ea 1HvewY7jF9KYVjhevXVr/Y0ng6zPE+1aKqPyjzmbSFHrJzyST2lG50El+ARBLrx+9xx+ e1gA== X-Forwarded-Encrypted: i=1; AJvYcCXu2hdZ3cj3xwRo6jmduOotvfqYvVWLoSslqAq8pe09R0Ba/ijX2ztDqfLSQ+0u/FC3+oOSt5bYLhHdG/8=@vger.kernel.org X-Gm-Message-State: AOJu0YwDwS218CGLWzpU5wdEEeLSqUxwZn3/WzCd9xgzr6gqFAJDeArX K/05XSPWPuR+UizO5QXUZZByNPBe2B4zb80Urb6c6oheUUWhhzbSyjFfyeFWrv0gWwn+J0Op1k0 8WmMhi3gL4EbwS1wlcGP6TJFUDwQLf38YrcNadrrC9Go4BJPh5ZiI7GXeEuZkpw== X-Received: by 2002:a05:600c:3b99:b0:426:647b:1bfc with SMTP id 5b1f17b1804b1-4314a3abe93mr36586475e9.30.1729082517774; Wed, 16 Oct 2024 05:41:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHw2sV/ClbQfdvwspcTkrZNz/VyaEPQ2ipBhPy5Ayv8A5HEwXPUtYjfukoE6IW5o2vvgmQFRg== X-Received: by 2002:a05:600c:3b99:b0:426:647b:1bfc with SMTP id 5b1f17b1804b1-4314a3abe93mr36586155e9.30.1729082517278; Wed, 16 Oct 2024 05:41:57 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:56 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v4 08/10] serial: rp2: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:30 +0200 Message-ID: <20241016124136.41540-9-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 16 12:41:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836588 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 CC97C210C37 for ; Wed, 16 Oct 2024 12:42:02 +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=1729082525; cv=none; b=uwzt0571e9e2xp7pLwG+T7k5F+iIdSccDK7gG0DjaEgWiuFUQPqWzgSsAFgy0p+L8x0I/Jf7wE/LH+PzwCMj6WApKVWFzEqOsTV91DRQzChBlE0ruKxOw1x8ddOtoZ3gkHVB23d9i5SX2pAmmLIHVOJ3ttjZed6/LvrptLUjUS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082525; c=relaxed/simple; bh=x2AO4woPu9H2aNxl2TylFo7TB42POmIv8HM+dl0TTWE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QuN0PX8NZpN/DJcnXIV026RJMSVr1jHYYQtMDyQLiLbcA9eZqDMzVi2zx1I4/h+WaZlnYRh0kcn0jdH6J+5yX6thuAz9s958dlW1lFraW0DLr9tI5xA25Cuat/vQpFdjZ0PXlYdzBH+YWogvDwCdVxpqR6sF3XX3DYGxMOKpUJk= 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=h0cw0uPC; 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="h0cw0uPC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082522; 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=vZ55uYUf11n7K97VlTpkijb2Akz5QQrQmQxQWIeLt9U=; b=h0cw0uPCwfeFRtlGd0S94EZoGW1Mu93sNzW/6xoX1UoIczdtHfq+Sq6lfWnqcGKL8hOn7i Y3lkF9iXH2X+r+c4EeyDzjykI1QYlkDhUrL5g5rSrbNjYVS9BzHCgYuUKr8g/sHBgfA78M K8ZJYHsECa4U4is0do06G8e6RdsD3Gs= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-39-_aiBYY_GMqmdp6pLcoNSCA-1; Wed, 16 Oct 2024 08:42:00 -0400 X-MC-Unique: _aiBYY_GMqmdp6pLcoNSCA-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d589138a9so2469776f8f.1 for ; Wed, 16 Oct 2024 05:42:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082520; x=1729687320; 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=vmyV9xcwcDMA7Hng4EWrtM4MUVGmCwiYQxSSknAByqitbY7X39t63/GWE8+h7x0Tbd gUJODnBDuZPlgoE/6Em3fuhd5GSE/SC/ztuDe/ot42O9YUNVUE10qhwQrAwQquYmPeW8 uHKk/MFnZVlBwfKv46LTc3dKXqMRQ6j0C3FmtUufLxKRcb8zpF+qWg9HinL4I/fcPHwM bo8+Kxd2fbSrvFDisYdecPW/f5oRo6JmwLwP9UVSzXzloTvEFR1q91++ZutpStrjmU8E /gXmmr4Kv6Z/Lkpr6TJt+Fti0W+/fS6+1tpGNkF27szmV9ifpYq4RLS4fu4NF0Itp+77 v78w== X-Forwarded-Encrypted: i=1; AJvYcCVT9C9U9RcYF0pcWH1P++uNBVBMLvX5e6V5XwzYZX5Rr0cGFM1ao9NWYWgJkzPjXoW2/DvfQNvMZewkxbU=@vger.kernel.org X-Gm-Message-State: AOJu0Yxd4/Fr4HpFWpGccfP/Pmm/hfChEyk2X7lFVYhWeJz+5lICeRi2 Tr5p3l0TsK46b5KL5P+LQge1EtPKiIq0phAYx8enolZaWd1euP0GdnlogaYnhi2pHuQLRwSKJ9c 3oFSWywm5pJw05W2goXbrmAA9A23Ej2fYcE/Ej1VYxWQ0/Nri2nEmwPUaNkk6+A== X-Received: by 2002:a5d:63c6:0:b0:37d:45c3:3459 with SMTP id ffacd0b85a97d-37d86bd5846mr2609145f8f.21.1729082519607; Wed, 16 Oct 2024 05:41:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcG1vuQQi/7uOxIPnqbA8E3aguDL21o7Zrwz4HGATFpZj6nHRtNeHXDvrH6Vz1nzXFwT9WGg== X-Received: by 2002:a5d:63c6:0:b0:37d:45c3:3459 with SMTP id ffacd0b85a97d-37d86bd5846mr2609081f8f.21.1729082519100; Wed, 16 Oct 2024 05:41:59 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:41:58 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org, Takashi Iwai Subject: [PATCH v4 09/10] ALSA: korg1212: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 14:41:31 +0200 Message-ID: <20241016124136.41540-10-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 16 12:41:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 836099 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 8AB86212F05 for ; Wed, 16 Oct 2024 12:42:04 +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=1729082526; cv=none; b=M6eDxGShBVUkWrCGysbrQmGvoAnTWKI4MG5W2kQX+jVsZg5EMzP9gv/CYTOPWeF1u8ozsDztwWjKtJK21KLT0jQ3MeKrnxKcBodPAhRdMeoas1iic/P5bQVSm0KGUaCYMsNvX8kszKAaKBbYFBIwzAe/RxOr2KQQA9J4owkU+zo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082526; c=relaxed/simple; bh=xeBMFrWniQWPsGN4NVOp7U+TERIRvwx/CXaeZ/U1fmE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RN13MRDaPbrcwSIfZKrElVqNjBF97Bebkz7u9BkDME8LmMP7FRsMUWgoZCkMAWTfB2X2BCVEPdsJydc58gpsI3baJLeH3apRjA/Bj4rbudP6IWSHa8wh1MIRTz/s/HqrWZ+Nefbwes8dOA/8ZEri3BlLvGn1n5aSgOeo/Zh14II= 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=byHoqlEK; 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="byHoqlEK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729082523; 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=ZRGVJdsI4KeDAeg9imgjHK9adQHetOZy1n8XhZE2xHU=; b=byHoqlEKP3uXY5fe4kcP3tkp5AYoN438H2KMOwxeBJF1AtBov68ybMhVnEbqJ9nzBQEHPg ZK6DHsjT589OWajOyCpB/ymItWhGf9+0nJVuHfj4EnJteAua6mgo+IhnPqzUNpgdArRNWJ Lz1t3TKVJUIDT+trnaQbga4SPjntBio= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-224-KB2bOH0pP5KqF0hjVZRCGA-1; Wed, 16 Oct 2024 08:42:02 -0400 X-MC-Unique: KB2bOH0pP5KqF0hjVZRCGA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4311407ae76so35471825e9.3 for ; Wed, 16 Oct 2024 05:42:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082521; x=1729687321; 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=ZRGVJdsI4KeDAeg9imgjHK9adQHetOZy1n8XhZE2xHU=; b=SH8lwoPDtqYGszbdhihLUGo+vqI7ICRZRcd9goqJT9gUm9WbRKgImPwKZ71+kVofrX ZzK0EbuPPCUrdwv+BZW4wqlEndiPMXG9T1Wxw9pkn0Lg3C+s8ZOoUPA4Nj6d1gS8HS4W 0ZLrpBG0RNU+Vfd3Og/9glyqVDlvt9VZsb4bww8HW4dSGNhs/Os74fwqRoVArs4kJreh Oejebm4fxCjBf5MTvUjp/XILAtCo6BvVfRqLXuGJOCrLsDJrbA1LcmHbRdSewfx05MhW 1eIjNjhq8ZkM+uRxmy33N/BCp/Jki/1/7UTevgtDnilA+2wqM9tuKtoIWjdYu+djolww 3tcw== X-Forwarded-Encrypted: i=1; AJvYcCX0l+vQ8HXHlUOAJUkHYpb2tbUlLkeCpHXdOSHcCWqsP7Zxrbqd33y6kja/6Pk7V7PrbkBdJ3CFzjOXrHg=@vger.kernel.org X-Gm-Message-State: AOJu0YwQ/SDAwTmzUMpmoD6Bjqb1tJtGQq/j/6pzoWqfBKEeH6ceUUWx 5Qnd5vLgIpMxgc3HEsIbc5nC3lDIfvIFAztZV5/xqTKgzVn/2pqEkwAq8UHGP1IGTN0Z08z/LnE H/TmW/7F3eXZrxs7hM/+/DQxg5IfBJmeounaW25kSpjq06eoznsqGTfWgNgUJiw== X-Received: by 2002:a05:600c:4455:b0:431:5522:e009 with SMTP id 5b1f17b1804b1-4315522e18bmr6220175e9.12.1729082521406; Wed, 16 Oct 2024 05:42:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGE3P1Sf2DjAjua7QaSHPu6bkCGVM+tumEiRjRf2AVFHTw3nylGoruyKCB/DirRoG2V4OxriA== X-Received: by 2002:a05:600c:4455:b0:431:5522:e009 with SMTP id 5b1f17b1804b1-4315522e18bmr6219795e9.12.1729082521006; Wed, 16 Oct 2024 05:42:01 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa8ffd6sm4246879f8f.50.2024.10.16.05.41.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:42:00 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v4 10/10] PCI: Remove pcim_iomap_regions_request_all() Date: Wed, 16 Oct 2024 14:41:32 +0200 Message-ID: <20241016124136.41540-11-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016124136.41540-1-pstanner@redhat.com> References: <20241016124136.41540-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com pcim_iomap_regions_request_all() had been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). All users of this function have been ported to other interfaces by now. Remove pcim_iomap_regions_request_all(). Signed-off-by: Philipp Stanner Reviewed-by: Damien Le Moal --- .../driver-api/driver-model/devres.rst | 1 - drivers/pci/devres.c | 56 ------------------- include/linux/pci.h | 2 - 3 files changed, 59 deletions(-) diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst index 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);