From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20A4BC43613 for ; Thu, 20 Jun 2019 17:14:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB9B12082C for ; Thu, 20 Jun 2019 17:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726675AbfFTROC (ORCPT ); Thu, 20 Jun 2019 13:14:02 -0400 Received: from foss.arm.com ([217.140.110.172]:50132 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbfFTROC (ORCPT ); Thu, 20 Jun 2019 13:14:02 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 67619360; Thu, 20 Jun 2019 10:14:01 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (unknown [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 485713F246; Thu, 20 Jun 2019 10:14:00 -0700 (PDT) Date: Thu, 20 Jun 2019 18:13:57 +0100 From: Lorenzo Pieralisi To: Benjamin Herrenschmidt Cc: linux-pci@vger.kernel.org, Bjorn Helgaas , Ard Biesheuvel , Sinan Kaya , Ali Saidi , Zeev Zilberman , linux-arm-kernel Subject: Re: [PATCH 1/4] arm64: pci: acpi: Use pci_assign_unassigned_root_bus_resources() Message-ID: <20190620171357.GD18771@e121166-lin.cambridge.arm.com> References: <20190615002359.29577-1-benh@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190615002359.29577-1-benh@kernel.crashing.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sat, Jun 15, 2019 at 10:23:56AM +1000, Benjamin Herrenschmidt wrote: > Instead of the simpler > > pci_bus_size_bridges(bus); > pci_bus_assign_resources(bus); > > Use pci_assign_unassigned_root_bus_resources(). This should have no effect > as long as we are reassigning everything. Once we start honoring FW > resource allocations, this will bring up the "reallocation" feature > which can help making room for SR-IOV when necessary. I would like to add more details on why we want to make this change, I will update the log when we merge it, it is a bit too late for v5.3, even if in theory no functional change is intended. > Signed-off-by: Benjamin Herrenschmidt > --- > arch/arm64/kernel/pci.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c > index bb85e2f4603f..1419b1b4e9b9 100644 > --- a/arch/arm64/kernel/pci.c > +++ b/arch/arm64/kernel/pci.c > @@ -193,8 +193,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) > if (!bus) > return NULL; > > - pci_bus_size_bridges(bus); > - pci_bus_assign_resources(bus); > + pci_assign_unassigned_root_bus_resources(bus); These hunks should be identical, minus the additional resource size handling and realloc policy (which are *missing* features in current code). We must document this change in the log. Acked-by: Lorenzo Pieralisi > list_for_each_entry(child, &bus->children, node) > pcie_bus_configure_settings(child); > -- > 2.17.1 >