From nobody Tue Nov 26 19:46:15 2024 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 7522D208D85 for ; Wed, 16 Oct 2024 12:41:48 +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=1729082510; cv=none; b=scW8iurUFNBvwIVmT3wxt8sPRbYphkaUF5MkJ4oYrYP4qAkEFrCxJk+ZPjXEMOlojGJjt6wRdAW2C+47HXKNSywLJ7EHkcG0o/CycCosjf28RLd/LYBgS7nqMXcuWyqEroP4XdIyAgyUT4Xa6uTdJCORSLdXsVQhrkHqJF959UA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082510; c=relaxed/simple; bh=pzHm+p7iOQ3ZHeJddCbAsTb72gDaFZfayku/dAdnQvc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dWUbvWQDZviTd3sd5j2NCV1y5ovEDD3MS/HYLkqU2iQNSf5WFA9uHJwuzAG8PkkdL0e8wqm8JUMhNq88xTtu1QzR8IGnUQVC53PIuF9VMvv5Itnfz1TGpRYTYmaB7oAUGBnmj53R55G9bcLk2Ec9yZnbxcdLB8V3H+SIHbhxv0U= 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=dP9k24RO; 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="dP9k24RO" 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y8B9LV+ler/WieU+IGPE+8OX97zcf6y+ob4ao9vxZG8=; b=dP9k24ROouWtoi0wgUP2ERMPrz1gPIoIj1Tljav8cuabAI6RIcvvhl66LBdkzWAXdwRPck iULxpx38BzaRat+Xc514hijBUnjznUGEZZlQgC+eDw6GZUvIpkQ4cgfBx9ia2xEY78lpYj uIvmgE/tOogNcGu28g8bkmaENtm6os4= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-wqz_QeQRO1S71_-3vDhang-1; Wed, 16 Oct 2024 08:41:46 -0400 X-MC-Unique: wqz_QeQRO1S71_-3vDhang-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-43058dce286so37974815e9.2 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=wXZPvp8XCm0BIdtfJO4TGBjCAuoCfb6udFGAap+cb7dl1L+nFjLm+edPIwFADBJSYZ gq6r7FT5JH+wS0pN9G4u6SJYYDZqKvjAFQrz9+3CbS+I9UDO1W3LddHWt1ARX6FDUO9V ir0E07GAMe+5XG0TTJ8GpVyIW/1pouyZQtjbbZxkuLHiu5hEs4A/V6+FwnKzR/rjJdif favmUdY7mbP1J2jy30zEcgcqBlNjQRy6p7LnPBe8gRmYPNGWSGb1hVRHz/ccKipJ1D9o D21MQ504IxCQk//tJFVKFbrs30JF+ZKkf8J7f8LPFk4Xp863UGA8kCmrG+OW/hex7t+F 67vQ== X-Forwarded-Encrypted: i=1; AJvYcCVpQWn61ovccrW2HvMBoQfhPvz8J2vJRrxAZ7gwehw/0ysgMc6FkPYc2SvCpXpxuU/fOMEy0HEv8YS6od4=@vger.kernel.org X-Gm-Message-State: AOJu0YzmE94pSW8cEIH+cMcT2JGM0SCVxc7ztHpX4eJ/qO+8xpZNsbul Pjwvl238wp3nObmFrZ3LWU/x8GXxxpxROLXpnJQT2lsF9JmVvzK9ugqJ88rycvi8z8MDUmCThaL trRs4G0+NfLkBZH3GimtaaTRUMWzCPew1khjxnpljWB0miXHdJA11dL1GBjDUwg== X-Received: by 2002:a05:600c:5251:b0:430:5846:7582 with SMTP id 5b1f17b1804b1-431255d53a7mr128784715e9.7.1729082504816; 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=20Kleine-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=20J=C3=A4rvinen?= 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 *pd= ev) * 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 *pde= v, const char *name) =20 return ret; } +EXPORT_SYMBOL(pcim_request_all_regions); =20 /** * pcim_iomap_regions_request_all - Request all BARs and iomap specified o= nes 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_pa= ss pass, struct pci_dev *dev) { } #endif =20 +int pcim_request_all_regions(struct pci_dev *pdev, const char *name); void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxl= en); void __iomem *pcim_iomap_region(struct pci_dev *pdev, int bar, const char *name); --=20 2.47.0