From: Gary Hade <garyhade@us.ibm.com>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Gary Hade <garyhade@us.ibm.com>,
jbarnes@virtuousgeek.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: boot parameter to avoid expansion ROM memory allocation
Date: Mon, 12 May 2008 15:30:05 -0700 [thread overview]
Message-ID: <20080512223005.GC7401@us.ibm.com> (raw)
In-Reply-To: <86802c440805121443r43cc7ceay4c05625f2878172e@mail.gmail.com>
On Mon, May 12, 2008 at 02:43:44PM -0700, Yinghai Lu wrote:
> On Mon, May 12, 2008 at 1:57 PM, Gary Hade <garyhade@us.ibm.com> wrote:
<snip>
> > --- linux-2.6.26-rc2/arch/x86/pci/common.c.orig 2008-05-12 10:59:58.000000000 -0700
> > +++ linux-2.6.26-rc2/arch/x86/pci/common.c 2008-05-12 11:22:05.000000000 -0700
> > @@ -121,6 +121,21 @@ void __init dmi_check_skip_isa_align(voi
> > dmi_check_system(can_skip_pciprobe_dmi_table);
> > }
> >
> > +static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
> > +{
> > + struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE];
> > +
> > + if (pci_probe & PCI_NOASSIGN_ROMS) {
> > + if (rom_r->parent)
> > + return;
> > + if (rom_r->start) {
> > + /* we deal with BIOS assigned ROM later */
> > + return;
> > + }
> > + rom_r->start = rom_r->end = rom_r->flags = 0;
> > + }
> > +}
> > +
> > /*
> > * Called after each bus is probed, but before its children
> > * are examined.
> > @@ -128,7 +143,11 @@ void __init dmi_check_skip_isa_align(voi
> >
> > void __devinit pcibios_fixup_bus(struct pci_bus *b)
> > {
> > + struct pci_dev *dev;
> > +
> > pci_read_bridge_bases(b);
> > + list_for_each_entry(dev, &b->devices, bus_list)
> > + pcibios_fixup_device_resources(dev);
> > }
>
> or put check
> + if (pci_probe & PCI_NOASSIGN_ROMS) {
>
> out of loop?
I could certainly do that but I had intended that the new
pcibios_fixup_device_resources function act as a container where
other kinds of fixups could be added later. Do you (or others)
think the additional cycles consumed by this approach are an
issue here?
Thanks,
Gary
--
Gary Hade
System x Enablement
IBM Linux Technology Center
503-578-4503 IBM T/L: 775-4503
garyhade@us.ibm.com
http://www.ibm.com/linux/ltc
next prev parent reply other threads:[~2008-05-12 22:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-12 20:57 [PATCH] PCI: boot parameter to avoid expansion ROM memory allocation Gary Hade
2008-05-12 21:43 ` Yinghai Lu
2008-05-12 22:30 ` Gary Hade [this message]
2008-05-13 17:48 ` Yinghai Lu
2008-05-13 21:00 ` Gary Hade
2008-05-13 21:11 ` Yinghai Lu
2008-05-13 21:44 ` Yinghai Lu
2008-05-13 22:28 ` Jesse Barnes
2008-05-13 23:23 ` Yinghai Lu
2008-05-14 0:07 ` Gary Hade
2008-05-14 16:20 ` Gary Hade
2008-05-14 16:58 ` [RFC] which drivers need to map ROM BARs? Jesse Barnes
2008-05-20 17:57 ` [PATCH] PCI: boot parameter to avoid expansion ROM memory allocation Jesse Barnes
2008-05-20 20:00 ` Gary Hade
2008-05-20 20:16 ` Jesse Barnes
2008-05-21 17:29 ` Gary Hade
2008-05-21 17:40 ` Jesse Barnes
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=20080512223005.GC7401@us.ibm.com \
--to=garyhade@us.ibm.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=yhlu.kernel@gmail.com \
/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.