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 ESMTP id 2C59ADDF5A for ; Sat, 12 Jan 2008 09:03:53 +1100 (EST) Subject: Re: RFC: Only deal with apple fix if res is memory From: Benjamin Herrenschmidt To: Kumar Gala In-Reply-To: References: Content-Type: text/plain Date: Sat, 12 Jan 2008 09:03:35 +1100 Message-Id: <1200089015.6896.56.camel@pasglop> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2008-01-11 at 10:38 -0600, Kumar Gala wrote: > Ben, > > Will this impact the apple fix? I'm getting some _IO cases hitting this. No, your fix is right, it's a bug to compare against pci_mem_offset and not check if it's a memory resource in the first place. I would suggest that you do the res->flags test first in the if () statement for clarity though. Cheers, Ben. > - k > > diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c > index d394d41..42a9dab 100644 > --- a/arch/powerpc/kernel/pci-common.c > +++ b/arch/powerpc/kernel/pci-common.c > @@ -807,6 +807,7 @@ static void __devinit __pcibios_fixup_bus(struct pci_bus *bus) > * their size is smaller than 1M. > */ > if (res->start == hose->pci_mem_offset && > + res->flags & IORESOURCE_MEM && > res->end < 0x100000) { > printk(KERN_INFO > "PCI: Closing bogus Apple Firmware"