提交 23186279 编写于 作者: S Satoru Takeuchi 提交者: Greg Kroah-Hartman

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: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: NMUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: NSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 d5cdb672
......@@ -55,12 +55,19 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
list_for_each_entry(dev, &bus->devices, bus_list) {
u16 class = dev->class >> 8;
/* Don't touch classless devices or host bridges or ioapics. */
/* Don't touch classless devices or host bridges. */
if (class == PCI_CLASS_NOT_DEFINED ||
class == PCI_CLASS_BRIDGE_HOST ||
class == PCI_CLASS_SYSTEM_PIC)
class == PCI_CLASS_BRIDGE_HOST)
continue;
/* Don't touch ioapics if it has the assigned resources. */
if (class == PCI_CLASS_SYSTEM_PIC) {
res = &dev->resource[0];
if (res[0].start || res[1].start || res[2].start ||
res[3].start || res[4].start || res[5].start)
continue;
}
pdev_sort_resources(dev, &head);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册