Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5390970d authored by Mark Goodwin's avatar Mark Goodwin Committed by Tony Luck
Browse files

[IA64] - SGI SN hwperf enhancements -



Update the SN pci device info to use the nearest node function
to allocate driver memory on the nearest node (rather than
defaulting to node 0).

Signed-off-by: default avatarMark Goodwin <markgw@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 60a3ba0b
Loading
Loading
Loading
Loading
+14 −6
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
#include <asm/sn/pcibus_provider_defs.h>
#include <asm/sn/pcibus_provider_defs.h>
#include <asm/sn/pcidev.h>
#include <asm/sn/pcidev.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/sn2/sn_hwperf.h>
#include "xtalk/xwidgetdev.h"
#include "xtalk/xwidgetdev.h"
#include "xtalk/hubdev.h"
#include "xtalk/hubdev.h"


@@ -88,6 +89,7 @@ void *
pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *controller)
pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *controller)
{
{
	int nasid, cnode, j;
	int nasid, cnode, j;
	cnodeid_t near_cnode;
	struct hubdev_info *hubdev_info;
	struct hubdev_info *hubdev_info;
	struct pcibus_info *soft;
	struct pcibus_info *soft;
	struct sn_flush_device_list *sn_flush_device_list;
	struct sn_flush_device_list *sn_flush_device_list;
@@ -161,12 +163,18 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
	memset(soft->pbi_int_ate_resource.ate, 0,
	memset(soft->pbi_int_ate_resource.ate, 0,
 	       (soft->pbi_int_ate_size * sizeof(uint64_t)));
 	       (soft->pbi_int_ate_size * sizeof(uint64_t)));


	if (prom_bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP)
	if (prom_bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) {
		/*
		/* TIO PCI Bridge: find nearest node with CPUs */
		 * TIO PCI Bridge with no closest node information.
		int e = sn_hwperf_get_nearest_node(cnode, NULL, &near_cnode);
		 * FIXME: Find another way to determine the closest node

		 */
		if (e < 0) {
		controller->node = -1;
			near_cnode = (cnodeid_t)-1; /* use any node */
			printk(KERN_WARNING "pcibr_bus_fixup: failed to find "
				"near node with CPUs to TIO node %d, err=%d\n",
				cnode, e);
		}
		controller->node = near_cnode;
	}
	else
	else
		controller->node = cnode;
		controller->node = cnode;
	return soft;
	return soft;