linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: RFC: Only deal with apple fix if res is memory
Date: Sat, 12 Jan 2008 09:03:35 +1100	[thread overview]
Message-ID: <1200089015.6896.56.camel@pasglop> (raw)
In-Reply-To: <Pine.LNX.4.64.0801111038380.17281@blarg.am.freescale.net>


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"

  reply	other threads:[~2008-01-11 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-11 16:38 RFC: Only deal with apple fix if res is memory Kumar Gala
2008-01-11 22:03 ` Benjamin Herrenschmidt [this message]
2008-01-12 23:05   ` Kumar Gala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1200089015.6896.56.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).