diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-05-06 14:59:18 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-06 14:59:18 -0400 |
commit | 5047f09b56d0bc3c21aec9cb16de60283da645c6 (patch) | |
tree | 09a07554b933c3bb912ce3bfc0ea7c7e1f16041c /include/asm-powerpc | |
parent | c0f1fe00c3923135b2c2f443448585482da8a53e (diff) | |
parent | 5528e568a760442e0ec8fd2dea1f0791875a066b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/spu.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/topology.h | 24 | ||||
-rw-r--r-- | include/asm-powerpc/uaccess.h | 19 |
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 | ||
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 */ |
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 | }) |