lkml.org 
[lkml]   [2007]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] PPC pci_32: Stop using old hotplug unsafe APIs
pci_find_slot isn't hot-plug safe. Move this code to the pci hotplug safe equivalent and hold a refcount
properly while doinmg make_one_node_map.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.21-rc6-mm1/arch/powerpc/kernel/pci_32.c linux-2.6.21-rc6-mm1/arch/powerpc/kernel/pci_32.c
--- linux.vanilla-2.6.21-rc6-mm1/arch/powerpc/kernel/pci_32.c 2007-04-12 14:14:43.000000000 +0100
+++ linux-2.6.21-rc6-mm1/arch/powerpc/kernel/pci_32.c 2007-04-23 12:20:22.007864440 +0100
@@ -656,10 +656,13 @@
reg = get_property(node, "reg", NULL);
if (!reg)
continue;
- dev = pci_find_slot(pci_bus, ((reg[0] >> 8) & 0xff));
- if (!dev || !dev->subordinate)
+ dev = pci_get_bus_and_slot(pci_bus, ((reg[0] >> 8) & 0xff));
+ if (!dev || !dev->subordinate) {
+ pci_dev_put(dev);
continue;
+ }
make_one_node_map(node, dev->subordinate->number);
+ pci_dev_put(dev);
}
}

-
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/
\
 
 \ /
  Last update: 2007-04-23 15:47    [W:0.128 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site