All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Greg KH <greg@kroah.com>,
	helgehaf@aitel.hist.no, Linus Torvalds <torvalds@osdl.org>
Subject: Re: Ignore disabled ROM resources at setup
Date: Tue, 30 Aug 2005 13:19:56 +1000	[thread overview]
Message-ID: <1125371996.11963.37.camel@gaston> (raw)
In-Reply-To: <1125369485.11949.27.camel@gaston>


> pci_map_rom "sees" that the resource is unassigned by testing the parent
> pointer, and calls pci_assign_resource() which, with this new patch,
> will do nothing.

Ok, it won't do nothing in fact. It's worse. It will return 0 (success),
will actually assign a completely new address to the resource, will
update the resource structure ... and will _not_ update the PCI resource
BAR for the ROM.

That is very bad and definitely not what you want, wether it's ppc, x86
or anything else. Either fail (don't assign the resource at all) or if
you assign it, keep the BAR in sync with the struct resource.

Also, why do we re-allocate a new address for it ? It's been properly
allocated a non-conflicting address by the firmware ... That's a big
problem I have with our common code as well.
pci_assign_unassigned_resource() doesn't do what it claims: it will
re-assign all resources, not only the unassigned ones, at least as soon
as it spots a brige, and pci_assign_resource() here called by
pci_map_rom() will re-assign even if the address there was already
correct.

At this point, i'm not sure what the proper fix it.

Ben.



  parent reply	other threads:[~2005-08-30  3:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200508261859.j7QIxT0I016917@hera.kernel.org>
2005-08-30  2:38 ` Ignore disabled ROM resources at setup Benjamin Herrenschmidt
2005-08-30  3:15   ` Linus Torvalds
2005-08-30  4:47     ` Jon Smirl
2005-08-30  3:19   ` Benjamin Herrenschmidt [this message]
2005-08-30  3:52     ` Linus Torvalds
2005-08-30  4:09       ` Linus Torvalds
2005-08-30  4:20         ` David S. Miller
2005-08-30  4:37           ` Benjamin Herrenschmidt
2005-08-30  4:40           ` Linus Torvalds
2005-08-30  4:49             ` Benjamin Herrenschmidt
2005-08-30  5:29               ` Linus Torvalds
2005-08-30  6:46                 ` Benjamin Herrenschmidt
2005-08-31  4:16                 ` Benjamin Herrenschmidt
2005-08-30  4:51             ` Jon Smirl
2005-08-30  4:54               ` Benjamin Herrenschmidt
2005-08-30  5:15               ` Linus Torvalds
2005-08-30 14:39                 ` Alan Cox
2005-08-30 15:29                 ` Petr Vandrovec
2005-08-30  4:33       ` Benjamin Herrenschmidt
2005-08-30  5:03         ` Linus Torvalds
2005-08-30  6:40           ` Benjamin Herrenschmidt
2005-08-30  4:35   ` Jon Smirl
2005-08-30  5:32     ` David S. Miller
2005-08-30  6:43       ` Benjamin Herrenschmidt

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=1125371996.11963.37.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=greg@kroah.com \
    --cc=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.