Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3127889rwb; Fri, 16 Dec 2022 10:24:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf7dKc2Pwd5XkFM4EGcH/HNEBwm+dr9wk7GRY7jB+sZ9gpfjTEjhEw0eMfXpDnuyLyl1vZZ9 X-Received: by 2002:a17:902:6b08:b0:186:b88c:2c5e with SMTP id o8-20020a1709026b0800b00186b88c2c5emr37748664plk.4.1671215073747; Fri, 16 Dec 2022 10:24:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671215073; cv=none; d=google.com; s=arc-20160816; b=shrzmGfvysZsXP16mNin8bls/LFxsj1hHAZRDWXDgy7o/Kh55d7qNlqat7M7PeeF6C 9nfu77IjiPoLcsTPn2Y38Y7EbQzKO+4/pXIaLM/DCX4Ls7ycvJpi/cKvg+fYtKWhH+it Wyh2XtRIfb4+cIeWfNhJJENTrVlyeLZfvYghj2NpPkIeBUepvxnIv3tpezV+coyzpLRJ oN+cvsbWLFKi1ksuRoA/ratwYq6wfxoDSPNXcit2DN7HXzzijZu8oktTqWxcPcynpDs4 qKd1bLOua8zsnHZT1JwXcTHsjBc+25tXbFF9k3y2NgDFnPTDTJkONB6DwvCWhNkSiXGJ yLNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QhI3I9cUXogstCurx27Sae0I/aGsRR7ZSr74nA/gLAg=; b=0F9iNKe/jcdzvYcJxvkpk33O3QLiQQR6fHBNCeyA+nlQLrHOgL6735OyoxGFJOA5G5 hXKQGhYdEM1kVikJFdbQiNsmN6VRCFzmyOO7K3DVuCgkh8xBsj+yMobhkME2MwuBa8yc WpSSD61a/MY1dowdA3e7vVYTVEzqbZoOy2BeRlMLkdkUwKJIyKYfU8s/gH1kTvtG9pn5 zWCScEwqbF/AGjfpFmPQedH3qfrPBJwuiru05I/nd5OYVUm62CHVRQ7sYjXzNac0cQsf WeDpuvgrCVManbQMD6AJ6Geq6X1V8UN8Ozp+SObyiHwvxh62500j05k+sOxDtJ29wAln tE2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BMNLbSDv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020a170902f54e00b00189cbf6953dsi3504893plf.300.2022.12.16.10.24.24; Fri, 16 Dec 2022 10:24:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BMNLbSDv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231474AbiLPSMQ (ORCPT + 68 others); Fri, 16 Dec 2022 13:12:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbiLPSMN (ORCPT ); Fri, 16 Dec 2022 13:12:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62B3220995 for ; Fri, 16 Dec 2022 10:12:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0C4DDB81DE3 for ; Fri, 16 Dec 2022 18:12:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65616C433EF; Fri, 16 Dec 2022 18:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671214329; bh=EQwSxpl+zpTdyhDbHRgL+UfUwuM/dclgBgTDBc9V860=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BMNLbSDvDA69HMoq1GmHwzXhjePSvXk6azZ38qidJGeyZM3Ql6MAFH4zFehSA0uia +B57HSAFjt+lxm3v7SFPuU5c7UPdf4l4S6dg91V5iVhbvpvbW8yXqsvBYRpiT2zidK zaixjuDd3N18rQ4KJzq7PwxI9OTwJCSx5tItNWmuQgXbLAghY9/1m81rgXF3aAldNz L0RVCwTlqrC/tS30it2tIuFNlWCoLNPaenMbTQ94Qn6hnR5bi6szpu44VyU8ZwE3dl z2REQ16Vfr1OyOmbAF5cvo7DGsi5NowTvbhlmbtaceV4SwONV0JtN6HQ2VJRGxD72b VbiD5YztsPVHQ== Received: by pali.im (Postfix) id 71EB2711; Fri, 16 Dec 2022 19:12:06 +0100 (CET) Date: Fri, 16 Dec 2022 19:12:06 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] powerpc/pci: Allow to disable filling deprecated pci-OF-bus-map Message-ID: <20221216181206.tfzd2qalkking6sj@pali> References: <20220817163927.24453-1-pali@kernel.org> <20221009112555.spnwid27r4rwi67q@pali> <20221101222603.h3nlrp6xuhrnkmht@pali> <20221126162345.a4uuyefmtavfqa6g@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221126162345.a4uuyefmtavfqa6g@pali> User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PING? On Saturday 26 November 2022 17:23:45 Pali Rohár wrote: > PING? > > On Tuesday 01 November 2022 23:26:03 Pali Rohár wrote: > > Hello! Gentle reminder... > > > > On Sunday 09 October 2022 13:25:55 Pali Rohár wrote: > > > Hello! Any comments on this? It would be nice to take these two patches > > > (or at least patch 2) to finally enable PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT > > > by default where possible. > > > > > > Per following comment there can be an issue with early powermac so seems > > > that PPC_PCI_OF_BUS_MAP_FILL still has to be by default enabled (which > > > implies that PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT is disabled) on powermac: > > > https://lore.kernel.org/linuxppc-dev/575f239205e8635add81c9f902b7d9db7beb83ea.camel@kernel.crashing.org/ > > > > > > On Wednesday 17 August 2022 18:39:26 Pali Rohár wrote: > > > > Creating or filling pci-OF-bus-map property in the device-tree is > > > > deprecated since May 2006 [1]. Allow to disable filling this property by > > > > unsetting config option CONFIG_PPC_PCI_OF_BUS_MAP_FILL for remaining chrp > > > > and powermac code. > > > > > > > > Disabling of pci-OF-bus-map property allows to enable new option > > > > CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT also for chrp and powermac. > > > > > > > > [1] - https://lore.kernel.org/linuxppc-dev/1148016268.13249.14.camel@localhost.localdomain/ > > > > > > > > Signed-off-by: Pali Rohár > > > > --- > > > > arch/powerpc/Kconfig | 12 +++++++++++- > > > > arch/powerpc/kernel/pci_32.c | 6 ++++++ > > > > 2 files changed, 17 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > > > index 5881441f7672..df2696c406ad 100644 > > > > --- a/arch/powerpc/Kconfig > > > > +++ b/arch/powerpc/Kconfig > > > > @@ -373,9 +373,19 @@ config PPC_DCR > > > > depends on PPC_DCR_NATIVE || PPC_DCR_MMIO > > > > default y > > > > > > > > +config PPC_PCI_OF_BUS_MAP_FILL > > > > + bool "Fill pci-OF-bus-map property in the device-tree" > > > > + depends on PPC32 > > > > + depends on PPC_PMAC || PPC_CHRP > > > > + default y > > > > + help > > > > + This option creates and fills pci-OF-bus-map property in the > > > > + device-tree which is deprecated and is needed only for old > > > > + platforms. > > > > + > > > > config PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT > > > > depends on PPC32 > > > > - depends on !PPC_PMAC && !PPC_CHRP > > > > + depends on !PPC_PCI_OF_BUS_MAP_FILL > > > > bool "Assign PCI bus numbers from zero individually for each PCI domain" > > > > help > > > > By default on PPC32 were PCI bus numbers unique across all PCI domains. > > > > diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c > > > > index 433965bf37b4..ffc4e1928c80 100644 > > > > --- a/arch/powerpc/kernel/pci_32.c > > > > +++ b/arch/powerpc/kernel/pci_32.c > > > > @@ -64,6 +64,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixu > > > > > > > > #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_CHRP) > > > > > > > > +#ifdef CONFIG_PPC_PCI_OF_BUS_MAP_FILL > > > > + > > > > static u8* pci_to_OF_bus_map; > > > > static int pci_bus_count; > > > > > > > > @@ -223,6 +225,8 @@ pci_create_OF_bus_map(void) > > > > } > > > > #endif > > > > > > > > +#endif /* CONFIG_PPC_PCI_OF_BUS_MAP_FILL */ > > > > + > > > > #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_CHRP) */ > > > > > > > > void pcibios_setup_phb_io_space(struct pci_controller *hose) > > > > @@ -264,6 +268,7 @@ static int __init pcibios_init(void) > > > > } > > > > > > > > #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_CHRP) > > > > +#ifdef CONFIG_PPC_PCI_OF_BUS_MAP_FILL > > > > pci_bus_count = next_busno; > > > > > > > > /* OpenFirmware based machines need a map of OF bus > > > > @@ -272,6 +277,7 @@ static int __init pcibios_init(void) > > > > */ > > > > if (pci_assign_all_buses) > > > > pcibios_make_OF_bus_map(); > > > > +#endif > > > > #endif > > > > > > > > /* Call common code to handle resource allocation */ > > > > -- > > > > 2.20.1 > > > >