Skip to contentSkip to conversation

PCI/IA64: add host bridge resource release for _CRS path

PATCH In review Yijing Wang 1 participant 1 message Jun 4, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 6/8 PCI/IA64: add host bridge resource release for _CRS path

Set IA64 host bridge release function to make sure root bridge related resources get freed during root bus removal.

Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 arch/ia64/pci/pci.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
arch/ia64/pci/pci.c +10 -1
index dfb6149..4383b03 100644
@@ -368,6 +368,13 @@ static void __release_pci_root_info(struct pci_root_info *info)
 	kfree(info);
 }
 
+static void release_pci_root_info(struct pci_host_bridge *bridge)
+{
+	struct pci_root_info *info = bridge->release_data;
+
+	__release_pci_root_info(info);
+}
+
 struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
 {
 	struct acpi_device *device = root->device;
@@ -443,7 +450,9 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
 		__release_pci_root_info(info);
 		return NULL;
 	}
-
+
+	pci_set_host_bridge_release(to_pci_host_bridge(pbus->bridge),
+			release_pci_root_info, info);
 	pci_scan_child_bus(pbus);
 	return pbus;
 
Signature · 1 line
1.7.1