Release 4.14 arch/x86/include/asm/numa.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_NUMA_H
#define _ASM_X86_NUMA_H
#include <linux/nodemask.h>
#include <asm/topology.h>
#include <asm/apicdef.h>
#ifdef CONFIG_NUMA
#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
/*
* Too small node sizes may confuse the VM badly. Usually they
* result from BIOS bugs. So dont recognize nodes as standalone
* NUMA entities that have less than this amount of RAM listed:
*/
#define NODE_MIN_SIZE (4*1024*1024)
extern int numa_off;
/*
* __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];
extern nodemask_t numa_nodes_parsed __initdata;
extern int __init numa_add_memblk(int nodeid, u64 start, u64 end);
extern void __init numa_set_distance(int from, int to, int distance);
static inline void set_apicid_to_node(int apicid, s16 node)
{
__apicid_to_node[apicid] = node;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Tejun Heo | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
extern int numa_cpu_node(int cpu);
#else /* CONFIG_NUMA */
static inline void set_apicid_to_node(int apicid, s16 node)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Tejun Heo | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
static inline int numa_cpu_node(int cpu)
{
return NUMA_NO_NODE;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Tejun Heo | 13 | 100.00% | 1 | 100.00% |
Total | 13 | 100.00% | 1 | 100.00% |
#endif /* CONFIG_NUMA */
#ifdef CONFIG_X86_32
# include <asm/numa_32.h>
#endif
#ifdef CONFIG_NUMA
extern void numa_set_node(int cpu, int node);
extern void numa_clear_node(int cpu);
extern void __init init_cpu_to_node(void);
extern void numa_add_cpu(int cpu);
extern void numa_remove_cpu(int cpu);
#else /* CONFIG_NUMA */
static inline void numa_set_node(int cpu, int node) { }
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Tejun Heo | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
static inline void numa_clear_node(int cpu) { }
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Tejun Heo | 9 | 100.00% | 1 | 100.00% |
Total | 9 | 100.00% | 1 | 100.00% |
static inline void init_cpu_to_node(void) { }
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Tejun Heo | 8 | 100.00% | 1 | 100.00% |
Total | 8 | 100.00% | 1 | 100.00% |
static inline void numa_add_cpu(int cpu) { }
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Tejun Heo | 9 | 100.00% | 1 | 100.00% |
Total | 9 | 100.00% | 1 | 100.00% |
static inline void numa_remove_cpu(int cpu) { }
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Tejun Heo | 9 | 100.00% | 1 | 100.00% |
Total | 9 | 100.00% | 1 | 100.00% |
#endif /* CONFIG_NUMA */
#ifdef CONFIG_DEBUG_PER_CPU_MAPS
void debug_cpumask_set_cpu(int cpu, int node, bool enable);
#endif
#ifdef CONFIG_NUMA_EMU
#define FAKE_NODE_MIN_SIZE ((u64)32 << 20)
#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
void numa_emu_cmdline(char *);
#endif /* CONFIG_NUMA_EMU */
#endif /* _ASM_X86_NUMA_H */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Tejun Heo | 270 | 95.41% | 9 | 69.23% |
Thomas Gleixner | 7 | 2.47% | 1 | 7.69% |
David Rientjes | 4 | 1.41% | 1 | 7.69% |
David Howells | 1 | 0.35% | 1 | 7.69% |
Greg Kroah-Hartman | 1 | 0.35% | 1 | 7.69% |
Total | 283 | 100.00% | 13 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.