From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C15BD2C00AB for ; Thu, 6 Jun 2013 08:38:25 +1000 (EST) Message-ID: <1370471891.3766.244.camel@pasglop> Subject: Re: [PATCH] powerpc/pci: check the bus address instead of resource address in pcibios_fixup_resources From: Benjamin Herrenschmidt To: David Laight Date: Thu, 06 Jun 2013 08:38:11 +1000 In-Reply-To: References: <1370435211-6929-1-git-send-email-haokexin@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: linuxppc , Kevin Hao List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2013-06-05 at 14:10 +0100, David Laight wrote: > > If a BAR has the value of 0, we would assume that it is unset yet and > > then mark the resource as unset and would reassign it later. > > IIRC the PCI spec allows a BAR address of zero. > Certainly some sparc systems have assigned 0 to a BAR. > So assuming a BAR of 0 means it is unset may not be > true for all systems. Yes, look at the code and the comment above :-) It tries to make a guess... which so far has worked well for us. Note that people assigning 0 to BARs are asking for trouble anyway. Cheers, Ben.