~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/numa.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_X86_NUMA_H
  3 #define _ASM_X86_NUMA_H
  4 
  5 #include <linux/nodemask.h>
  6 #include <linux/errno.h>
  7 
  8 #include <asm/topology.h>
  9 #include <asm/apicdef.h>
 10 
 11 #ifdef CONFIG_NUMA
 12 
 13 #define NR_NODE_MEMBLKS         (MAX_NUMNODES*2)
 14 
 15 extern int numa_off;
 16 
 17 /*
 18  * __apicid_to_node[] stores the raw mapping between physical apicid and
 19  * node and is used to initialize cpu_to_node mapping.
 20  *
 21  * The mapping may be overridden by apic->numa_cpu_node() on 32bit and thus
 22  * should be accessed by the accessors - set_apicid_to_node() and
 23  * numa_cpu_node().
 24  */
 25 extern s16 __apicid_to_node[MAX_LOCAL_APIC];
 26 extern nodemask_t numa_nodes_parsed __initdata;
 27 
 28 extern int __init numa_add_memblk(int nodeid, u64 start, u64 end);
 29 extern void __init numa_set_distance(int from, int to, int distance);
 30 
 31 static inline void set_apicid_to_node(int apicid, s16 node)
 32 {
 33         __apicid_to_node[apicid] = node;
 34 }
 35 
 36 extern int numa_cpu_node(int cpu);
 37 
 38 #else   /* CONFIG_NUMA */
 39 static inline void set_apicid_to_node(int apicid, s16 node)
 40 {
 41 }
 42 
 43 static inline int numa_cpu_node(int cpu)
 44 {
 45         return NUMA_NO_NODE;
 46 }
 47 #endif  /* CONFIG_NUMA */
 48 
 49 #ifdef CONFIG_X86_32
 50 # include <asm/numa_32.h>
 51 #endif
 52 
 53 #ifdef CONFIG_NUMA
 54 extern void numa_set_node(int cpu, int node);
 55 extern void numa_clear_node(int cpu);
 56 extern void __init init_cpu_to_node(void);
 57 extern void numa_add_cpu(int cpu);
 58 extern void numa_remove_cpu(int cpu);
 59 extern void init_gi_nodes(void);
 60 #else   /* CONFIG_NUMA */
 61 static inline void numa_set_node(int cpu, int node)     { }
 62 static inline void numa_clear_node(int cpu)             { }
 63 static inline void init_cpu_to_node(void)               { }
 64 static inline void numa_add_cpu(int cpu)                { }
 65 static inline void numa_remove_cpu(int cpu)             { }
 66 static inline void init_gi_nodes(void)                  { }
 67 #endif  /* CONFIG_NUMA */
 68 
 69 #ifdef CONFIG_DEBUG_PER_CPU_MAPS
 70 void debug_cpumask_set_cpu(int cpu, int node, bool enable);
 71 #endif
 72 
 73 #ifdef CONFIG_NUMA_EMU
 74 #define FAKE_NODE_MIN_SIZE      ((u64)32 << 20)
 75 #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
 76 int numa_emu_cmdline(char *str);
 77 #else /* CONFIG_NUMA_EMU */
 78 static inline int numa_emu_cmdline(char *str)
 79 {
 80         return -EINVAL;
 81 }
 82 #endif /* CONFIG_NUMA_EMU */
 83 
 84 #endif  /* _ASM_X86_NUMA_H */
 85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php