diff options
Diffstat (limited to 'include/asm-powerpc/topology.h')
| -rw-r--r-- | include/asm-powerpc/topology.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 4cf340ccb4cd..19c575f39164 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h | |||
| @@ -3,6 +3,9 @@ | |||
| 3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | struct sys_device; | ||
| 7 | struct device_node; | ||
| 8 | |||
| 6 | #ifdef CONFIG_NUMA | 9 | #ifdef CONFIG_NUMA |
| 7 | 10 | ||
| 8 | #include <asm/mmzone.h> | 11 | #include <asm/mmzone.h> |
| @@ -26,6 +29,8 @@ static inline int node_to_first_cpu(int node) | |||
| 26 | return first_cpu(tmp); | 29 | return first_cpu(tmp); |
| 27 | } | 30 | } |
| 28 | 31 | ||
| 32 | int of_node_to_nid(struct device_node *device); | ||
| 33 | |||
| 29 | #define pcibus_to_node(node) (-1) | 34 | #define pcibus_to_node(node) (-1) |
| 30 | #define pcibus_to_cpumask(bus) (cpu_online_map) | 35 | #define pcibus_to_cpumask(bus) (cpu_online_map) |
| 31 | 36 | ||
| @@ -56,10 +61,29 @@ static inline int node_to_first_cpu(int node) | |||
| 56 | 61 | ||
| 57 | extern void __init dump_numa_cpu_topology(void); | 62 | extern void __init dump_numa_cpu_topology(void); |
| 58 | 63 | ||
| 64 | extern int sysfs_add_device_to_node(struct sys_device *dev, int nid); | ||
| 65 | extern void sysfs_remove_device_from_node(struct sys_device *dev, int nid); | ||
| 66 | |||
| 59 | #else | 67 | #else |
| 60 | 68 | ||
| 69 | static inline int of_node_to_nid(struct device_node *device) | ||
| 70 | { | ||
| 71 | return 0; | ||
| 72 | } | ||
| 73 | |||
| 61 | static inline void dump_numa_cpu_topology(void) {} | 74 | static inline void dump_numa_cpu_topology(void) {} |
| 62 | 75 | ||
| 76 | static inline int sysfs_add_device_to_node(struct sys_device *dev, int nid) | ||
| 77 | { | ||
| 78 | return 0; | ||
| 79 | } | ||
| 80 | |||
| 81 | static inline void sysfs_remove_device_from_node(struct sys_device *dev, | ||
| 82 | int nid) | ||
| 83 | { | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 63 | #include <asm-generic/topology.h> | 87 | #include <asm-generic/topology.h> |
| 64 | 88 | ||
| 65 | #endif /* CONFIG_NUMA */ | 89 | #endif /* CONFIG_NUMA */ |
