x86-32, NUMA: implement temporary NUMA init shims
[deliverable/linux.git] / arch / x86 / include / asm / numa.h
CommitLineData
bbc9e2f4
TH
1#ifndef _ASM_X86_NUMA_H
2#define _ASM_X86_NUMA_H
3
6bd26273
TH
4#include <linux/nodemask.h>
5
de2d9445 6#include <asm/topology.h>
bbc9e2f4
TH
7#include <asm/apicdef.h>
8
9#ifdef CONFIG_NUMA
ef396ec9
TH
10
11#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
12
bbc9e2f4
TH
13/*
14 * __apicid_to_node[] stores the raw mapping between physical apicid and
15 * node and is used to initialize cpu_to_node mapping.
16 *
17 * The mapping may be overridden by apic->numa_cpu_node() on 32bit and thus
18 * should be accessed by the accessors - set_apicid_to_node() and
19 * numa_cpu_node().
20 */
21extern s16 __apicid_to_node[MAX_LOCAL_APIC];
e6df595b 22extern nodemask_t numa_nodes_parsed __initdata;
bbc9e2f4 23
b0d31080
TH
24extern int __init numa_add_memblk(int nodeid, u64 start, u64 end);
25extern void __init numa_set_distance(int from, int to, int distance);
26
bbc9e2f4
TH
27static inline void set_apicid_to_node(int apicid, s16 node)
28{
29 __apicid_to_node[apicid] = node;
30}
6bd26273
TH
31
32extern int __cpuinit numa_cpu_node(int cpu);
33
bbc9e2f4
TH
34#else /* CONFIG_NUMA */
35static inline void set_apicid_to_node(int apicid, s16 node)
36{
37}
6bd26273
TH
38
39static inline int numa_cpu_node(int cpu)
40{
41 return NUMA_NO_NODE;
42}
bbc9e2f4
TH
43#endif /* CONFIG_NUMA */
44
96a388de
TG
45#ifdef CONFIG_X86_32
46# include "numa_32.h"
47#else
48# include "numa_64.h"
49#endif
bbc9e2f4 50
645a7919
TH
51#ifdef CONFIG_NUMA
52extern void __cpuinit numa_set_node(int cpu, int node);
53extern void __cpuinit numa_clear_node(int cpu);
8db78cc4
TH
54extern void __init numa_init_array(void);
55extern void __init init_cpu_to_node(void);
de2d9445
TH
56extern void __cpuinit numa_add_cpu(int cpu);
57extern void __cpuinit numa_remove_cpu(int cpu);
645a7919
TH
58#else /* CONFIG_NUMA */
59static inline void numa_set_node(int cpu, int node) { }
60static inline void numa_clear_node(int cpu) { }
8db78cc4
TH
61static inline void numa_init_array(void) { }
62static inline void init_cpu_to_node(void) { }
de2d9445
TH
63static inline void numa_add_cpu(int cpu) { }
64static inline void numa_remove_cpu(int cpu) { }
645a7919
TH
65#endif /* CONFIG_NUMA */
66
de2d9445 67#ifdef CONFIG_DEBUG_PER_CPU_MAPS
7a6c6547 68void debug_cpumask_set_cpu(int cpu, int node, bool enable);
de2d9445
TH
69#endif
70
bbc9e2f4 71#endif /* _ASM_X86_NUMA_H */
This page took 0.322167 seconds and 5 git commands to generate.