aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/mp_bus_to_node.c
blob: 022943999b846261f89a42aa005e6abac56c2bd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/topology.h>

#define BUS_NR 256

static unsigned char mp_bus_to_node[BUS_NR];

void set_mp_bus_to_node(int busnum, int node)
{
	if (busnum >= 0 &&  busnum < BUS_NR)
	mp_bus_to_node[busnum] = (unsigned char) node;
}

int get_mp_bus_to_node(int busnum)
{
	int node;

	if (busnum < 0 || busnum > (BUS_NR - 1))
		return 0;
	node = mp_bus_to_node[busnum];
	return node;
}