aboutsummaryrefslogtreecommitdiff
path: root/arch/ia64/sn/pci/tioca_provider.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2005-07-12 16:03:00 -0700
committerTony Luck <tony.luck@intel.com>2005-07-12 16:12:55 -0700
commit7c2a6c62c013a4ea57243536fc7f3987e4ba04bc (patch)
tree02e3e1d9888f81110ba85bef531e5c695f6064ce /arch/ia64/sn/pci/tioca_provider.c
parent08357f82d4decc48bbfd39ae30d5fe0754f7f576 (diff)
[IA64] Altix pcibus_to_node implementation
The Altix subarch does not provide node information via ACPI. Instead hooks are used to fixup pci structures. This patch determines the nodes for Altix PCI busses. Remote Bridges: --------------- Altix supports remote I/O nodes without memory or processors but with bridges. The TIOCA type of bridge is an AGP bridge and the PROM provides information about the closest node. That information will be returned by pcibus_to_node. The TIOCP remote bridge type is a PCI bridge but the PROM does not provide a closest node id. pcibus_to_node will return -1 for devices on those bridges meaning that device control structures may be allocated on any node. Safeguard: ---------- Should the fixups result in invalid node information for a pci controller then a warning will be printed and pcibus_to_node will return -1. This patch also fixes the "FIXME" in sn_dma_alloc_coherent. This means that dma_alloc_coherent will now use alloc_pages_node to allocate memory local to the node that the PCI device is connected to. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/sn/pci/tioca_provider.c')
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index 51cc4e63092..5d76a758146 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -581,7 +581,7 @@ tioca_error_intr_handler(int irq, void *arg, struct pt_regs *pt)
* the caller.
*/
static void *
-tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft)
+tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *controller)
{
struct tioca_common *tioca_common;
struct tioca_kernel *tioca_kern;
@@ -646,6 +646,8 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft)
__FUNCTION__, SGI_TIOCA_ERROR,
(int)tioca_common->ca_common.bs_persist_busnum);
+ /* Setup locality information */
+ controller->node = tioca_kern->ca_closest_node;
return tioca_common;
}