From patchwork Mon Aug 5 08:01: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: 1968924 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gXi+XNLM; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-ide+bounces-2032-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wcpnr5hr2z1yZl for ; Mon, 5 Aug 2024 18:02:40 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5EEEF2809AC for ; Mon, 5 Aug 2024 08:02:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11E0B14F12F; Mon, 5 Aug 2024 08:02:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gXi+XNLM" X-Original-To: linux-ide@vger.kernel.org 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 5C9F114D290 for ; Mon, 5 Aug 2024 08:02:09 +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=1722844930; cv=none; b=N1r3vHyXGLwSgoh4om81yf2/DB0QW7MGdA19PjwZrkjIOG5ajFFaftktZb5l+os3TW/O+ayw33nrV4JNY7cJ/dV8CrLyfLoedF/Kz6GZxu/4Olbvg2IgIXeqU+SEIpWLWEBCfcvZWBnmjA/j3rLsG1EoQY851imcoUDv7Qu9h8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844930; c=relaxed/simple; bh=PMvC17bGpWpI73UNcLQbu72jMyBfAq60m2YMRm7gpdE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ea+j5ffBzIDg/yurnRXoxl8JfYYZMACwL13CPQdiimUUA1bPpfBBfR0c01mtXQ09lZH0kzOPZ5mqzvUdCGq/RByRzMfGJPB+3l+gbTPGb4kN2G4OxN2IPDnBihJuLXBFvb99mbjlSiwvTDYFIRprpgBZwwa7TVMYuWq3DDgLi6I= 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=gXi+XNLM; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844928; 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=fCKgXS8g88Bg2YGymWSAuOupDyZ6pDfS4Oy1WWS2It4=; b=gXi+XNLMSBgLHWnmAVK77YRC0zZLiJRMYocKcpLSngEEGHuQv/Bw6ORm50lGqDJukjmLNp pmMe9V9+YjMKdAz9l2Vs84LvXmMxMsJaWltNazxQU8QAGNXFjBprRzzwYrqS4LSzpF4t4n KAuTjgaJdlEhnn9ZNOvN4q48wNtjI4w= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-202-L_-Yad1oMkOmLrQCLaWLZA-1; Mon, 05 Aug 2024 04:02:07 -0400 X-MC-Unique: L_-Yad1oMkOmLrQCLaWLZA-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a2b8c44b48so2654776a12.0 for ; Mon, 05 Aug 2024 01:02:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844926; x=1723449726; 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=fCKgXS8g88Bg2YGymWSAuOupDyZ6pDfS4Oy1WWS2It4=; b=iGgCZ5tvBu3q62G8KXoRZwKALkif8XqvfsSPvHYlM9EYVcgYmaSazvTLOXwrH3SH8H D5/2eDnj5otXBgr7ZSWyYQNchyIj6HzesLAQclunDaOkwPlIj72EjYIZpjfjOibmUswJ toqyQ4ZQyq49BYiTLCImETEjN5JJZ7mEn3i0uP7qRMz/5axaU4K3/ouazaCf46Ur6/ML 66i27Ed90Aw0m7tIoAKzX0iWoiNltLl54N2JdYmcV90GtbGL2vwAdqqm8gEJrCHY629u P8GtZiO5/6a9jQ4ZV3KXkj9EnGHxio2apRKs/AmCbZRxtkB2WSUgEGe1F30eGmqHeq/l NUOw== X-Forwarded-Encrypted: i=1; AJvYcCWsVCy3nk7+e6qufdAB6m///UVJv73J9rb/A+tpGU1WJ26eqcJbiAGJG0lRgudP+6rN6IUTBoqOZyaH/8h4016ja7uqK75a3MpW X-Gm-Message-State: AOJu0YzP6GDBl92aY0NaAmaS79XDa0dCRBl4v+F/EHyilYXBP16zbAWq ME913/zMQJBkKqezYPvg8L6cVJCOPocZ8ngBR3IQGdVmrw4Yj/wl496xO2Lhz0qOHMwCX9faBu1 l1v8NrrZ7Ldo+zw25BJYG7JWDVlkHr/wKCH9cwkTByhR/2LGKvC48IlpzUA== X-Received: by 2002:a17:906:cac7:b0:a7a:ab8a:38b with SMTP id a640c23a62f3a-a7dc50a036emr405428366b.7.1722844925258; Mon, 05 Aug 2024 01:02:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8B0uAdpCjmN8RXKqb6GrkT9cJblAYXyonWs0YpjO3v6slHT4MqkSoaoDsG7XIcg/iI+6TwA== X-Received: by 2002:a17:906:cac7:b0:a7a:ab8a:38b with SMTP id a640c23a62f3a-a7dc50a036emr405424666b.7.1722844924726; Mon, 05 Aug 2024 01:02:04 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:04 -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 , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner 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 v2 01/10] PCI: Make pcim_request_all_regions() a public function Date: Mon, 5 Aug 2024 10:01:28 +0200 Message-ID: <20240805080150.9739-3-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-ide@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In order to remove the deprecated function pcim_iomap_regions_request_all(), a few drivers need an interface to request all BARs a PCI-Device offers. Make pcim_request_all_regions() a public interface. Signed-off-by: Philipp Stanner Reviewed-by: Damien Le Moal --- 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 3780a9f9ec00..0ec2b23e6cac 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -932,7 +932,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; @@ -950,6 +950,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 4cf89a4b4cbc..5b5856ba63e1 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2289,6 +2289,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 pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);