Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3138033rwi; Tue, 1 Nov 2022 16:40:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM46OFAQPy0AC1RcXSz4yr7h8LeH9W1ViFxE19uW0rpnFzpgsAXtrGLoGUqapkZaFpDK7KTT X-Received: by 2002:a17:902:b089:b0:178:54cf:d692 with SMTP id p9-20020a170902b08900b0017854cfd692mr21858320plr.1.1667346022088; Tue, 01 Nov 2022 16:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667346022; cv=none; d=google.com; s=arc-20160816; b=dX8NHnmQR5/yZ+uv1qM6mzaXWW/T0ulPf952qJoVtUzVTFbZgvatuAZBu9BygqNlHO aKiI3oySTcz97fP8gPLeKto77c+vJQ+OfIaRZkQP+olIbLO/U3B07c70IkUSidSjWJPZ eEFlmOGLlwlX4XSRSEAeZGYGTXt9kjng5Zk7oU+umxJLG069AXZHCV1NkVa5KghtJTe4 EyB1MAkJM3abgZzDB4ZUXPM0peABQN9DEw3oIjAJDNpcnDTObGjBew4MEcRXM/iS1V3b 6zx0QygkuNCEMvF4h+jQM5MGytjx9UimbFA2kMm8yVmz5OmGKx0bfiVqSx1qCbJLiqCU jLLw== 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=Koyus4UWi7udytQpSyIihwwzXmmchHW2gQf5mVr5K/c=; b=aB+hwIAtfYmXOwFER2yNv5fuFm2deeVpg/vAu0NGbLvRQ+DJuVB4wcx0hCWgXZLigv QTAh8kSvDi0zT0dkq2pIarTK9ZnppxxeNn4iv45lEiP7P610anzIhefwNUf9ko0NmTBN A8U2SA88U/3W/k8/BbyNeYrG7D89lbR1A6oOHhgXwB0uNZi3HJv3UyAyTWyZWgHN0Iqq TdxZMmWIGCn0z/RMq2zSFcWAwng8nhU0CCoZ/gnBdl+nh/BKlJShUH14soMGmsbRdlyG xI19BtwQIkjOHA57FAAu/c1ipI/543V9A+DdnQuTRpDu7pDZhXEA4j01bMgcBRZkfLWT llYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q1jxn5yU; 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 q17-20020a17090311d100b00176a87603dbsi15161489plh.156.2022.11.01.16.40.09; Tue, 01 Nov 2022 16:40:22 -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=q1jxn5yU; 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 S230027AbiKAWTR (ORCPT + 96 others); Tue, 1 Nov 2022 18:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbiKAWTP (ORCPT ); Tue, 1 Nov 2022 18:19:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AACE4193C6 for ; Tue, 1 Nov 2022 15:19:14 -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 ams.source.kernel.org (Postfix) with ESMTPS id 565BCB81D5E for ; Tue, 1 Nov 2022 22:19:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5D4EC433C1; Tue, 1 Nov 2022 22:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667341152; bh=v73XKO2dv2pQM4fjAlceJjzyyZMYGzwj0m0kkoHnX+U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q1jxn5yUzPeL4LWxwxAZASOqIIgRdDe9758utQluhnfNNyDSOfZu8ClF1k36FvoBA AYwU/qVpCCtDIAeDXetD+7ab0keCb2OJhuZJ5+B+jUwPmb9xdWa45bgKzt1PkhnTzn cXxVOuL208rThnbGHCJYalTQXS1R8Pp5Ll1r2zl9+6f9wPiuw7VxtkReUXpGmzg9fQ 05+C6BwXSdgHrh8mNWhvgMC7RaXn2fPihP6MRQ52QRpfOPHYl21b10B/eBGRm5RfGE sIv7TFs7yR0K04zVXebQjfu76KvMh4d+q2KX+B8NuktGdK98j3NNm1FWNc3xho721l foIiJryaFhtfw== Received: by pali.im (Postfix) id 2C3AB7F8; Tue, 1 Nov 2022 23:19:09 +0100 (CET) Date: Tue, 1 Nov 2022 23:19:09 +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] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary Message-ID: <20221101221909.3u5ateevc7ka2ysv@pali> References: <20220820123327.20551-1-pali@kernel.org> <20221009110808.agfixtgneshui47o@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221009110808.agfixtgneshui47o@pali> User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-8.2 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! I would like to remind this patch. On Sunday 09 October 2022 13:08:08 Pali Rohár wrote: > Hello! Any opinion on this patch? > > On Saturday 20 August 2022 14:33:27 Pali Rohár wrote: > > If there's no PCI host bridge with ISA then check for PCI host bridge with > > alias "pci0" (first PCI host bridge) and if it exists then choose it as the > > primary PCI host bridge. > > > > This makes choice of primary PCI host bridge more stable across boots and > > updates as the last fallback candidate for primary PCI host bridge (if > > there is no choice) is selected arbitrary. > > > > Signed-off-by: Pali Rohár > > --- > > arch/powerpc/sysdev/fsl_pci.c | 13 +++++++++++++ > > 1 file changed, 13 insertions(+) > > > > diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c > > index 1011cfea2e32..e4b703943dd3 100644 > > --- a/arch/powerpc/sysdev/fsl_pci.c > > +++ b/arch/powerpc/sysdev/fsl_pci.c > > @@ -1125,6 +1125,19 @@ void __init fsl_pci_assign_primary(void) > > return; > > } > > > > + /* > > + * If there's no PCI host bridge with ISA then check for > > + * PCI host bridge with alias "pci0" (first PCI host bridge). > > + */ > > + np = of_find_node_by_path("pci0"); > > + if (np && of_match_node(pci_ids, np) && of_device_is_available(np)) { > > + fsl_pci_primary = np; > > + of_node_put(np); > > + return; > > + } > > + if (np) > > + of_node_put(np); > > + > > /* > > * If there's no PCI host bridge with ISA, arbitrarily > > * designate one as primary. This can go away once > > -- > > 2.20.1 > >