From patchwork Fri Oct 25 14:59:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 838685 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 F3F681547D4 for ; Fri, 25 Oct 2024 15:00:40 +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=1729868443; cv=none; b=QQcpSEVatxLdZi9I5XzU4Fg/KdZXn3GOup+DH3kGuYoG4Fc7LkkGtc32KbPNeTKN1ygr+FRKVeO27G/YUDzFIGwfTymo6/scgejjyGBIvG1iRvtMLnHyqumz5jdqBUtdyCEtU9xWY68b3df4jLQ8AiEp/LrTV7RkjQS/EvzIBrY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868443; c=relaxed/simple; bh=pzHm+p7iOQ3ZHeJddCbAsTb72gDaFZfayku/dAdnQvc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=moYl2cGYuuauU61jkQVMYviUPEEe8B4I1hvIAKH4U5o7dMvvR7jP+NIdfaaARF3oLw3iqxhnwwzYL/HNccJQ7/m7STf4HLnsSbhSaX5w4PKdjJ0286UxoRW3Kb6Nok+dYr7OxvG9QDkgZYc82dgddgNRtj3rD2H5ZnDIDQ7Nf9E= 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=Ch9Dtond; 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="Ch9Dtond" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868439; 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=Ch9DtondbYM+OQucLYGfVepaHyTPEpwkPkB3vvw4yZ4sDV7uTVhtBI8breNPcZRequMaG0 Au9NZ9iE4WdeA1/V0YA78hUwZuUUBsjmMCj1QBw9465DT0xK0CUAh53fbEUKGZ6jJ7TmsL TOnFikCVEiWZ0BkGHcC4EUJ/zaL8Yjo= 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-602-bdPwoRQrNEKh-h7ojlKWFw-1; Fri, 25 Oct 2024 11:00:38 -0400 X-MC-Unique: bdPwoRQrNEKh-h7ojlKWFw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-431518ae047so17252335e9.0 for ; Fri, 25 Oct 2024 08:00:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868437; x=1730473237; 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=wT3lsKmgNsK5gf7buz8oSWvXUT5BEC9i2oyh6rXoRqSPux+Cs5TWWqbfnJlBLRejB7 ZYscxhO1VtePYEk3aFN4vTDYYfapU8nobSUSMlImdwqdYn/SgPI2h5H5djHST8TGKlKP fQf/0+H04h98HPqFA7tb2EV3OAKrRFtQmTJ6tuOkHrM5VucGqIVnWwhuKC7/yqqEpJ+j rW/QXxOQSTAqpmWMpkGL1E6DWSSLaLMkgm2Hgn+FwMkMo7K2RCdout1sdK6t7yPB3NsF iGRbTWeVLkFlrjpni2KKoqRtSkuiOlc/jRDEoh6cJ59vh5K3wePmhY/rwzCidDj5caVK VyWQ== X-Forwarded-Encrypted: i=1; AJvYcCUrhIcZZhvot9T9DfRTXv1lcBRmpZVzjAfoy/HaaHjo7xIoDCrwm1dzDgzCKt77OAcQkZ1FlsaE2wN1Y5w=@vger.kernel.org X-Gm-Message-State: AOJu0YyPLi1WCXWvKM69/DTY810u6hNONKn7s1V/WMogJM+Sy8MeyBFS 2WK5LH6S3XKklKNRzotijtPe1wynflIauJTFiT+pHZvOt8tZ7m8GG3D41Hku849BY/n836aNeIq inQdiqO7/x1pgnclry9GlUpk3ilBHWpS5EDp3e3c6nkxwt34X7GWQF4AI/2KmbQ== X-Received: by 2002:a05:6000:d84:b0:37e:eee5:80dc with SMTP id ffacd0b85a97d-3803ac6704fmr4258041f8f.28.1729868437447; Fri, 25 Oct 2024 08:00:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0kR0T6tO4HMLrjOiOdPK2NT4nWQw4oUfgmMiDyLMaWTYTtq+bTSQKDKbrlWpwhU7sEMawvQ== X-Received: by 2002:a05:6000:d84:b0:37e:eee5:80dc with SMTP id ffacd0b85a97d-3803ac6704fmr4257961f8f.28.1729868436829; Fri, 25 Oct 2024 08:00:36 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:36 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 01/10] PCI: Make pcim_request_all_regions() a public function Date: Fri, 25 Oct 2024 16:59:44 +0200 Message-ID: <20241025145959.185373-2-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-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 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);