From patchwork Thu Sep 18 01:30:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 37575 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DF50D2054D for ; Thu, 18 Sep 2014 01:34:13 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id d1sf160052wiv.11 for ; Wed, 17 Sep 2014 18:34:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=s4U4FVekb78kW5JvE1tE1fKctRXOJQBcNnBq4K/rlrY=; b=VtTTyzpzYNSIlX+oI54TPnlleWzsTL+Evfk427N7mji8F3ql9Dr6ncmoFxH580LTRh xSsjMwcgqsSfzxvuxezGwpjy+0LFN191jguYrddAMwG9/5bDf63VyueR9zCyJa0yRA3A ie4j51MbGyeMU3ghbAlUcc4rNrpr9B1b0NNeDs3v6KHHMkTXP9BBnjx0mNBnswIzkcd9 T8vX8wUq+5FrDjNzVSaRf7hEA9F9tD0iK9ANG2QBdlUbRb0P1ZlO5ymMMCfuA+vO4omE kecaruEqguooBABV5PjDQj4nJMMfU/vAQt4WX6/0YJ0MJkwSP1KujyB6GJjzCZ2TnwyF pmzA== X-Gm-Message-State: ALoCoQlpnjrxDmW0FB1lNtegr8FgSoTcVdIP0icbZGY3sHnvzo0gR5qVtw1/YzF6XkBioOiRIYoQ X-Received: by 10.112.188.136 with SMTP id ga8mr175633lbc.8.1411004052920; Wed, 17 Sep 2014 18:34:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.194 with SMTP id 2ls173240law.108.gmail; Wed, 17 Sep 2014 18:34:12 -0700 (PDT) X-Received: by 10.152.21.136 with SMTP id v8mr182700lae.41.1411004052656; Wed, 17 Sep 2014 18:34:12 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by mx.google.com with ESMTPS id wo3si28798189lbb.66.2014.09.17.18.34.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Sep 2014 18:34:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id gi9so201653lab.38 for ; Wed, 17 Sep 2014 18:34:12 -0700 (PDT) X-Received: by 10.112.146.103 with SMTP id tb7mr973769lbb.26.1411004052420; Wed, 17 Sep 2014 18:34:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp679740lbb; Wed, 17 Sep 2014 18:34:11 -0700 (PDT) X-Received: by 10.70.88.66 with SMTP id be2mr1390737pdb.30.1411004050883; Wed, 17 Sep 2014 18:34:10 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id co6si37390925pac.57.2014.09.17.18.34.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Sep 2014 18:34:10 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XUQaa-0002lk-I7; Thu, 18 Sep 2014 01:32:52 +0000 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21] helo=cam-smtp0.cambridge.arm.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XUQZU-0001ib-0u for linux-arm-kernel@lists.infradead.org; Thu, 18 Sep 2014 01:31:47 +0000 Received: from e106497-lin.cambridge.arm.com (e106497-lin.cambridge.arm.com [10.1.195.53]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s8I1UPlD003595; Thu, 18 Sep 2014 02:30:30 +0100 From: Liviu Dudau To: Bjorn Helgaas , Arnd Bergmann , Rob Herring , Jason Gunthorpe , Benjamin Herrenschmidt , Catalin Marinas , Will Deacon , Russell King , linux-pci , Linus Walleij Subject: [PATCH v11 09/10] PCI: Assign unassigned bus resources in pci_scan_root_bus() Date: Thu, 18 Sep 2014 02:30:24 +0100 Message-Id: <1411003825-21521-10-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411003825-21521-1-git-send-email-Liviu.Dudau@arm.com> References: <1411003825-21521-1-git-send-email-Liviu.Dudau@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140917_183144_425400_87C5BFE1 X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -3.0 (---) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-3.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [217.140.96.21 listed in list.dnswl.org] -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: linux-arch , Sinan Kaya , Kukjin Kim , Device Tree ML , Jingoo Han , LKML , Grant Likely , Tanmay Inamdar , Suravee Suthikulanit , LAKML X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: liviu.dudau@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 If the firmware has not assigned all the bus resources and we are not just probing the PCIe busses, it makes sense to assign the unassigned resources in pci_scan_root_bus(). Cc: Bjorn Helgaas Cc: Arnd Bergmann Cc: Jason Gunthorpe Cc: Rob Herring Signed-off-by: Liviu Dudau --- drivers/pci/probe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index ef891d2..508cf61 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1953,6 +1953,9 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, if (!found) pci_bus_update_busn_res_end(b, max); + if (!pci_has_flag(PCI_PROBE_ONLY)) + pci_assign_unassigned_bus_resources(b); + pci_bus_add_devices(b); return b; }