Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp980941imp; Thu, 21 Feb 2019 15:37:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IZq/RJnRKj+e4cw7rw5dae7mb6W+xGBnL7RO8zyJTt6gxn4kB40lC9+Cwdy43G3Xk5TkPo3 X-Received: by 2002:a17:902:8485:: with SMTP id c5mr1112133plo.67.1550792267040; Thu, 21 Feb 2019 15:37:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550792267; cv=none; d=google.com; s=arc-20160816; b=lPn5XHQLOMCHHg/uzCaWmevuc91edWXGZK30eqzXUku8c894mdXKReLaoj3S1Dp/+m A9rKE0aSWGfuN76X9MwnjQHSipar/69wZAdhV19g014RAKmcqiIhrGDFGVAzRxSs97f5 wOf8mh3amBayRSifPrKj1WCcu+awuQqBUhFt/GmTPdWSJ2OatZe+Igqky5JNE9A7jSGv pkzkx57wnNQoPjp+0KVDZCptxgPQAzk2NB3cahhusGnEDxMwaFIjQhi/vEWV5AYIjfT2 V0bNWkHOHcugUURgdHWxYFdqP34vGWJvVs5y13KdpwONhhTbMDRc2zuxg7SBGm/YAEUq wRtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LWtgL5T1RhAemcpJ2VueB+lKDPl0qFHRFydX6uHBIVU=; b=Rh86F39rEp0Zd1si92WWgcZwwzPJnnDNpq08b6+ibP+N3TYN2/Xr/mgHHPwPL+g3cP u5ymdq4JsrsW4XwFpky2pGMg90UUK5QjaOCi4NSeU6rWxQ3MPE02owmn04+jqYVYJ4f+ oCRt3y6YQ1lj0WV041WstSzlVs7NUe3RjMxEkx7AFuKLEn9khn7zKt4yxaD3ZG3jGzXm BoKQ8i95ngUSB45APyEo4m2Ae4fE05LxwMPSu8YcUHe+F+1/UEzjLz8uvIhjnjmhiegk z7SbrTiHrFz+6oCL7aJPs+VXBRYOT4mUhfeeMLxBUMlM5o9lNq2Jc0y+WwJ+BzB9elcN Ep+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="B5Gw36R/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b38si227914plb.11.2019.02.21.15.37.30; Thu, 21 Feb 2019 15:37:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="B5Gw36R/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726479AbfBUXhK (ORCPT + 99 others); Thu, 21 Feb 2019 18:37:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:54938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725961AbfBUXhJ (ORCPT ); Thu, 21 Feb 2019 18:37:09 -0500 Received: from localhost (unknown [104.133.8.90]) (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 2948220818; Thu, 21 Feb 2019 23:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550792229; bh=pEihKUO/K2gMKtPW1/2JoH/l70OghPbp4AK1Fp6t8RU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B5Gw36R/H7jTBcj3qWLQ13v7YjX2u1Te135TTdsQy9/6aGOb7bvEneQoFnvetFIYZ kNDjRuK2UGqjFsVCSKSScAwNVz50tE0+VJ4B29xGuHwReOsyFk4EOQFBMFC/gYCymk woX5Hodjf+iMcJvLU5G9Z7BKu++OtDgjtO/RmLR8= Date: Thu, 21 Feb 2019 17:37:08 -0600 From: Bjorn Helgaas To: Thomas Bogendoerfer Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 07/10] PCI: call add_bus method also for root bus Message-ID: <20190221233708.GC219879@google.com> References: <20190219155728.19163-1-tbogendoerfer@suse.de> <20190219155728.19163-8-tbogendoerfer@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190219155728.19163-8-tbogendoerfer@suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On Tue, Feb 19, 2019 at 04:57:21PM +0100, Thomas Bogendoerfer wrote: > pci-xtalk controller code uses the add_bus method to set node of > the bus device, which then is used for pcibus_to_node() implementation. > > Signed-off-by: Thomas Bogendoerfer > --- > drivers/pci/probe.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 257b9f6f2ebb..456448d5f46d 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -837,6 +837,12 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) > > pcibios_add_bus(bus); > > + if (bus->ops->add_bus) { > + err = bus->ops->add_bus(bus); > + if (WARN_ON(err < 0)) > + dev_err(&bus->dev, "failed to add bus: %d\n", err); > + } Is there something special about pci-xtalk that prevents it from setting the node the way other platforms do, without using the add_bus() method? I haven't researched the details of how other platforms do it, but if it would be possible for pci-xtalk to do it the same way, that would be ideal. > /* Create legacy_io and legacy_mem files for this bus */ > pci_create_legacy_files(bus); > > -- > 2.13.7 >