Re: [PATCH] pcibus_to_node implementation for IA64

From: Alex Williamson <alex.williamson_at_hp.com>
Date: 2005-06-24 07:33:28
On Thu, 2005-06-23 at 14:19 -0700, Christoph Lameter wrote:
> On Thu, 23 Jun 2005, Alex Williamson wrote:
> 
> >    This will work, but there's no reason to hide this in the platform
> > specific code.  The PCI root bridges are in ACPI namespace, a
> > pxm_to_node() lookup should be done there when the buses are discovered.
> > Then it would work on HP and DIG boxes.  Thanks,
> 
> Could you do that? We only provide minimal ACPI support which does not 
> include pci. For our needs this will not work.

   I believe the below (untested) will work.  I'll try to test it on a
box.  Thanks,

	Alex

-- 
Alex Williamson                             HP Linux & Open Source Lab


diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -306,6 +306,7 @@ pci_acpi_scan_root(struct acpi_device *d
 	unsigned int windows = 0;
 	struct pci_bus *pbus;
 	char *name;
+	int pxm;
 
 	controller = alloc_pci_controller(domain);
 	if (!controller)
@@ -313,6 +314,10 @@ pci_acpi_scan_root(struct acpi_device *d
 
 	controller->acpi_handle = device->handle;
 
+	pxm = acpi_get_pxm(controller->acpi_handle);
+	if (pxm >= 0)
+		controller->node = pxm_to_nid_map[pxm];
+
 	acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window,
 			&windows);
 	controller->window = kmalloc(sizeof(*controller->window) * windows,


-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Jun 23 17:39:20 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:39 EST