Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62a08c5a authored by Yinghai Lu's avatar Yinghai Lu Committed by Bjorn Helgaas
Browse files

PCI/ACPI: Assign unassigned resource for hot-added root bus



After we get hot-added IOAPIC registered.
pci_enable_bridges() will try to enable IOAPIC IRQ for PCI bridges.

Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e164f658
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -644,12 +644,19 @@ static int acpi_pci_root_start(struct acpi_device *device)
	struct acpi_pci_root *root = acpi_driver_data(device);
	struct acpi_pci_root *root = acpi_driver_data(device);
	struct acpi_pci_driver *driver;
	struct acpi_pci_driver *driver;


	if (system_state != SYSTEM_BOOTING)
		pci_assign_unassigned_bus_resources(root->bus);

	mutex_lock(&acpi_pci_root_lock);
	mutex_lock(&acpi_pci_root_lock);
	list_for_each_entry(driver, &acpi_pci_drivers, node)
	list_for_each_entry(driver, &acpi_pci_drivers, node)
		if (driver->add)
		if (driver->add)
			driver->add(root);
			driver->add(root);
	mutex_unlock(&acpi_pci_root_lock);
	mutex_unlock(&acpi_pci_root_lock);


	/* need to after hot-added ioapic is registered */
	if (system_state != SYSTEM_BOOTING)
		pci_enable_bridges(root->bus);

	pci_bus_add_devices(root->bus);
	pci_bus_add_devices(root->bus);


	return 0;
	return 0;