Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3408777rwb; Sun, 9 Oct 2022 04:48:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+VncXoKMBqFqZQywf707XhdnWebz/wDevn9rGoqzFXTQK7IWPBKtNrQ87GkvI7ZKEIX0C X-Received: by 2002:a17:906:da86:b0:740:7120:c6e6 with SMTP id xh6-20020a170906da8600b007407120c6e6mr10721782ejb.44.1665316127732; Sun, 09 Oct 2022 04:48:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665316127; cv=none; d=google.com; s=arc-20160816; b=FFOd7Ss1f2yMCMFJMKCLPyUnjQzZ7Zs2GZv2ydguShCAV8R1sGjCvy+26Y3bnLQ5hX ZND1aOQPBlmP6i0orON77wm4XYPqbYj4E4/gVe9zhLqGQff4aoOvPqYD0UiLUvHsdjcl xMybicbXOM8/kiSI2s0RKf+AALcaBcVT6hivJECM4CeKGpeX3RSaVaGVum/co1P7mRNJ 2FgXZXFH+Cni32S2hbpskDaS3zVo7KDGf6HBylZfOsE6vNgDjhhw6Q4xhzPr7yyzhgZk tNtq0E4PKNJmVPwZIHuXFv7gElbA6RuUabIVY8a9zbhGZjEKY0GMDKubWWGjkejgH88M Z11g== 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=jMDE3rUZmKUYsGV9CNjLGaFdIgZbjMue7zyjNdbzUoY=; b=eXNdzbUu0G1EOeNCsNTUEmAtFhNeSRVZO069bQwKZ1c06k0kJuLL1ApWlKEuC6S6Sy uDrVPY7fl6m2qnIVT9B6yezedV0MrE1fMb1fftISjpPFKTD3jw46aoh249sBygTi8wQv PKFItrajxsxEIn4hfi3Dy8vefZQOAytgkGWo4qI223RV8M21nPoQsPz9NNtW2dpsf7aO 3M0ABtZa054cGv0mZdEvjf8hFVjTo/Y6VtvWLth4GWFdaDxK5wtQ+NYAYVE/5YoRAtqU 9xhrdna+z2ubsS1BwFQpVWyOvG4zv5YZ1a/D5S/HsRxRYGF/A/thN/oWJe5nHGRBRdE+ v7iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cXn92ofM; 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 ds1-20020a0564021cc100b00459060fce1bsi7266171edb.574.2022.10.09.04.48.22; Sun, 09 Oct 2022 04:48:47 -0700 (PDT) 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=cXn92ofM; 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 S229959AbiJIL0D (ORCPT + 99 others); Sun, 9 Oct 2022 07:26:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbiJIL0B (ORCPT ); Sun, 9 Oct 2022 07:26:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 440DF29C96 for ; Sun, 9 Oct 2022 04:26:00 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id C6B7260B10 for ; Sun, 9 Oct 2022 11:25:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB9EEC433C1; Sun, 9 Oct 2022 11:25:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665314759; bh=RWoJ+HRthYPnrVlUIvWl8qMmgExuYuB6N7cI/vjyLRU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cXn92ofM+CfvPdOP+V3wZ+fWBf6l8krxgob4WFEG4J8tmT3inLDRGso1fftOVNL8F 5TNiXZvpaxb0yj7Gdg1RkXF3kL0zuTmjj1A9u8btrDRo8jd87Neebdvqf5OhgnmaNJ Dha7MMCtjnaWf25LgrTNvhrtybpImWmTvIpxxaqKf1l40rhkP/UUFEqwOOgzrhe9qC 0jZcfgNkZY1sA5AVPaX/GHSB+sYAgG5uabTnnxZfmHA5OPVZmqW1+5qtKAJkmu4JqV K0xbD6rXBlqrd144QkwDvJLzdIJEl9IfoJyqzq62l8UFM/A6SIfETeKsDblliq3l9K YgDbLjk1dNEzA== Received: by pali.im (Postfix) id CFF5E7C1; Sun, 9 Oct 2022 13:25:55 +0200 (CEST) Date: Sun, 9 Oct 2022 13:25:55 +0200 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: <20221009112555.spnwid27r4rwi67q@pali> References: <20220817163927.24453-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220817163927.24453-1-pali@kernel.org> 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 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 >