From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04A2BC433F5 for ; Mon, 20 Sep 2021 08:37:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E3EBC60F12 for ; Mon, 20 Sep 2021 08:37:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233496AbhITIic (ORCPT ); Mon, 20 Sep 2021 04:38:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:42904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235527AbhITIia (ORCPT ); Mon, 20 Sep 2021 04:38:30 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB5FA61077; Mon, 20 Sep 2021 08:37:03 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mSEnN-00BikW-Cm; Mon, 20 Sep 2021 09:37:01 +0100 Date: Mon, 20 Sep 2021 09:37:01 +0100 Message-ID: <874kafwslu.wl-maz@kernel.org> From: Marc Zyngier To: Kishon Vijay Abraham I Cc: Thomas Gleixner , Bjorn Helgaas , , , Lorenzo Pieralisi , Subject: Re: [PATCH 2/3] PCI: Export find_pci_root_bus() In-Reply-To: <20210920064133.14115-3-kishon@ti.com> References: <20210920064133.14115-1-kishon@ti.com> <20210920064133.14115-3-kishon@ti.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kishon@ti.com, tglx@linutronix.de, bhelgaas@google.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lorenzo.pieralisi@arm.com, lokeshvutla@ti.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Sep 2021 07:41:32 +0100, Kishon Vijay Abraham I wrote: > > Export find_pci_root_bus() in order for other subsystems (like > IRQCHIP) to find the root bus of a particual PCIe device. > > This is done in preparation for GIC ITS to walk the PCIe bus for > calculating the total number of interrupt vectors that has to be > supported by a specific GIC ITS device ID, specifically when > "msi-map-mask" is populated in device tree. > > Signed-off-by: Kishon Vijay Abraham I > --- > drivers/pci/host-bridge.c | 3 ++- > include/linux/pci.h | 1 + > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c > index afa50b446567..4ec34d040c02 100644 > --- a/drivers/pci/host-bridge.c > +++ b/drivers/pci/host-bridge.c > @@ -9,13 +9,14 @@ > > #include "pci.h" > > -static struct pci_bus *find_pci_root_bus(struct pci_bus *bus) > +struct pci_bus *find_pci_root_bus(struct pci_bus *bus) > { > while (bus->parent) > bus = bus->parent; > > return bus; > } > +EXPORT_SYMBOL_GPL(find_pci_root_bus); There is no need for this export as the ITS cannot be made modular. M. -- Without deviation from the norm, progress is not possible.