Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IA64] SGI Altix : fix bug in sn_io_late_init()

When initializing pci_controller->node to point to the closest node we need
to take into consideration that a PIC PCI Bridge ASIC can be connected to a
headless/memless node just like the TIOCP and TIOCE Bridge ASICs

Signed-off-by: Mike Habeck <habeck@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by

Mike Habeck and committed by
Tony Luck
afc2cf35 9e004ebd

+5 -6
+5 -6
arch/ia64/sn/kernel/io_common.c
··· 545 545 nasid = NASID_GET(bussoft->bs_base); 546 546 cnode = nasid_to_cnodeid(nasid); 547 547 if ((bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) || 548 - (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCE)) { 549 - /* TIO PCI Bridge: find nearest node with CPUs */ 548 + (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCE) || 549 + (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_PIC)) { 550 + /* PCI Bridge: find nearest node with CPUs */ 550 551 int e = sn_hwperf_get_nearest_node(cnode, NULL, 551 552 &near_cnode); 552 553 if (e < 0) { 553 554 near_cnode = (cnodeid_t)-1; /* use any node */ 554 - printk(KERN_WARNING "pcibr_bus_fixup: failed " 555 - "to find near node with CPUs to TIO " 555 + printk(KERN_WARNING "sn_io_late_init: failed " 556 + "to find near node with CPUs for " 556 557 "node %d, err=%d\n", cnode, e); 557 558 } 558 559 PCI_CONTROLLER(bus)->node = near_cnode; 559 - } else if (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_PIC) { 560 - PCI_CONTROLLER(bus)->node = cnode; 561 560 } 562 561 } 563 562