0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #ifndef _ASM_GENERIC_TOPOLOGY_H
0028 #define _ASM_GENERIC_TOPOLOGY_H
0029
0030 #ifndef CONFIG_NUMA
0031
0032
0033
0034 #ifndef cpu_to_node
0035 #define cpu_to_node(cpu) ((void)(cpu),0)
0036 #endif
0037 #ifndef set_numa_node
0038 #define set_numa_node(node)
0039 #endif
0040 #ifndef set_cpu_numa_node
0041 #define set_cpu_numa_node(cpu, node)
0042 #endif
0043 #ifndef cpu_to_mem
0044 #define cpu_to_mem(cpu) ((void)(cpu),0)
0045 #endif
0046
0047 #ifndef cpumask_of_node
0048 #ifdef CONFIG_NUMA
0049 #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask)
0050 #else
0051 #define cpumask_of_node(node) ((void)(node), cpu_online_mask)
0052 #endif
0053 #endif
0054 #ifndef pcibus_to_node
0055 #define pcibus_to_node(bus) ((void)(bus), -1)
0056 #endif
0057
0058 #ifndef cpumask_of_pcibus
0059 #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
0060 cpu_all_mask : \
0061 cpumask_of_node(pcibus_to_node(bus)))
0062 #endif
0063
0064 #endif
0065
0066 #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
0067
0068 #ifndef set_numa_mem
0069 #define set_numa_mem(node)
0070 #endif
0071 #ifndef set_cpu_numa_mem
0072 #define set_cpu_numa_mem(cpu, node)
0073 #endif
0074
0075 #endif
0076
0077 #endif