Skip to contentSkip to conversation

Hotplug PCI bridges

DISCUSSION Matthew Wilcox 3 participants 4 messages Mar 23, 2003 – Mar 24, 2003 2 messages not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

I just updated my ia64 tree to ACPI-20030321 and it no longer allows multiple drivers to claim the same device. Which is the right thing, obviously, but it breaks PCI hotplug since we now have two drivers which want to claim the same devices (pci_root.c and acpiphp).

So.. how to fix? Well, it depends. Right now we have a half-arsed belief that PCI root bridges can go away. Either we need to stop believing it or believe it properly.

If we disbelieve it, we can remove the acpi_pci_root_remove() function, and return an error code from acpi_pci_root_add() so we don't claim it.

If we believe it, we need to have some mechanism for having two drivers for one device [1]. This doesn't need to be a generic mechanism; it's fairly clear that acpiphp is a `subdriver' of pci_root and will always be initialised after it.

I'm currently favouring an acpi_pci_{,un}register_driver() interface with add and remove callbacks, since it's the least amount of code change without disbelieving pci root bridge removal. If the collected wisdom is that PCI root busses never _really_ go away, then I'm happy to just return an error code from acpi_pci_root_add().

[1] We can't do this all with one driver. The PCI hotplug core doesn't get initialised until much later. Maybe that's a bug, but it's certainly too late to fix it in 2.4. Maybe we could fix that in 2.5?

Signature · 10 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

A message that is not in the archive (sent off-list or not yet received): 20030323155122.GE31008-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/[email protected]

#2 lore raw
Quoted 3 lines · Matthew Wilcox

I just updated my ia64 tree to ACPI-20030321 and it no longer allows multiple drivers to claim the same device. Which is the right thing, obviously, but it breaks PCI hotplug since we now have two drivers which

There are multiple cases it is not the right thing. Right now we have helper drivers for the tricky cases (serial/parallel combinations, some audio+joystick). I'm not convinced by the current approach as opposed to being able to claim a pci device shared (even shared by key to avoid accidents)

-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

#3 lore raw
In reply to a message not in the archive

Hi Matthew,

From: Matthew Wilcox <[email protected]>
Subject: [ACPI] Hotplug PCI bridges
Date: Sun, 23 Mar 2003 15:51:22 +0000
Message-ID: <20030323155122.GE31008-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/[email protected]>

Quoted 3 lines

So.. how to fix? Well, it depends. Right now we have a half-arsed belief that PCI root bridges can go away. Either we need to stop believing it or believe it properly.

Yes, they can.

Quoted 4 lines

If we believe it, we need to have some mechanism for having two drivers for one device [1]. This doesn't need to be a generic mechanism; it's fairly clear that acpiphp is a `subdriver' of pci_root and will always be initialised after it.

For 2.4, there is no acpi_bus_register_driver in the stock kernel and we have luckily avoided the problem...

Quoted 3 lines

I'm currently favouring an acpi_pci_{,un}register_driver() interface with add and remove callbacks, since it's the least amount of code change without disbelieving pci root bridge removal.

I have no objection for going for it.

(But for 2.4... Andy, have you got any response from Marcelo for inclusion of the latest?)

Thanks,
---
Takayoshi Kochi <[email protected]>

-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

A message that is not in the archive (sent off-list or not yet received): 20030324.145806.74724782.kochi-PTg2hmCz6mgYz5ZhgtY7qeqrae++aQT8@public.gmane.org

#5 lore raw
Quoted 5 lines · Takayoshi Kochi
Quoted 3 lines

So.. how to fix? Well, it depends. Right now we have a half-arsed belief that PCI root bridges can go away. Either we need to stop believing it or believe it properly.

Yes, they can.

OK. In that case the existing code was broken as there was no way for the acpiphp driver to be informed when the root bridge was removed.

Quoted 7 lines
Quoted 4 lines

If we believe it, we need to have some mechanism for having two drivers for one device [1]. This doesn't need to be a generic mechanism; it's fairly clear that acpiphp is a `subdriver' of pci_root and will always be initialised after it.

For 2.4, there is no acpi_bus_register_driver in the stock kernel and we have luckily avoided the problem...

Well, yeah. But I need the GPE Block support in the latest version of ACPI, so I have to upgrade my ACPI CA.

Quoted 5 lines
Quoted 3 lines

I'm currently favouring an acpi_pci_{,un}register_driver() interface with add and remove callbacks, since it's the least amount of code change without disbelieving pci root bridge removal.

I have no objection for going for it.

OK. Will implement today.

Signature · 9 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf