2011-01-23 20:37:39 +07:00
|
|
|
#ifndef _ASM_X86_NUMA_H
|
|
|
|
#define _ASM_X86_NUMA_H
|
|
|
|
|
2011-01-23 20:37:41 +07:00
|
|
|
#include <asm/topology.h>
|
2011-01-23 20:37:39 +07:00
|
|
|
#include <asm/apicdef.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_NUMA
|
|
|
|
/*
|
|
|
|
* __apicid_to_node[] stores the raw mapping between physical apicid and
|
|
|
|
* node and is used to initialize cpu_to_node mapping.
|
|
|
|
*
|
|
|
|
* The mapping may be overridden by apic->numa_cpu_node() on 32bit and thus
|
|
|
|
* should be accessed by the accessors - set_apicid_to_node() and
|
|
|
|
* numa_cpu_node().
|
|
|
|
*/
|
|
|
|
extern s16 __apicid_to_node[MAX_LOCAL_APIC];
|
|
|
|
|
|
|
|
static inline void set_apicid_to_node(int apicid, s16 node)
|
|
|
|
{
|
|
|
|
__apicid_to_node[apicid] = node;
|
|
|
|
}
|
|
|
|
#else /* CONFIG_NUMA */
|
|
|
|
static inline void set_apicid_to_node(int apicid, s16 node)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
#endif /* CONFIG_NUMA */
|
|
|
|
|
2007-10-11 16:20:03 +07:00
|
|
|
#ifdef CONFIG_X86_32
|
|
|
|
# include "numa_32.h"
|
|
|
|
#else
|
|
|
|
# include "numa_64.h"
|
|
|
|
#endif
|
2011-01-23 20:37:39 +07:00
|
|
|
|
2011-01-23 20:37:40 +07:00
|
|
|
#ifdef CONFIG_NUMA
|
|
|
|
extern void __cpuinit numa_set_node(int cpu, int node);
|
|
|
|
extern void __cpuinit numa_clear_node(int cpu);
|
2011-01-23 20:37:42 +07:00
|
|
|
extern void __init numa_init_array(void);
|
|
|
|
extern void __init init_cpu_to_node(void);
|
2011-01-23 20:37:41 +07:00
|
|
|
extern void __cpuinit numa_add_cpu(int cpu);
|
|
|
|
extern void __cpuinit numa_remove_cpu(int cpu);
|
2011-01-23 20:37:40 +07:00
|
|
|
#else /* CONFIG_NUMA */
|
|
|
|
static inline void numa_set_node(int cpu, int node) { }
|
|
|
|
static inline void numa_clear_node(int cpu) { }
|
2011-01-23 20:37:42 +07:00
|
|
|
static inline void numa_init_array(void) { }
|
|
|
|
static inline void init_cpu_to_node(void) { }
|
2011-01-23 20:37:41 +07:00
|
|
|
static inline void numa_add_cpu(int cpu) { }
|
|
|
|
static inline void numa_remove_cpu(int cpu) { }
|
2011-01-23 20:37:40 +07:00
|
|
|
#endif /* CONFIG_NUMA */
|
|
|
|
|
2011-01-23 20:37:41 +07:00
|
|
|
#ifdef CONFIG_DEBUG_PER_CPU_MAPS
|
|
|
|
struct cpumask __cpuinit *debug_cpumask_set_cpu(int cpu, int enable);
|
|
|
|
#endif
|
|
|
|
|
2011-01-23 20:37:39 +07:00
|
|
|
#endif /* _ASM_X86_NUMA_H */
|