Messages in this thread | | | Date | Tue, 5 Nov 2002 16:01:42 +0300 | From | Ivan Kokshaysky <> | Subject | Re: Patch: 2.5.45 PCI Fixups for PCI HotPlug |
| |
On Mon, Nov 04, 2002 at 12:29:37PM -0800, Adam J. Richter wrote: > What are you advocating? Do you want all quirk routines > marked __devinit? Wouldn't you agree at least that if we can > establish that device *cannot* be hot plugged, that its quirk routine > can be __init?
You cannot mark individual quirk routines differently as long as they belong in the same quirk list. If the list is __devinitdata and some of routines in it are __init, you'll have an oops in the hotplug path.
What we need is an additional quirk list, say, "hotplug_pci_fixups" and a global flag "init_gone" (probably free_initmem() should set it). Then we'll have
void pci_fixup_device(int pass, struct pci_dev *dev) { - pci_do_fixups(dev, pass, pcibios_fixups); - pci_do_fixups(dev, pass, pci_fixups); + if (!init_gone) { + pci_do_fixups(dev, pass, pcibios_fixups); + pci_do_fixups(dev, pass, pci_fixups); + } + pci_do_fixups(dev, pass, hotplug_pci_fixups); }
Perhaps arch specific "hotplug_pcibios_fixups" is also needed, as archs may work around the same pci bug differently.
What should go into the new list is another story. Obviously the fixups for host bridges must be __init, as well as some south bridges that look like pci devices but actually aren't.
Ivan. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |