Thread (3 messages) flat view 3 messages, 3 authors, 2012-03-08

[PATCH 06/11] PCI: Keep pci_fixup_irqs() around after init

From: bhelgaas@google.com (Bjorn Helgaas)
Date: 2012-03-08 17:27:07
Also in: linux-devicetree, linux-pci, linux-tegra

On Thu, Mar 8, 2012 at 7:51 AM, Thierry Reding
[off-list ref] wrote:
quoted hunk
Signed-off-by: Thierry Reding <redacted>
---
?drivers/pci/setup-irq.c | ? ?4 ++--
?1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c
index eb219a1..270ae7b 100644
--- a/drivers/pci/setup-irq.c
+++ b/drivers/pci/setup-irq.c
@@ -18,7 +18,7 @@
?#include <linux/cache.h>


-static void __init
+static void
?pdev_fixup_irq(struct pci_dev *dev,
? ? ? ? ? ? ? u8 (*swizzle)(struct pci_dev *, u8 *),
? ? ? ? ? ? ? int (*map_irq)(const struct pci_dev *, u8, u8))
@@ -54,7 +54,7 @@ pdev_fixup_irq(struct pci_dev *dev,
? ? ? ?pcibios_update_irq(dev, irq);
?}

-void __init
+void
?pci_fixup_irqs(u8 (*swizzle)(struct pci_dev *, u8 *),
? ? ? ? ? ? ? int (*map_irq)(const struct pci_dev *, u8, u8))
?{

        struct pci_dev *dev = NULL;
        for_each_pci_dev(dev)
                pdev_fixup_irq(dev, swizzle, map_irq);
}

Hmm, your patch looks OK as far as it goes, but the implementation of
pci_fixup_irqs() as a call-once-at-boot-time thing with a loop through
all the PCI devices we've found so far looks completely broken with
regard to hotplug.

Who does the swizzle for devices hot-added after boot?

Bjorn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help