Message ID | 20200821035420.380495-15-robh@kernel.org |
---|---|
State | Accepted |
Commit | 6e8e104d21962177b26149643e66a8af0099734c |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:d4c:0:0:0:0 with SMTP id h12csp4712ilj; Thu, 20 Aug 2020 20:55:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjyugMB8BdlAi0tWvG/PEiDhPUjZtiIZEefiy5JbkGL71PsOKORUJSQQAUDmu7DL+cFcRJ X-Received: by 2002:a17:906:c8d2:: with SMTP id gc18mr1145558ejb.24.1597982129860; Thu, 20 Aug 2020 20:55:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597982129; cv=none; d=google.com; s=arc-20160816; b=lIk41HkHLMsk3LWEOY9SnqQ/f1bpoaKnkfBnMXPEcBVUWtmuiS1OOBiGa4rj8Xhj8P xJsA7kXrpGz+iQYbFjm3dZr9B2XnC0lAIzRn9oU/60P9NJCkQOEL49CnueCtRkWjkWA5 y3vKZG5OqI9FMtlIns4ovDmhP57e6QnXGCBYbZSkTgGsPMJqMHTv1ZTGS+S7V89sOHGG Q4D+/iob/+Ifj6nwb8zojkea/q92kvJjfKm1TqP23F77r76fpBjtUh85nIfc38lKP+is W8Lbkb1S/V6hTBWr68otOaEEoaCf4wdcFNaFY9PoQHWmVjdCL/KpfN2WAfZEfdNzZlbw auMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OdbUqaHlOxpNwKxtKQG+iMJdH7wgWqKuZeq7kbv/krA=; b=S34ESWEAsKvTHd7uK3Yngu06Hs3lqJcTrrgctFythMOwGD7KXw7jCOofsCm86P1AYr tJkLI7D30dVhRitzSG7rGQI4+6S/s0DWAQA86UCSVz9t606TAYU6A+dL//d+Bxk2hjAT GodVEYoLe93p/uyfZrMHLmGCFsCxC85lwGxF2AWyyPDhg0BkklmFYhrLfS1waWCL3dEf WQdJhcHgc4Iq7Vmd/Q8hhWx0YmRdeUxIutOqlWr0PSxU+gbndDVErxEPZQPTJfaq4IeN RtR86elVf34EzcLf1B2cAk2z5BfSPSlGVxlXrbbC59HNn81a6ZuSzKDkudwuPkLdXhcX Z6Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: <linux-arm-msm-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq18si368562ejb.460.2020.08.20.20.55.29; Thu, 20 Aug 2020 20:55:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1727936AbgHUDz1 (ORCPT <rfc822;patch@linaro.org> + 15 others); Thu, 20 Aug 2020 23:55:27 -0400 Received: from mail-il1-f193.google.com ([209.85.166.193]:42910 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727891AbgHUDzX (ORCPT <rfc822;linux-arm-msm@vger.kernel.org>); Thu, 20 Aug 2020 23:55:23 -0400 Received: by mail-il1-f193.google.com with SMTP id t13so325099ile.9; Thu, 20 Aug 2020 20:55:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OdbUqaHlOxpNwKxtKQG+iMJdH7wgWqKuZeq7kbv/krA=; b=kmV2xK/BLLTPhH15I9jfXaPiyJmB00p1SW+FQs57LskvZ7TnwJ/p2FPIl1YxBnuVFJ hHqKcrIetHIo7XJHR49cMin2PAB5KFMlsY4j4JZhilvrbVQZpymDynEU7PQ8Kb3LzY3j A551rOshu7FlkKdH++7SLNaBQ/sXzp13h4LVt7LRMHte+T2AMi68n8gP2dcGOFAcEJcE AmZuYA9LKbSLecdmVQkET+Y6ZiKA0XuDLjCm9IauDy7gSg3uQR5udTZ6sx0DE8LxggnG HY3nRwklzQWoD9JdN9K1ZmxDyInoo/+wg7CeIqGk5KQbwdMWzGqv9htxt6N6mkYfvpVJ bQpA== X-Gm-Message-State: AOAM532MwvaKziVSdgroWY7TAt/rlbVr48mo/OFNr7GT/ABKOqZv/jfd rkUGA+Kkql2inzE4yw+iaw== X-Received: by 2002:a92:ad12:: with SMTP id w18mr941662ilh.218.1597982121701; Thu, 20 Aug 2020 20:55:21 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.249]) by smtp.googlemail.com with ESMTPSA id 79sm413923ilc.9.2020.08.20.20.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 20:55:21 -0700 (PDT) From: Rob Herring <robh@kernel.org> To: Bjorn Helgaas <bhelgaas@google.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: linux-pci@vger.kernel.org, Andy Gross <agross@kernel.org>, Binghui Wang <wangbinghui@hisilicon.com>, Bjorn Andersson <bjorn.andersson@linaro.org>, Dilip Kota <eswara.kota@linux.intel.com>, Fabio Estevam <festevam@gmail.com>, Gustavo Pimentel <gustavo.pimentel@synopsys.com>, Jerome Brunet <jbrunet@baylibre.com>, Jesper Nilsson <jesper.nilsson@axis.com>, Jingoo Han <jingoohan1@gmail.com>, Jonathan Chocron <jonnyc@amazon.com>, Jonathan Hunter <jonathanh@nvidia.com>, Kevin Hilman <khilman@baylibre.com>, Kishon Vijay Abraham I <kishon@ti.com>, Krzysztof Kozlowski <krzk@kernel.org>, Kukjin Kim <kgene@kernel.org>, Kunihiko Hayashi <hayashi.kunihiko@socionext.com>, Lucas Stach <l.stach@pengutronix.de>, Martin Blumenstingl <martin.blumenstingl@googlemail.com>, Masahiro Yamada <yamada.masahiro@socionext.com>, Murali Karicheri <m-karicheri2@ti.com>, Neil Armstrong <narmstrong@baylibre.com>, NXP Linux Team <linux-imx@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Pratyush Anand <pratyush.anand@gmail.com>, Richard Zhu <hongxing.zhu@nxp.com>, Sascha Hauer <s.hauer@pengutronix.de>, Shawn Guo <shawnguo@kernel.org>, Shawn Guo <shawn.guo@linaro.org>, Stanimir Varbanov <svarbanov@mm-sol.com>, Thierry Reding <thierry.reding@gmail.com>, Xiaowei Song <songxiaowei@hisilicon.com>, Yue Wang <yue.wang@Amlogic.com>, Marc Zyngier <maz@kernel.org>, linux-amlogic@lists.infradead.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v2 14/40] PCI: Also call .add_bus() callback for root bus Date: Thu, 20 Aug 2020 21:53:54 -0600 Message-Id: <20200821035420.380495-15-robh@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200821035420.380495-1-robh@kernel.org> References: <20200821035420.380495-1-robh@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: <linux-arm-msm.vger.kernel.org> X-Mailing-List: linux-arm-msm@vger.kernel.org |
Series |
[v2,01/40] PCI: Allow root and child buses to have different pci_ops
|
expand
|
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 0c9ebc72532e..d8bf3fe8dacd 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -941,6 +941,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); + } + /* Create legacy_io and legacy_mem files for this bus */ pci_create_legacy_files(bus);
Similar to pcibios_add_bus(), call pci_ops.add_bus() when the root bus is added. This allows host bridge drivers to do any setup requiring a bus pointer. There are currently no .add_bus() callbacks, so this is safe to do. Cc: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Rob Herring <robh@kernel.org> --- drivers/pci/probe.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.25.1