Re: [PATCH] pcibus_to_node implementation for IA64

From: Alex Williamson <alex.williamson_at_hp.com>
Date: 2005-06-24 08:53:04
On Thu, 2005-06-23 at 14:47 -0700, Christoph Lameter wrote:
> On Thu, 23 Jun 2005, Alex Williamson wrote:
> 
> >    I believe the below (untested) will work.  I'll try to test it on a
> > box.  Thanks,
> 
> Yes that is how other arches do it.

  Cool.  It works on an rx8620 here.  I forgot to wrap the generic setup
in a NUMA config.  The below chunks should replace the sba_iommu chunk
in the original patch.  Thanks,

	Alex

Signed-off-by: Alex Williamson <alex.williamson@hp.com>

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
@@ -288,6 +289,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)
@@ -295,6 +297,12 @@ pci_acpi_scan_root(struct acpi_device *d
 
 	controller->acpi_handle = device->handle;
 
+	pxm = acpi_get_pxm(controller->acpi_handle);
+#ifdef CONFIG_NUMA
+	if (pxm >= 0)
+		controller->node = pxm_to_nid_map[pxm];
+#endif
+
 	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 18:53:49 2005

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