From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Helgaas Subject: Re: [PATCH 05/21] resource: adjust_resource handle resource without parent Date: Fri, 18 May 2012 12:06:42 -0600 Message-ID: References: <1336422606-4244-1-git-send-email-yinghai@kernel.org> <1336422606-4244-6-git-send-email-yinghai@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-pci-owner@vger.kernel.org To: Yinghai Lu Cc: Benjamin Herrenschmidt , Tony Luck , David Miller , x86 , Dominik Brodowski , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org List-Id: linux-arch.vger.kernel.org On Fri, May 18, 2012 at 11:54 AM, Yinghai Lu wrote= : > On Fri, May 18, 2012 at 10:12 AM, Bjorn Helgaas = wrote: >> On Mon, May 7, 2012 at 2:29 PM, Yinghai Lu wrot= e: > >> Where does this case occur? =A0When do you need to adjust a resource >> that has no parent? > > for unassigned pci bridge from BIOS, before scan busn_res.end is 0xff= , > so you can not insert them, because the bridge could in the middle. > Have to update the busn_res.end and insert after the bridge is scanne= d Does the resource have children in this case? If it has no parent, it's not in the resource tree at all, is it? Is there any reason to use adjust_resource() rather than just updating res->start and res->end directly? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]:35997 "EHLO mail-lpp01m010-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758621Ab2ERSHE convert rfc822-to-8bit (ORCPT ); Fri, 18 May 2012 14:07:04 -0400 Received: by lahd3 with SMTP id d3so2274033lah.19 for ; Fri, 18 May 2012 11:07:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1336422606-4244-1-git-send-email-yinghai@kernel.org> <1336422606-4244-6-git-send-email-yinghai@kernel.org> From: Bjorn Helgaas Date: Fri, 18 May 2012 12:06:42 -0600 Message-ID: Subject: Re: [PATCH 05/21] resource: adjust_resource handle resource without parent Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yinghai Lu Cc: Benjamin Herrenschmidt , Tony Luck , David Miller , x86 , Dominik Brodowski , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Message-ID: <20120518180642.EXZyG_Tys9N1AsLLfkK51R6DsVYxn08B-FMm7d-K7wA@z> On Fri, May 18, 2012 at 11:54 AM, Yinghai Lu wrote: > On Fri, May 18, 2012 at 10:12 AM, Bjorn Helgaas wrote: >> On Mon, May 7, 2012 at 2:29 PM, Yinghai Lu wrote: > >> Where does this case occur?  When do you need to adjust a resource >> that has no parent? > > for unassigned pci bridge from BIOS, before scan busn_res.end is 0xff, > so you can not insert them, because the bridge could in the middle. > Have to update the busn_res.end and insert after the bridge is scanned Does the resource have children in this case? If it has no parent, it's not in the resource tree at all, is it? Is there any reason to use adjust_resource() rather than just updating res->start and res->end directly?