aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/spu.h1
-rw-r--r--include/asm-powerpc/topology.h24
-rw-r--r--include/asm-powerpc/uaccess.h19
3 files changed, 38 insertions, 6 deletions
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index fb519a1e49bd..95713f397357 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -116,6 +116,7 @@ struct spu {
116 struct list_head list; 116 struct list_head list;
117 struct list_head sched_list; 117 struct list_head sched_list;
118 int number; 118 int number;
119 int nid;
119 u32 isrc; 120 u32 isrc;
120 u32 node; 121 u32 node;
121 u64 flags; 122 u64 flags;
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
6struct sys_device;
7struct 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
32int 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
57extern void __init dump_numa_cpu_topology(void); 62extern void __init dump_numa_cpu_topology(void);
58 63
64extern int sysfs_add_device_to_node(struct sys_device *dev, int nid);
65extern void sysfs_remove_device_from_node(struct sys_device *dev, int nid);
66
59#else 67#else
60 68
69static inline int of_node_to_nid(struct device_node *device)
70{
71 return 0;
72}
73
61static inline void dump_numa_cpu_topology(void) {} 74static inline void dump_numa_cpu_topology(void) {}
62 75
76static inline int sysfs_add_device_to_node(struct sys_device *dev, int nid)
77{
78 return 0;
79}
80
81static 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 */
diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h
index 3872e924cdd6..d83fc29c2bbf 100644
--- a/include/asm-powerpc/uaccess.h
+++ b/include/asm-powerpc/uaccess.h
@@ -7,6 +7,7 @@
7#include <linux/sched.h> 7#include <linux/sched.h>
8#include <linux/errno.h> 8#include <linux/errno.h>
9#include <asm/processor.h> 9#include <asm/processor.h>
10#include <asm/page.h>
10 11
11#define VERIFY_READ 0 12#define VERIFY_READ 0
12#define VERIFY_WRITE 1 13#define VERIFY_WRITE 1
@@ -179,9 +180,11 @@ do { \
179#define __put_user_nocheck(x, ptr, size) \ 180#define __put_user_nocheck(x, ptr, size) \
180({ \ 181({ \
181 long __pu_err; \ 182 long __pu_err; \
182 might_sleep(); \ 183 __typeof__(*(ptr)) __user *__pu_addr = (ptr); \
184 if (!is_kernel_addr((unsigned long)__pu_addr)) \
185 might_sleep(); \
183 __chk_user_ptr(ptr); \ 186 __chk_user_ptr(ptr); \
184 __put_user_size((x), (ptr), (size), __pu_err); \ 187 __put_user_size((x), __pu_addr, (size), __pu_err); \
185 __pu_err; \ 188 __pu_err; \
186}) 189})
187 190
@@ -258,9 +261,11 @@ do { \
258({ \ 261({ \
259 long __gu_err; \ 262 long __gu_err; \
260 unsigned long __gu_val; \ 263 unsigned long __gu_val; \
264 const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
261 __chk_user_ptr(ptr); \ 265 __chk_user_ptr(ptr); \
262 might_sleep(); \ 266 if (!is_kernel_addr((unsigned long)__gu_addr)) \
263 __get_user_size(__gu_val, (ptr), (size), __gu_err); \ 267 might_sleep(); \
268 __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
264 (x) = (__typeof__(*(ptr)))__gu_val; \ 269 (x) = (__typeof__(*(ptr)))__gu_val; \
265 __gu_err; \ 270 __gu_err; \
266}) 271})
@@ -270,9 +275,11 @@ do { \
270({ \ 275({ \
271 long __gu_err; \ 276 long __gu_err; \
272 long long __gu_val; \ 277 long long __gu_val; \
278 const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
273 __chk_user_ptr(ptr); \ 279 __chk_user_ptr(ptr); \
274 might_sleep(); \ 280 if (!is_kernel_addr((unsigned long)__gu_addr)) \
275 __get_user_size(__gu_val, (ptr), (size), __gu_err); \ 281 might_sleep(); \
282 __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
276 (x) = (__typeof__(*(ptr)))__gu_val; \ 283 (x) = (__typeof__(*(ptr)))__gu_val; \
277 __gu_err; \ 284 __gu_err; \
278}) 285})