From patchwork Mon Sep 29 14:29:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 38073 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EFBD8201F1 for ; Mon, 29 Sep 2014 14:31:31 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id l18sf1321649wgh.2 for ; Mon, 29 Sep 2014 07:31:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=9dFODmCN1LmBLQTmIdNO81FUwTjqKNwrrnzFNq5xO34=; b=Z83tjNdJmxX0cotz/cpCRibsYneJROu/a0ENtHBF56VK1XBABSMiSfTJY8N7aFyYwU 5bZBvdiaYgZVWiLiP4nk87tGv1u+MJsi1Jn1ZzsJqezMEKXJNRkeiyoC3x0JA+cjL0Fa YOyoDRIjPje86P2OeaaBtdo3OA3ix4SON3Y++IuBfJ9Dqaw4UKmnFpUNWqpbBTHEU7Lm 6+S0KAq30pHhsCuws8UjGSSaixDBfFn4UkgCQIae1UbFNtpq8VeuNIl0lc3xN4FAmfkt 6BXg9WQaFd2ZhXuDMHFAD1GAn7bgQIUAjlzcKT0Y+W0HkMsXdijiZTgYk0CXUs26pK+p c5fg== X-Gm-Message-State: ALoCoQmtSbKCeyO9jsKc1d2eLwid1RhY/ekU+L0ChagoL5pemxAs6z/lRrKJnGhzoxNt5mDvcdxn X-Received: by 10.194.249.134 with SMTP id yu6mr963967wjc.1.1412001091068; Mon, 29 Sep 2014 07:31:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.169 with SMTP id s9ls532807laa.47.gmail; Mon, 29 Sep 2014 07:31:30 -0700 (PDT) X-Received: by 10.112.161.70 with SMTP id xq6mr38255350lbb.49.1412001090881; Mon, 29 Sep 2014 07:31:30 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx.google.com with ESMTPS id j15si18602814lbg.30.2014.09.29.07.31.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Sep 2014 07:31:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id 10so16350744lbg.32 for ; Mon, 29 Sep 2014 07:31:30 -0700 (PDT) X-Received: by 10.112.4.33 with SMTP id h1mr37001256lbh.67.1412001090477; Mon, 29 Sep 2014 07:31:30 -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 of9csp184322lbb; Mon, 29 Sep 2014 07:31:29 -0700 (PDT) X-Received: by 10.66.220.40 with SMTP id pt8mr59642494pac.108.1412001087424; Mon, 29 Sep 2014 07:31:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id aw6si23084586pbd.206.2014.09.29.07.31.26 for ; Mon, 29 Sep 2014 07:31:27 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754470AbaI2ObU (ORCPT + 27 others); Mon, 29 Sep 2014 10:31:20 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21]:50536 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752540AbaI2ObK (ORCPT ); Mon, 29 Sep 2014 10:31:10 -0400 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 s8TETVYL004719; Mon, 29 Sep 2014 15:29:35 +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 Cc: Tanmay Inamdar , Grant Likely , Sinan Kaya , Jingoo Han , Kukjin Kim , Suravee Suthikulanit , linux-arch , LKML , Device Tree ML , LAKML , Yinghai Lu , Jiang Liu Subject: [PATCH v13 10/12] PCI: Assign unassigned bus resources in pci_scan_root_bus() Date: Mon, 29 Sep 2014 15:29:29 +0100 Message-Id: <1412000971-9242-11-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1412000971-9242-1-git-send-email-Liviu.Dudau@arm.com> References: <1412000971-9242-1-git-send-email-Liviu.Dudau@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.217.173 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If the firmware has not assigned all the bus resources and we are not just probing the PCI buses, it makes sense to assign the unassigned resources in pci_scan_root_bus(). Signed-off-by: Liviu Dudau Signed-off-by: Bjorn Helgaas CC: Arnd Bergmann CC: Jason Gunthorpe CC: Rob Herring --- drivers/pci/probe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 636d1c9..d2ebd49 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1951,6 +1951,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; }