1 #ifndef _ASM_POWERPC_TOPOLOGY_H
2 #define _ASM_POWERPC_TOPOLOGY_H
19 #define RECLAIM_DISTANCE 10
21 #include <asm/mmzone.h>
28 #define parent_node(node) (node)
30 #define cpumask_of_node(node) ((node) == -1 ? \
32 node_to_cpumask_map[node])
44 #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
46 cpumask_of_node(pcibus_to_node(bus)))
49 #define node_distance(a, b) __node_distance(a, b)
53 extern int sysfs_add_device_to_node(
struct device *
dev,
int nid);
54 extern void sysfs_remove_device_from_node(
struct device *
dev,
int nid);
60 static inline int sysfs_add_device_to_node(
struct device *
dev,
int nid)
65 static inline void sysfs_remove_device_from_node(
struct device *
dev,
71 #if defined(CONFIG_NUMA) && defined(CONFIG_PPC_SPLPAR)
72 extern int start_topology_update(
void);
73 extern int stop_topology_update(
void);
75 static inline int start_topology_update(
void)
79 static inline int stop_topology_update(
void)
88 #include <asm/cputable.h>
89 #define smt_capable() (cpu_has_feature(CPU_FTR_SMT))
94 #define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
95 #define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
96 #define topology_core_id(cpu) (cpu_to_core_id(cpu))