diff options
author | Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> | 2006-09-12 13:21:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-26 20:43:54 -0400 |
commit | 23186279658cea6d42a050400d3e79c56cb459b4 (patch) | |
tree | 6ee58000baed3cd34af6a47f49f0d6107c3bdf2d | |
parent | d5cdb67236dba94496de052c9f9f431e1fc658f4 (diff) |
PCI: assign ioapic resource at hotplug
We need to assign resources to ioapics being hot-added. This patch
changes pbus_assign_resources_sorted() to assign resources if the
ioapic has no assigned resources.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/pci/setup-bus.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 47c1071ad84e..54404917be9a 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -55,12 +55,19 @@ pbus_assign_resources_sorted(struct pci_bus *bus) | |||
55 | list_for_each_entry(dev, &bus->devices, bus_list) { | 55 | list_for_each_entry(dev, &bus->devices, bus_list) { |
56 | u16 class = dev->class >> 8; | 56 | u16 class = dev->class >> 8; |
57 | 57 | ||
58 | /* Don't touch classless devices or host bridges or ioapics. */ | 58 | /* Don't touch classless devices or host bridges. */ |
59 | if (class == PCI_CLASS_NOT_DEFINED || | 59 | if (class == PCI_CLASS_NOT_DEFINED || |
60 | class == PCI_CLASS_BRIDGE_HOST || | 60 | class == PCI_CLASS_BRIDGE_HOST) |
61 | class == PCI_CLASS_SYSTEM_PIC) | ||
62 | continue; | 61 | continue; |
63 | 62 | ||
63 | /* Don't touch ioapics if it has the assigned resources. */ | ||
64 | if (class == PCI_CLASS_SYSTEM_PIC) { | ||
65 | res = &dev->resource[0]; | ||
66 | if (res[0].start || res[1].start || res[2].start || | ||
67 | res[3].start || res[4].start || res[5].start) | ||
68 | continue; | ||
69 | } | ||
70 | |||
64 | pdev_sort_resources(dev, &head); | 71 | pdev_sort_resources(dev, &head); |
65 | } | 72 | } |
66 | 73 | ||