diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-12 10:48:52 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-12 10:48:52 -0400 |
commit | 7d63b54a65ce902f9aaa8efe8192aa3b983264d4 (patch) | |
tree | 250a77bebe92cbd6edac70a649866044295876db /include/asm-powerpc | |
parent | fd88de569b802c4a04aaa6ee74667775f4aed8c6 (diff) | |
parent | d8c3291c73b958243b33f8509d4507e76dafd055 (diff) |
Merge branch 'master'
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/cputable.h | 14 | ||||
-rw-r--r-- | include/asm-powerpc/io.h | 6 | ||||
-rw-r--r-- | include/asm-powerpc/page_64.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/pgalloc.h | 2 | ||||
-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 | ||||
-rw-r--r-- | include/asm-powerpc/unistd.h | 20 |
8 files changed, 73 insertions, 14 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 4321483cce51..9fcf0162d859 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define PPC_FEATURE_BOOKE 0x00008000 | 22 | #define PPC_FEATURE_BOOKE 0x00008000 |
23 | #define PPC_FEATURE_SMT 0x00004000 | 23 | #define PPC_FEATURE_SMT 0x00004000 |
24 | #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 | 24 | #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 |
25 | #define PPC_FEATURE_ARCH_2_05 0x00001000 | ||
25 | 26 | ||
26 | #ifdef __KERNEL__ | 27 | #ifdef __KERNEL__ |
27 | #ifndef __ASSEMBLY__ | 28 | #ifndef __ASSEMBLY__ |
@@ -320,6 +321,11 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
320 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 321 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
321 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 322 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
322 | CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR) | 323 | CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR) |
324 | #define CPU_FTRS_POWER6 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | ||
325 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | ||
326 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | ||
327 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | ||
328 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE) | ||
323 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 329 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
324 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 330 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ |
325 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 331 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
@@ -331,8 +337,8 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
331 | #ifdef __powerpc64__ | 337 | #ifdef __powerpc64__ |
332 | #define CPU_FTRS_POSSIBLE \ | 338 | #define CPU_FTRS_POSSIBLE \ |
333 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ | 339 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ |
334 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_CELL | \ | 340 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ |
335 | CPU_FTR_CI_LARGE_PAGE) | 341 | CPU_FTRS_CELL | CPU_FTR_CI_LARGE_PAGE) |
336 | #else | 342 | #else |
337 | enum { | 343 | enum { |
338 | CPU_FTRS_POSSIBLE = | 344 | CPU_FTRS_POSSIBLE = |
@@ -376,8 +382,8 @@ enum { | |||
376 | #ifdef __powerpc64__ | 382 | #ifdef __powerpc64__ |
377 | #define CPU_FTRS_ALWAYS \ | 383 | #define CPU_FTRS_ALWAYS \ |
378 | (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ | 384 | (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ |
379 | CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_CELL & \ | 385 | CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ |
380 | CPU_FTRS_POSSIBLE) | 386 | CPU_FTRS_CELL & CPU_FTRS_POSSIBLE) |
381 | #else | 387 | #else |
382 | enum { | 388 | enum { |
383 | CPU_FTRS_ALWAYS = | 389 | CPU_FTRS_ALWAYS = |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 68efbea379c9..f1c2469b8844 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /* Check of existence of legacy devices */ | ||
13 | extern int check_legacy_ioport(unsigned long base_port); | ||
14 | |||
12 | #ifndef CONFIG_PPC64 | 15 | #ifndef CONFIG_PPC64 |
13 | #include <asm-ppc/io.h> | 16 | #include <asm-ppc/io.h> |
14 | #else | 17 | #else |
@@ -437,9 +440,6 @@ out: | |||
437 | #define dma_cache_wback(_start,_size) do { } while (0) | 440 | #define dma_cache_wback(_start,_size) do { } while (0) |
438 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | 441 | #define dma_cache_wback_inv(_start,_size) do { } while (0) |
439 | 442 | ||
440 | /* Check of existence of legacy devices */ | ||
441 | extern int check_legacy_ioport(unsigned long base_port); | ||
442 | |||
443 | 443 | ||
444 | /* | 444 | /* |
445 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 445 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h index 3fb061bab9ec..eab779c21995 100644 --- a/include/asm-powerpc/page_64.h +++ b/include/asm-powerpc/page_64.h | |||
@@ -101,6 +101,7 @@ extern unsigned int HPAGE_SHIFT; | |||
101 | - (1U << GET_HTLB_AREA(addr))) & 0xffff) | 101 | - (1U << GET_HTLB_AREA(addr))) & 0xffff) |
102 | 102 | ||
103 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE | 103 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE |
104 | #define ARCH_HAS_HUGETLB_FREE_PGD_RANGE | ||
104 | #define ARCH_HAS_PREPARE_HUGEPAGE_RANGE | 105 | #define ARCH_HAS_PREPARE_HUGEPAGE_RANGE |
105 | #define ARCH_HAS_SETCLEAR_HUGE_PTE | 106 | #define ARCH_HAS_SETCLEAR_HUGE_PTE |
106 | 107 | ||
diff --git a/include/asm-powerpc/pgalloc.h b/include/asm-powerpc/pgalloc.h index a00ee002cd11..9f0917c68659 100644 --- a/include/asm-powerpc/pgalloc.h +++ b/include/asm-powerpc/pgalloc.h | |||
@@ -17,11 +17,13 @@ extern kmem_cache_t *pgtable_cache[]; | |||
17 | #define PTE_CACHE_NUM 0 | 17 | #define PTE_CACHE_NUM 0 |
18 | #define PMD_CACHE_NUM 1 | 18 | #define PMD_CACHE_NUM 1 |
19 | #define PGD_CACHE_NUM 2 | 19 | #define PGD_CACHE_NUM 2 |
20 | #define HUGEPTE_CACHE_NUM 3 | ||
20 | #else | 21 | #else |
21 | #define PTE_CACHE_NUM 0 | 22 | #define PTE_CACHE_NUM 0 |
22 | #define PMD_CACHE_NUM 1 | 23 | #define PMD_CACHE_NUM 1 |
23 | #define PUD_CACHE_NUM 1 | 24 | #define PUD_CACHE_NUM 1 |
24 | #define PGD_CACHE_NUM 0 | 25 | #define PGD_CACHE_NUM 0 |
26 | #define HUGEPTE_CACHE_NUM 2 | ||
25 | #endif | 27 | #endif |
26 | 28 | ||
27 | /* | 29 | /* |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index f431d8b0b651..7cfcff3ef027 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -117,6 +117,7 @@ struct spu { | |||
117 | struct list_head list; | 117 | struct list_head list; |
118 | struct list_head sched_list; | 118 | struct list_head sched_list; |
119 | int number; | 119 | int number; |
120 | int nid; | ||
120 | u32 isrc; | 121 | u32 isrc; |
121 | u32 node; | 122 | u32 node; |
122 | u64 flags; | 123 | u64 flags; |
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 1e19cd00af25..87362a05542b 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h | |||
@@ -4,6 +4,9 @@ | |||
4 | 4 | ||
5 | #include <linux/config.h> | 5 | #include <linux/config.h> |
6 | 6 | ||
7 | struct sys_device; | ||
8 | struct device_node; | ||
9 | |||
7 | #ifdef CONFIG_NUMA | 10 | #ifdef CONFIG_NUMA |
8 | 11 | ||
9 | #include <asm/mmzone.h> | 12 | #include <asm/mmzone.h> |
@@ -27,6 +30,8 @@ static inline int node_to_first_cpu(int node) | |||
27 | return first_cpu(tmp); | 30 | return first_cpu(tmp); |
28 | } | 31 | } |
29 | 32 | ||
33 | int of_node_to_nid(struct device_node *device); | ||
34 | |||
30 | #define pcibus_to_node(node) (-1) | 35 | #define pcibus_to_node(node) (-1) |
31 | #define pcibus_to_cpumask(bus) (cpu_online_map) | 36 | #define pcibus_to_cpumask(bus) (cpu_online_map) |
32 | 37 | ||
@@ -57,10 +62,29 @@ static inline int node_to_first_cpu(int node) | |||
57 | 62 | ||
58 | extern void __init dump_numa_cpu_topology(void); | 63 | extern void __init dump_numa_cpu_topology(void); |
59 | 64 | ||
65 | extern int sysfs_add_device_to_node(struct sys_device *dev, int nid); | ||
66 | extern void sysfs_remove_device_from_node(struct sys_device *dev, int nid); | ||
67 | |||
60 | #else | 68 | #else |
61 | 69 | ||
70 | static inline int of_node_to_nid(struct device_node *device) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | |||
62 | static inline void dump_numa_cpu_topology(void) {} | 75 | static inline void dump_numa_cpu_topology(void) {} |
63 | 76 | ||
77 | static inline int sysfs_add_device_to_node(struct sys_device *dev, int nid) | ||
78 | { | ||
79 | return 0; | ||
80 | } | ||
81 | |||
82 | static inline void sysfs_remove_device_from_node(struct sys_device *dev, | ||
83 | int nid) | ||
84 | { | ||
85 | } | ||
86 | |||
87 | |||
64 | #include <asm-generic/topology.h> | 88 | #include <asm-generic/topology.h> |
65 | 89 | ||
66 | #endif /* CONFIG_NUMA */ | 90 | #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 | }) |
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index 34325e292596..908acb44cb8a 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
@@ -304,8 +304,25 @@ | |||
304 | #define __NR_splice 283 | 304 | #define __NR_splice 283 |
305 | #define __NR_tee 284 | 305 | #define __NR_tee 284 |
306 | #define __NR_vmsplice 285 | 306 | #define __NR_vmsplice 285 |
307 | #define __NR_openat 286 | ||
308 | #define __NR_mkdirat 287 | ||
309 | #define __NR_mknodat 288 | ||
310 | #define __NR_fchownat 289 | ||
311 | #define __NR_futimesat 290 | ||
312 | #ifdef __powerpc64__ | ||
313 | #define __NR_newfstatat 291 | ||
314 | #else | ||
315 | #define __NR_fstatat64 291 | ||
316 | #endif | ||
317 | #define __NR_unlinkat 292 | ||
318 | #define __NR_renameat 293 | ||
319 | #define __NR_linkat 294 | ||
320 | #define __NR_symlinkat 295 | ||
321 | #define __NR_readlinkat 296 | ||
322 | #define __NR_fchmodat 297 | ||
323 | #define __NR_faccessat 298 | ||
307 | 324 | ||
308 | #define __NR_syscalls 286 | 325 | #define __NR_syscalls 299 |
309 | 326 | ||
310 | #ifdef __KERNEL__ | 327 | #ifdef __KERNEL__ |
311 | #define __NR__exit __NR_exit | 328 | #define __NR__exit __NR_exit |
@@ -458,6 +475,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 | |||
458 | #ifdef CONFIG_PPC64 | 475 | #ifdef CONFIG_PPC64 |
459 | #define __ARCH_WANT_COMPAT_SYS_TIME | 476 | #define __ARCH_WANT_COMPAT_SYS_TIME |
460 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | 477 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
478 | #define __ARCH_WANT_SYS_NEWFSTATAT | ||
461 | #endif | 479 | #endif |
462 | 480 | ||
463 | /* | 481 | /* |