diff options
author | Paul Mackerras <paulus@samba.org> | 2006-04-29 02:15:57 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-04-29 02:15:57 -0400 |
commit | 29f147d746326e4db5fe350c70373081d61a2965 (patch) | |
tree | 04c065ace8c62953441bc22079b93449b996f283 /include | |
parent | 916a3d5729c8b710d56acf579f3fdb4de7c03e77 (diff) | |
parent | 6fb8f3acbe833586eb32598d1f844eb9f77c4fba (diff) |
Merge branch 'merge'
Diffstat (limited to 'include')
35 files changed, 246 insertions, 106 deletions
diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h index 27bde973abc7..2756d4b04c27 100644 --- a/include/asm-i386/pgtable-2level.h +++ b/include/asm-i386/pgtable-2level.h | |||
@@ -18,6 +18,9 @@ | |||
18 | #define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval) | 18 | #define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval) |
19 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) | 19 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) |
20 | 20 | ||
21 | #define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) | ||
22 | #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) | ||
23 | |||
21 | #define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte_low, 0)) | 24 | #define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte_low, 0)) |
22 | #define pte_same(a, b) ((a).pte_low == (b).pte_low) | 25 | #define pte_same(a, b) ((a).pte_low == (b).pte_low) |
23 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 26 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index 36a5aa63cbbf..dccb1b3337ad 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -85,6 +85,26 @@ static inline void pud_clear (pud_t * pud) { } | |||
85 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ | 85 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ |
86 | pmd_index(address)) | 86 | pmd_index(address)) |
87 | 87 | ||
88 | /* | ||
89 | * For PTEs and PDEs, we must clear the P-bit first when clearing a page table | ||
90 | * entry, so clear the bottom half first and enforce ordering with a compiler | ||
91 | * barrier. | ||
92 | */ | ||
93 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | ||
94 | { | ||
95 | ptep->pte_low = 0; | ||
96 | smp_wmb(); | ||
97 | ptep->pte_high = 0; | ||
98 | } | ||
99 | |||
100 | static inline void pmd_clear(pmd_t *pmd) | ||
101 | { | ||
102 | u32 *tmp = (u32 *)pmd; | ||
103 | *tmp = 0; | ||
104 | smp_wmb(); | ||
105 | *(tmp + 1) = 0; | ||
106 | } | ||
107 | |||
88 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 108 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
89 | { | 109 | { |
90 | pte_t res; | 110 | pte_t res; |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index ee056c41a9fb..672c3f76b9df 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -204,12 +204,10 @@ extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC; | |||
204 | extern unsigned long pg0[]; | 204 | extern unsigned long pg0[]; |
205 | 205 | ||
206 | #define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE)) | 206 | #define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE)) |
207 | #define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) | ||
208 | 207 | ||
209 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ | 208 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ |
210 | #define pmd_none(x) (!(unsigned long)pmd_val(x)) | 209 | #define pmd_none(x) (!(unsigned long)pmd_val(x)) |
211 | #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) | 210 | #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) |
212 | #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) | ||
213 | #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) | 211 | #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) |
214 | 212 | ||
215 | 213 | ||
@@ -268,7 +266,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long | |||
268 | pte_t pte; | 266 | pte_t pte; |
269 | if (full) { | 267 | if (full) { |
270 | pte = *ptep; | 268 | pte = *ptep; |
271 | *ptep = __pte(0); | 269 | pte_clear(mm, addr, ptep); |
272 | } else { | 270 | } else { |
273 | pte = ptep_get_and_clear(mm, addr, ptep); | 271 | pte = ptep_get_and_clear(mm, addr, ptep); |
274 | } | 272 | } |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index d81d6cfc1bb4..eb4b152c82fc 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -321,8 +321,9 @@ | |||
321 | #define __NR_splice 313 | 321 | #define __NR_splice 313 |
322 | #define __NR_sync_file_range 314 | 322 | #define __NR_sync_file_range 314 |
323 | #define __NR_tee 315 | 323 | #define __NR_tee 315 |
324 | #define __NR_vmsplice 316 | ||
324 | 325 | ||
325 | #define NR_syscalls 316 | 326 | #define NR_syscalls 317 |
326 | 327 | ||
327 | /* | 328 | /* |
328 | * user-visible error numbers are in the range -1 - -128: see | 329 | * user-visible error numbers are in the range -1 - -128: see |
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index d734585a23cf..09a5dd0e44a8 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
@@ -110,9 +110,8 @@ extern void prefill_possible_map(void); | |||
110 | extern int additional_cpus; | 110 | extern int additional_cpus; |
111 | 111 | ||
112 | #ifdef CONFIG_ACPI_NUMA | 112 | #ifdef CONFIG_ACPI_NUMA |
113 | /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ | 113 | #if MAX_NUMNODES > 256 |
114 | #ifdef CONFIG_IA64_NR_NODES | 114 | #define MAX_PXM_DOMAINS MAX_NUMNODES |
115 | #define MAX_PXM_DOMAINS CONFIG_IA64_NR_NODES | ||
116 | #else | 115 | #else |
117 | #define MAX_PXM_DOMAINS (256) | 116 | #define MAX_PXM_DOMAINS (256) |
118 | #endif | 117 | #endif |
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index c3e4ed8a3e17..a9c995a86c21 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -347,9 +347,11 @@ extern ia64_mv_dma_supported swiotlb_dma_supported; | |||
347 | #endif | 347 | #endif |
348 | #ifndef platform_pci_legacy_read | 348 | #ifndef platform_pci_legacy_read |
349 | # define platform_pci_legacy_read ia64_pci_legacy_read | 349 | # define platform_pci_legacy_read ia64_pci_legacy_read |
350 | extern int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size); | ||
350 | #endif | 351 | #endif |
351 | #ifndef platform_pci_legacy_write | 352 | #ifndef platform_pci_legacy_write |
352 | # define platform_pci_legacy_write ia64_pci_legacy_write | 353 | # define platform_pci_legacy_write ia64_pci_legacy_write |
354 | extern int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size); | ||
353 | #endif | 355 | #endif |
354 | #ifndef platform_inb | 356 | #ifndef platform_inb |
355 | # define platform_inb __ia64_inb | 357 | # define platform_inb __ia64_inb |
diff --git a/include/asm-ia64/sn/sn2/sn_hwperf.h b/include/asm-ia64/sn/sn2/sn_hwperf.h index 291ef3d69da2..e61ebac38cdd 100644 --- a/include/asm-ia64/sn/sn2/sn_hwperf.h +++ b/include/asm-ia64/sn/sn2/sn_hwperf.h | |||
@@ -45,8 +45,12 @@ struct sn_hwperf_object_info { | |||
45 | #define SN_HWPERF_IS_NODE(x) ((x) && strstr((x)->name, "SHub")) | 45 | #define SN_HWPERF_IS_NODE(x) ((x) && strstr((x)->name, "SHub")) |
46 | #define SN_HWPERF_IS_NODE_SHUB2(x) ((x) && strstr((x)->name, "SHub 2.")) | 46 | #define SN_HWPERF_IS_NODE_SHUB2(x) ((x) && strstr((x)->name, "SHub 2.")) |
47 | #define SN_HWPERF_IS_IONODE(x) ((x) && strstr((x)->name, "TIO")) | 47 | #define SN_HWPERF_IS_IONODE(x) ((x) && strstr((x)->name, "TIO")) |
48 | #define SN_HWPERF_IS_ROUTER(x) ((x) && strstr((x)->name, "Router")) | ||
49 | #define SN_HWPERF_IS_NL3ROUTER(x) ((x) && strstr((x)->name, "NL3Router")) | 48 | #define SN_HWPERF_IS_NL3ROUTER(x) ((x) && strstr((x)->name, "NL3Router")) |
49 | #define SN_HWPERF_IS_NL4ROUTER(x) ((x) && strstr((x)->name, "NL4Router")) | ||
50 | #define SN_HWPERF_IS_OLDROUTER(x) ((x) && strstr((x)->name, "Router")) | ||
51 | #define SN_HWPERF_IS_ROUTER(x) (SN_HWPERF_IS_NL3ROUTER(x) || \ | ||
52 | SN_HWPERF_IS_NL4ROUTER(x) || \ | ||
53 | SN_HWPERF_IS_OLDROUTER(x)) | ||
50 | #define SN_HWPERF_FOREIGN(x) ((x) && !(x)->sn_hwp_this_part && !(x)->sn_hwp_is_shared) | 54 | #define SN_HWPERF_FOREIGN(x) ((x) && !(x)->sn_hwp_this_part && !(x)->sn_hwp_is_shared) |
51 | #define SN_HWPERF_SAME_OBJTYPE(x,y) ((SN_HWPERF_IS_NODE(x) && SN_HWPERF_IS_NODE(y)) ||\ | 55 | #define SN_HWPERF_SAME_OBJTYPE(x,y) ((SN_HWPERF_IS_NODE(x) && SN_HWPERF_IS_NODE(y)) ||\ |
52 | (SN_HWPERF_IS_IONODE(x) && SN_HWPERF_IS_IONODE(y)) ||\ | 56 | (SN_HWPERF_IS_IONODE(x) && SN_HWPERF_IS_IONODE(y)) ||\ |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index bf4cc867a698..51aca022cf39 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * License. See the file "COPYING" in the main directory of this archive | 8 | * License. See the file "COPYING" in the main directory of this archive |
9 | * for more details. | 9 | * for more details. |
10 | * | 10 | * |
11 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All rights reserved. | 11 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All rights reserved. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | 14 | ||
@@ -85,6 +85,7 @@ | |||
85 | 85 | ||
86 | #define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 | 86 | #define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 |
87 | #define SN_SAL_SET_OS_FEATURE_SET 0x02000066 | 87 | #define SN_SAL_SET_OS_FEATURE_SET 0x02000066 |
88 | #define SN_SAL_INJECT_ERROR 0x02000067 | ||
88 | 89 | ||
89 | /* | 90 | /* |
90 | * Service-specific constants | 91 | * Service-specific constants |
@@ -705,10 +706,8 @@ static inline int | |||
705 | sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) | 706 | sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) |
706 | { | 707 | { |
707 | struct ia64_sal_retval ret_stuff; | 708 | struct ia64_sal_retval ret_stuff; |
708 | int cnodeid; | ||
709 | unsigned long irq_flags; | 709 | unsigned long irq_flags; |
710 | 710 | ||
711 | cnodeid = nasid_to_cnodeid(get_node_number(paddr)); | ||
712 | local_irq_save(irq_flags); | 711 | local_irq_save(irq_flags); |
713 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, | 712 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, |
714 | (u64)nasid_array, perms, 0, 0, 0); | 713 | (u64)nasid_array, perms, 0, 0, 0); |
@@ -1140,4 +1139,16 @@ ia64_sn_set_os_feature(int feature) | |||
1140 | return rv.status; | 1139 | return rv.status; |
1141 | } | 1140 | } |
1142 | 1141 | ||
1142 | static inline int | ||
1143 | sn_inject_error(u64 paddr, u64 *data, u64 *ecc) | ||
1144 | { | ||
1145 | struct ia64_sal_retval ret_stuff; | ||
1146 | unsigned long irq_flags; | ||
1147 | |||
1148 | local_irq_save(irq_flags); | ||
1149 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_INJECT_ERROR, paddr, (u64)data, | ||
1150 | (u64)ecc, 0, 0, 0, 0); | ||
1151 | local_irq_restore(irq_flags); | ||
1152 | return ret_stuff.status; | ||
1153 | } | ||
1143 | #endif /* _ASM_IA64_SN_SN_SAL_H */ | 1154 | #endif /* _ASM_IA64_SN_SN_SAL_H */ |
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index 56394a2c7055..e5392c4d30c6 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -67,7 +67,7 @@ struct thread_info { | |||
67 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) | 67 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) |
68 | 68 | ||
69 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR | 69 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR |
70 | #define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER)) | 70 | #define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) |
71 | #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) | 71 | #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) |
72 | 72 | ||
73 | #endif /* !__ASSEMBLY */ | 73 | #endif /* !__ASSEMBLY */ |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 3ee19dfa46df..616b5ed2aa72 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -23,6 +23,11 @@ | |||
23 | #define PENALTY_FOR_NODE_WITH_CPUS 255 | 23 | #define PENALTY_FOR_NODE_WITH_CPUS 255 |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * Distance above which we begin to use zone reclaim | ||
27 | */ | ||
28 | #define RECLAIM_DISTANCE 15 | ||
29 | |||
30 | /* | ||
26 | * Returns the number of the node containing CPU 'cpu' | 31 | * Returns the number of the node containing CPU 'cpu' |
27 | */ | 32 | */ |
28 | #define cpu_to_node(cpu) (int)(cpu_to_node_map[cpu]) | 33 | #define cpu_to_node(cpu) (int)(cpu_to_node_map[cpu]) |
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index a40ebec6aeeb..7107763168bf 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
@@ -290,12 +290,13 @@ | |||
290 | #define __NR_get_robust_list 1299 | 290 | #define __NR_get_robust_list 1299 |
291 | #define __NR_sync_file_range 1300 | 291 | #define __NR_sync_file_range 1300 |
292 | #define __NR_tee 1301 | 292 | #define __NR_tee 1301 |
293 | #define __NR_vmsplice 1302 | ||
293 | 294 | ||
294 | #ifdef __KERNEL__ | 295 | #ifdef __KERNEL__ |
295 | 296 | ||
296 | #include <linux/config.h> | 297 | #include <linux/config.h> |
297 | 298 | ||
298 | #define NR_syscalls 278 /* length of syscall table */ | 299 | #define NR_syscalls 279 /* length of syscall table */ |
299 | 300 | ||
300 | #define __ARCH_WANT_SYS_RT_SIGACTION | 301 | #define __ARCH_WANT_SYS_RT_SIGACTION |
301 | 302 | ||
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index a1728f8c0705..d2f444537e4b 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -467,64 +467,56 @@ static inline unsigned long __ffs(unsigned long word) | |||
467 | } | 467 | } |
468 | 468 | ||
469 | /* | 469 | /* |
470 | * ffs - find first bit set. | 470 | * fls - find last bit set. |
471 | * @word: The word to search | 471 | * @word: The word to search |
472 | * | 472 | * |
473 | * Returns 1..SZLONG | 473 | * This is defined the same way as ffs. |
474 | * Returns 0 if no bit exists | 474 | * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. |
475 | */ | 475 | */ |
476 | 476 | static inline int fls(int word) | |
477 | static inline unsigned long ffs(unsigned long word) | ||
478 | { | 477 | { |
479 | if (!word) | 478 | __asm__ ("clz %0, %1" : "=r" (word) : "r" (word)); |
480 | return 0; | ||
481 | 479 | ||
482 | return __ffs(word) + 1; | 480 | return 32 - word; |
483 | } | 481 | } |
484 | 482 | ||
485 | /* | 483 | #if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPS64) |
486 | * ffz - find first zero in word. | 484 | static inline int fls64(__u64 word) |
487 | * @word: The word to search | ||
488 | * | ||
489 | * Undefined if no zero exists, so code should check against ~0UL first. | ||
490 | */ | ||
491 | static inline unsigned long ffz(unsigned long word) | ||
492 | { | 485 | { |
493 | return __ffs (~word); | 486 | __asm__ ("dclz %0, %1" : "=r" (word) : "r" (word)); |
487 | |||
488 | return 64 - word; | ||
494 | } | 489 | } |
490 | #else | ||
491 | #include <asm-generic/bitops/fls64.h> | ||
492 | #endif | ||
495 | 493 | ||
496 | /* | 494 | /* |
497 | * fls - find last bit set. | 495 | * ffs - find first bit set. |
498 | * @word: The word to search | 496 | * @word: The word to search |
499 | * | 497 | * |
500 | * Returns 1..SZLONG | 498 | * This is defined the same way as |
501 | * Returns 0 if no bit exists | 499 | * the libc and compiler builtin ffs routines, therefore |
500 | * differs in spirit from the above ffz (man ffs). | ||
502 | */ | 501 | */ |
503 | static inline unsigned long fls(unsigned long word) | 502 | static inline int ffs(int word) |
504 | { | 503 | { |
505 | #ifdef CONFIG_CPU_MIPS32 | 504 | if (!word) |
506 | __asm__ ("clz %0, %1" : "=r" (word) : "r" (word)); | 505 | return 0; |
507 | |||
508 | return 32 - word; | ||
509 | #endif | ||
510 | |||
511 | #ifdef CONFIG_CPU_MIPS64 | ||
512 | __asm__ ("dclz %0, %1" : "=r" (word) : "r" (word)); | ||
513 | 506 | ||
514 | return 64 - word; | 507 | return fls(word & -word); |
515 | #endif | ||
516 | } | 508 | } |
517 | 509 | ||
518 | #else | 510 | #else |
519 | 511 | ||
520 | #include <asm-generic/bitops/__ffs.h> | 512 | #include <asm-generic/bitops/__ffs.h> |
521 | #include <asm-generic/bitops/ffs.h> | 513 | #include <asm-generic/bitops/ffs.h> |
522 | #include <asm-generic/bitops/ffz.h> | ||
523 | #include <asm-generic/bitops/fls.h> | 514 | #include <asm-generic/bitops/fls.h> |
515 | #include <asm-generic/bitops/fls64.h> | ||
524 | 516 | ||
525 | #endif /*defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) */ | 517 | #endif /*defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) */ |
526 | 518 | ||
527 | #include <asm-generic/bitops/fls64.h> | 519 | #include <asm-generic/bitops/ffz.h> |
528 | #include <asm-generic/bitops/find.h> | 520 | #include <asm-generic/bitops/find.h> |
529 | 521 | ||
530 | #ifdef __KERNEL__ | 522 | #ifdef __KERNEL__ |
diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h index 25b6ffc26623..fa8b913cc3e0 100644 --- a/include/asm-mips/mips-boards/generic.h +++ b/include/asm-mips/mips-boards/generic.h | |||
@@ -67,6 +67,7 @@ | |||
67 | #define MIPS_REVISION_CORID_CORE_FPGA2 7 | 67 | #define MIPS_REVISION_CORID_CORE_FPGA2 7 |
68 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 | 68 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 |
69 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 | 69 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 |
70 | #define MIPS_REVISION_CORID_CORE_24K 10 | ||
70 | 71 | ||
71 | /**** Artificial corid defines ****/ | 72 | /**** Artificial corid defines ****/ |
72 | /* | 73 | /* |
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index 29da31194b91..244f6b8883f4 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -126,24 +126,17 @@ static inline void gsc_writeq(unsigned long long val, unsigned long addr) | |||
126 | 126 | ||
127 | extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); | 127 | extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); |
128 | 128 | ||
129 | extern inline void __iomem * ioremap(unsigned long offset, unsigned long size) | 129 | /* Most machines react poorly to I/O-space being cacheable... Instead let's |
130 | { | 130 | * define ioremap() in terms of ioremap_nocache(). |
131 | return __ioremap(offset, size, 0); | ||
132 | } | ||
133 | |||
134 | /* | ||
135 | * This one maps high address device memory and turns off caching for that area. | ||
136 | * it's useful if some control registers are in such an area and write combining | ||
137 | * or read caching is not desirable: | ||
138 | */ | 131 | */ |
139 | extern inline void * ioremap_nocache(unsigned long offset, unsigned long size) | 132 | extern inline void __iomem * ioremap(unsigned long offset, unsigned long size) |
140 | { | 133 | { |
141 | return __ioremap(offset, size, _PAGE_NO_CACHE /* _PAGE_PCD */); | 134 | return __ioremap(offset, size, _PAGE_NO_CACHE); |
142 | } | 135 | } |
136 | #define ioremap_nocache(off, sz) ioremap((off), (sz)) | ||
143 | 137 | ||
144 | extern void iounmap(void __iomem *addr); | 138 | extern void iounmap(void __iomem *addr); |
145 | 139 | ||
146 | |||
147 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) | 140 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) |
148 | { | 141 | { |
149 | return (*(volatile unsigned char __force *) (addr)); | 142 | return (*(volatile unsigned char __force *) (addr)); |
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 45e02aa5bf4b..c0dd461fb8f1 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -1,13 +1,30 @@ | |||
1 | #ifndef _PARISC_PAGE_H | 1 | #ifndef _PARISC_PAGE_H |
2 | #define _PARISC_PAGE_H | 2 | #define _PARISC_PAGE_H |
3 | 3 | ||
4 | /* PAGE_SHIFT determines the page size */ | 4 | #if !defined(__KERNEL__) |
5 | #define PAGE_SHIFT 12 | 5 | /* this is for userspace applications (4k page size) */ |
6 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 6 | # define PAGE_SHIFT 12 /* 4k */ |
7 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 7 | # define PAGE_SIZE (1UL << PAGE_SHIFT) |
8 | # define PAGE_MASK (~(PAGE_SIZE-1)) | ||
9 | #endif | ||
10 | |||
8 | 11 | ||
9 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
10 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | |||
15 | #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) | ||
16 | # define PAGE_SHIFT 12 /* 4k */ | ||
17 | #elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) | ||
18 | # define PAGE_SHIFT 14 /* 16k */ | ||
19 | #elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) | ||
20 | # define PAGE_SHIFT 16 /* 64k */ | ||
21 | #else | ||
22 | # error "unknown default kernel page size" | ||
23 | #endif | ||
24 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | ||
25 | #define PAGE_MASK (~(PAGE_SIZE-1)) | ||
26 | |||
27 | |||
11 | #ifndef __ASSEMBLY__ | 28 | #ifndef __ASSEMBLY__ |
12 | 29 | ||
13 | #include <asm/types.h> | 30 | #include <asm/types.h> |
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index 4e34c6b44059..aec089eb8b85 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
@@ -59,16 +59,15 @@ | |||
59 | #define ISTACK_SIZE 32768 /* Interrupt Stack Size */ | 59 | #define ISTACK_SIZE 32768 /* Interrupt Stack Size */ |
60 | #define ISTACK_ORDER 3 | 60 | #define ISTACK_ORDER 3 |
61 | 61 | ||
62 | /* This is the size of the initially mapped kernel memory (i.e. currently | 62 | /* This is the size of the initially mapped kernel memory */ |
63 | * 0 to 1<<23 == 8MB */ | ||
64 | #ifdef CONFIG_64BIT | 63 | #ifdef CONFIG_64BIT |
65 | #define KERNEL_INITIAL_ORDER 24 | 64 | #define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ |
66 | #else | 65 | #else |
67 | #define KERNEL_INITIAL_ORDER 23 | 66 | #define KERNEL_INITIAL_ORDER 23 /* 0 to 1<<23 = 8MB */ |
68 | #endif | 67 | #endif |
69 | #define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) | 68 | #define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) |
70 | 69 | ||
71 | #ifdef CONFIG_64BIT | 70 | #if defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB) |
72 | #define PT_NLEVELS 3 | 71 | #define PT_NLEVELS 3 |
73 | #define PGD_ORDER 1 /* Number of pages per pgd */ | 72 | #define PGD_ORDER 1 /* Number of pages per pgd */ |
74 | #define PMD_ORDER 1 /* Number of pages per pmd */ | 73 | #define PMD_ORDER 1 /* Number of pages per pmd */ |
@@ -111,11 +110,15 @@ | |||
111 | #define MAX_ADDRBITS (PGDIR_SHIFT + BITS_PER_PGD) | 110 | #define MAX_ADDRBITS (PGDIR_SHIFT + BITS_PER_PGD) |
112 | #define MAX_ADDRESS (1UL << MAX_ADDRBITS) | 111 | #define MAX_ADDRESS (1UL << MAX_ADDRBITS) |
113 | 112 | ||
114 | #define SPACEID_SHIFT (MAX_ADDRBITS - 32) | 113 | #define SPACEID_SHIFT (MAX_ADDRBITS - 32) |
115 | 114 | ||
116 | /* This calculates the number of initial pages we need for the initial | 115 | /* This calculates the number of initial pages we need for the initial |
117 | * page tables */ | 116 | * page tables */ |
118 | #define PT_INITIAL (1 << (KERNEL_INITIAL_ORDER - PMD_SHIFT)) | 117 | #if (KERNEL_INITIAL_ORDER) >= (PMD_SHIFT) |
118 | # define PT_INITIAL (1 << (KERNEL_INITIAL_ORDER - PMD_SHIFT)) | ||
119 | #else | ||
120 | # define PT_INITIAL (1) /* all initial PTEs fit into one page */ | ||
121 | #endif | ||
119 | 122 | ||
120 | /* | 123 | /* |
121 | * pgd entries used up by user/kernel: | 124 | * pgd entries used up by user/kernel: |
@@ -160,6 +163,10 @@ extern void *vmalloc_start; | |||
160 | * to zero */ | 163 | * to zero */ |
161 | #define PTE_SHIFT xlate_pabit(_PAGE_USER_BIT) | 164 | #define PTE_SHIFT xlate_pabit(_PAGE_USER_BIT) |
162 | 165 | ||
166 | /* PFN_PTE_SHIFT defines the shift of a PTE value to access the PFN field */ | ||
167 | #define PFN_PTE_SHIFT 12 | ||
168 | |||
169 | |||
163 | /* this is how many bits may be used by the file functions */ | 170 | /* this is how many bits may be used by the file functions */ |
164 | #define PTE_FILE_MAX_BITS (BITS_PER_LONG - PTE_SHIFT) | 171 | #define PTE_FILE_MAX_BITS (BITS_PER_LONG - PTE_SHIFT) |
165 | 172 | ||
@@ -188,7 +195,8 @@ extern void *vmalloc_start; | |||
188 | /* The pgd/pmd contains a ptr (in phys addr space); since all pgds/pmds | 195 | /* The pgd/pmd contains a ptr (in phys addr space); since all pgds/pmds |
189 | * are page-aligned, we don't care about the PAGE_OFFSET bits, except | 196 | * are page-aligned, we don't care about the PAGE_OFFSET bits, except |
190 | * for a few meta-information bits, so we shift the address to be | 197 | * for a few meta-information bits, so we shift the address to be |
191 | * able to effectively address 40-bits of physical address space. */ | 198 | * able to effectively address 40/42/44-bits of physical address space |
199 | * depending on 4k/16k/64k PAGE_SIZE */ | ||
192 | #define _PxD_PRESENT_BIT 31 | 200 | #define _PxD_PRESENT_BIT 31 |
193 | #define _PxD_ATTACHED_BIT 30 | 201 | #define _PxD_ATTACHED_BIT 30 |
194 | #define _PxD_VALID_BIT 29 | 202 | #define _PxD_VALID_BIT 29 |
@@ -198,7 +206,7 @@ extern void *vmalloc_start; | |||
198 | #define PxD_FLAG_VALID (1 << xlate_pabit(_PxD_VALID_BIT)) | 206 | #define PxD_FLAG_VALID (1 << xlate_pabit(_PxD_VALID_BIT)) |
199 | #define PxD_FLAG_MASK (0xf) | 207 | #define PxD_FLAG_MASK (0xf) |
200 | #define PxD_FLAG_SHIFT (4) | 208 | #define PxD_FLAG_SHIFT (4) |
201 | #define PxD_VALUE_SHIFT (8) | 209 | #define PxD_VALUE_SHIFT (8) /* (PAGE_SHIFT-PxD_FLAG_SHIFT) */ |
202 | 210 | ||
203 | #ifndef __ASSEMBLY__ | 211 | #ifndef __ASSEMBLY__ |
204 | 212 | ||
@@ -246,6 +254,7 @@ extern void *vmalloc_start; | |||
246 | #define __S110 PAGE_RWX | 254 | #define __S110 PAGE_RWX |
247 | #define __S111 PAGE_RWX | 255 | #define __S111 PAGE_RWX |
248 | 256 | ||
257 | |||
249 | extern pgd_t swapper_pg_dir[]; /* declared in init_task.c */ | 258 | extern pgd_t swapper_pg_dir[]; /* declared in init_task.c */ |
250 | 259 | ||
251 | /* initial page tables for 0-8MB for kernel */ | 260 | /* initial page tables for 0-8MB for kernel */ |
@@ -272,7 +281,7 @@ extern unsigned long *empty_zero_page; | |||
272 | #define pgd_flag(x) (pgd_val(x) & PxD_FLAG_MASK) | 281 | #define pgd_flag(x) (pgd_val(x) & PxD_FLAG_MASK) |
273 | #define pgd_address(x) ((unsigned long)(pgd_val(x) &~ PxD_FLAG_MASK) << PxD_VALUE_SHIFT) | 282 | #define pgd_address(x) ((unsigned long)(pgd_val(x) &~ PxD_FLAG_MASK) << PxD_VALUE_SHIFT) |
274 | 283 | ||
275 | #ifdef CONFIG_64BIT | 284 | #if PT_NLEVELS == 3 |
276 | /* The first entry of the permanent pmd is not there if it contains | 285 | /* The first entry of the permanent pmd is not there if it contains |
277 | * the gateway marker */ | 286 | * the gateway marker */ |
278 | #define pmd_none(x) (!pmd_val(x) || pmd_flag(x) == PxD_FLAG_ATTACHED) | 287 | #define pmd_none(x) (!pmd_val(x) || pmd_flag(x) == PxD_FLAG_ATTACHED) |
@@ -282,7 +291,7 @@ extern unsigned long *empty_zero_page; | |||
282 | #define pmd_bad(x) (!(pmd_flag(x) & PxD_FLAG_VALID)) | 291 | #define pmd_bad(x) (!(pmd_flag(x) & PxD_FLAG_VALID)) |
283 | #define pmd_present(x) (pmd_flag(x) & PxD_FLAG_PRESENT) | 292 | #define pmd_present(x) (pmd_flag(x) & PxD_FLAG_PRESENT) |
284 | static inline void pmd_clear(pmd_t *pmd) { | 293 | static inline void pmd_clear(pmd_t *pmd) { |
285 | #ifdef CONFIG_64BIT | 294 | #if PT_NLEVELS == 3 |
286 | if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) | 295 | if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) |
287 | /* This is the entry pointing to the permanent pmd | 296 | /* This is the entry pointing to the permanent pmd |
288 | * attached to the pgd; cannot clear it */ | 297 | * attached to the pgd; cannot clear it */ |
@@ -303,7 +312,7 @@ static inline void pmd_clear(pmd_t *pmd) { | |||
303 | #define pgd_bad(x) (!(pgd_flag(x) & PxD_FLAG_VALID)) | 312 | #define pgd_bad(x) (!(pgd_flag(x) & PxD_FLAG_VALID)) |
304 | #define pgd_present(x) (pgd_flag(x) & PxD_FLAG_PRESENT) | 313 | #define pgd_present(x) (pgd_flag(x) & PxD_FLAG_PRESENT) |
305 | static inline void pgd_clear(pgd_t *pgd) { | 314 | static inline void pgd_clear(pgd_t *pgd) { |
306 | #ifdef CONFIG_64BIT | 315 | #if PT_NLEVELS == 3 |
307 | if(pgd_flag(*pgd) & PxD_FLAG_ATTACHED) | 316 | if(pgd_flag(*pgd) & PxD_FLAG_ATTACHED) |
308 | /* This is the permanent pmd attached to the pgd; cannot | 317 | /* This is the permanent pmd attached to the pgd; cannot |
309 | * free it */ | 318 | * free it */ |
@@ -351,7 +360,7 @@ extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return | |||
351 | ({ \ | 360 | ({ \ |
352 | pte_t __pte; \ | 361 | pte_t __pte; \ |
353 | \ | 362 | \ |
354 | pte_val(__pte) = ((addr)+pgprot_val(pgprot)); \ | 363 | pte_val(__pte) = ((((addr)>>PAGE_SHIFT)<<PFN_PTE_SHIFT) + pgprot_val(pgprot)); \ |
355 | \ | 364 | \ |
356 | __pte; \ | 365 | __pte; \ |
357 | }) | 366 | }) |
@@ -361,20 +370,16 @@ extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return | |||
361 | static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) | 370 | static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) |
362 | { | 371 | { |
363 | pte_t pte; | 372 | pte_t pte; |
364 | pte_val(pte) = (pfn << PAGE_SHIFT) | pgprot_val(pgprot); | 373 | pte_val(pte) = (pfn << PFN_PTE_SHIFT) | pgprot_val(pgprot); |
365 | return pte; | 374 | return pte; |
366 | } | 375 | } |
367 | 376 | ||
368 | /* This takes a physical page address that is used by the remapping functions */ | ||
369 | #define mk_pte_phys(physpage, pgprot) \ | ||
370 | ({ pte_t __pte; pte_val(__pte) = physpage + pgprot_val(pgprot); __pte; }) | ||
371 | |||
372 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 377 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
373 | { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } | 378 | { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } |
374 | 379 | ||
375 | /* Permanent address of a page. On parisc we don't have highmem. */ | 380 | /* Permanent address of a page. On parisc we don't have highmem. */ |
376 | 381 | ||
377 | #define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT) | 382 | #define pte_pfn(x) (pte_val(x) >> PFN_PTE_SHIFT) |
378 | 383 | ||
379 | #define pte_page(pte) (pfn_to_page(pte_pfn(pte))) | 384 | #define pte_page(pte) (pfn_to_page(pte_pfn(pte))) |
380 | 385 | ||
@@ -499,6 +504,26 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
499 | 504 | ||
500 | #endif /* !__ASSEMBLY__ */ | 505 | #endif /* !__ASSEMBLY__ */ |
501 | 506 | ||
507 | |||
508 | /* TLB page size encoding - see table 3-1 in parisc20.pdf */ | ||
509 | #define _PAGE_SIZE_ENCODING_4K 0 | ||
510 | #define _PAGE_SIZE_ENCODING_16K 1 | ||
511 | #define _PAGE_SIZE_ENCODING_64K 2 | ||
512 | #define _PAGE_SIZE_ENCODING_256K 3 | ||
513 | #define _PAGE_SIZE_ENCODING_1M 4 | ||
514 | #define _PAGE_SIZE_ENCODING_4M 5 | ||
515 | #define _PAGE_SIZE_ENCODING_16M 6 | ||
516 | #define _PAGE_SIZE_ENCODING_64M 7 | ||
517 | |||
518 | #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) | ||
519 | # define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_4K | ||
520 | #elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) | ||
521 | # define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_16K | ||
522 | #elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) | ||
523 | # define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_64K | ||
524 | #endif | ||
525 | |||
526 | |||
502 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 527 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
503 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 528 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
504 | 529 | ||
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index c56fccbf34ad..0e1a30be2e30 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -780,8 +780,14 @@ | |||
780 | #define __NR_readlinkat (__NR_Linux + 285) | 780 | #define __NR_readlinkat (__NR_Linux + 285) |
781 | #define __NR_fchmodat (__NR_Linux + 286) | 781 | #define __NR_fchmodat (__NR_Linux + 286) |
782 | #define __NR_faccessat (__NR_Linux + 287) | 782 | #define __NR_faccessat (__NR_Linux + 287) |
783 | #define __NR_unshare (__NR_Linux + 288) | ||
784 | #define __NR_set_robust_list (__NR_Linux + 289) | ||
785 | #define __NR_get_robust_list (__NR_Linux + 290) | ||
786 | #define __NR_splice (__NR_Linux + 291) | ||
787 | #define __NR_sync_file_range (__NR_Linux + 292) | ||
788 | #define __NR_tee (__NR_Linux + 293) | ||
783 | 789 | ||
784 | #define __NR_Linux_syscalls 288 | 790 | #define __NR_Linux_syscalls 294 |
785 | 791 | ||
786 | #define HPUX_GATEWAY_ADDR 0xC0000004 | 792 | #define HPUX_GATEWAY_ADDR 0xC0000004 |
787 | #define LINUX_GATEWAY_ADDR 0x100 | 793 | #define LINUX_GATEWAY_ADDR 0x100 |
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 4840fbf89c32..a9496f34b048 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 |
@@ -431,9 +434,6 @@ out: | |||
431 | #define dma_cache_wback(_start,_size) do { } while (0) | 434 | #define dma_cache_wback(_start,_size) do { } while (0) |
432 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | 435 | #define dma_cache_wback_inv(_start,_size) do { } while (0) |
433 | 436 | ||
434 | /* Check of existence of legacy devices */ | ||
435 | extern int check_legacy_ioport(unsigned long base_port); | ||
436 | |||
437 | 437 | ||
438 | /* | 438 | /* |
439 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 439 | * 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/unistd.h b/include/asm-powerpc/unistd.h index c612f1a62772..908acb44cb8a 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
@@ -303,8 +303,26 @@ | |||
303 | #define __NR_unshare 282 | 303 | #define __NR_unshare 282 |
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 | ||
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 | ||
306 | 324 | ||
307 | #define __NR_syscalls 285 | 325 | #define __NR_syscalls 299 |
308 | 326 | ||
309 | #ifdef __KERNEL__ | 327 | #ifdef __KERNEL__ |
310 | #define __NR__exit __NR_exit | 328 | #define __NR__exit __NR_exit |
@@ -457,6 +475,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 | |||
457 | #ifdef CONFIG_PPC64 | 475 | #ifdef CONFIG_PPC64 |
458 | #define __ARCH_WANT_COMPAT_SYS_TIME | 476 | #define __ARCH_WANT_COMPAT_SYS_TIME |
459 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | 477 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
478 | #define __ARCH_WANT_SYS_NEWFSTATAT | ||
460 | #endif | 479 | #endif |
461 | 480 | ||
462 | /* | 481 | /* |
diff --git a/include/asm-ppc/ppc_sys.h b/include/asm-ppc/ppc_sys.h index 4b94f7059ebe..40f197af6508 100644 --- a/include/asm-ppc/ppc_sys.h +++ b/include/asm-ppc/ppc_sys.h | |||
@@ -39,6 +39,8 @@ | |||
39 | #error "need definition of ppc_sys_devices" | 39 | #error "need definition of ppc_sys_devices" |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #define PPC_SYS_IORESOURCE_FIXUPPED 0x00000001 | ||
43 | |||
42 | struct ppc_sys_spec { | 44 | struct ppc_sys_spec { |
43 | /* PPC sys is matched via (ID & mask) == value, id could be | 45 | /* PPC sys is matched via (ID & mask) == value, id could be |
44 | * PVR, SVR, IMMR, * etc. */ | 46 | * PVR, SVR, IMMR, * etc. */ |
diff --git a/include/asm-ppc/reg_booke.h b/include/asm-ppc/reg_booke.h index 00ad9c754c78..4944c0fb8bea 100644 --- a/include/asm-ppc/reg_booke.h +++ b/include/asm-ppc/reg_booke.h | |||
@@ -237,6 +237,7 @@ do { \ | |||
237 | #endif | 237 | #endif |
238 | 238 | ||
239 | /* Bit definitions for CCR1. */ | 239 | /* Bit definitions for CCR1. */ |
240 | #define CCR1_DPC 0x00000100 /* Disable L1 I-Cache/D-Cache parity checking */ | ||
240 | #define CCR1_TCS 0x00000080 /* Timer Clock Select */ | 241 | #define CCR1_TCS 0x00000080 /* Timer Clock Select */ |
241 | 242 | ||
242 | /* Bit definitions for the MCSR. */ | 243 | /* Bit definitions for the MCSR. */ |
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 45feff893b8e..32a48f623e2b 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -271,7 +271,7 @@ | |||
271 | #define __NR_getsid 252 | 271 | #define __NR_getsid 252 |
272 | #define __NR_fdatasync 253 | 272 | #define __NR_fdatasync 253 |
273 | #define __NR_nfsservctl 254 | 273 | #define __NR_nfsservctl 254 |
274 | #define __NR_sys_sync_file_range 255 | 274 | #define __NR_sync_file_range 255 |
275 | #define __NR_clock_settime 256 | 275 | #define __NR_clock_settime 256 |
276 | #define __NR_clock_gettime 257 | 276 | #define __NR_clock_gettime 257 |
277 | #define __NR_clock_getres 258 | 277 | #define __NR_clock_getres 258 |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 597f6923a46e..ca80e8aca128 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -273,7 +273,7 @@ | |||
273 | #define __NR_getsid 252 | 273 | #define __NR_getsid 252 |
274 | #define __NR_fdatasync 253 | 274 | #define __NR_fdatasync 253 |
275 | #define __NR_nfsservctl 254 | 275 | #define __NR_nfsservctl 254 |
276 | #define __NR_sys_sync_file_range 255 | 276 | #define __NR_sync_file_range 255 |
277 | #define __NR_clock_settime 256 | 277 | #define __NR_clock_settime 256 |
278 | #define __NR_clock_gettime 257 | 278 | #define __NR_clock_gettime 257 |
279 | #define __NR_clock_getres 258 | 279 | #define __NR_clock_getres 258 |
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 98c36eae567c..feb77cb8c044 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -615,8 +615,10 @@ __SYSCALL(__NR_splice, sys_splice) | |||
615 | __SYSCALL(__NR_tee, sys_tee) | 615 | __SYSCALL(__NR_tee, sys_tee) |
616 | #define __NR_sync_file_range 277 | 616 | #define __NR_sync_file_range 277 |
617 | __SYSCALL(__NR_sync_file_range, sys_sync_file_range) | 617 | __SYSCALL(__NR_sync_file_range, sys_sync_file_range) |
618 | #define __NR_vmsplice 278 | ||
619 | __SYSCALL(__NR_vmsplice, sys_vmsplice) | ||
618 | 620 | ||
619 | #define __NR_syscall_max __NR_sync_file_range | 621 | #define __NR_syscall_max __NR_vmsplice |
620 | 622 | ||
621 | #ifndef __NO_STUBS | 623 | #ifndef __NO_STUBS |
622 | 624 | ||
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 176e2d371577..047567d34ca7 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -58,9 +58,8 @@ struct dentry *debugfs_create_blob(const char *name, mode_t mode, | |||
58 | */ | 58 | */ |
59 | 59 | ||
60 | static inline struct dentry *debugfs_create_file(const char *name, mode_t mode, | 60 | static inline struct dentry *debugfs_create_file(const char *name, mode_t mode, |
61 | struct dentry *parent, | 61 | struct dentry *parent, void *data, |
62 | void *data, | 62 | const struct file_operations *fops) |
63 | struct file_operations *fops) | ||
64 | { | 63 | { |
65 | return ERR_PTR(-ENODEV); | 64 | return ERR_PTR(-ENODEV); |
66 | } | 65 | } |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index dcd0623be892..c187c53cecd0 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -257,9 +257,8 @@ struct subsys_attribute { | |||
257 | }; | 257 | }; |
258 | 258 | ||
259 | extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); | 259 | extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); |
260 | extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *); | ||
261 | 260 | ||
262 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) | 261 | #if defined(CONFIG_HOTPLUG) |
263 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); | 262 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); |
264 | 263 | ||
265 | int add_uevent_var(char **envp, int num_envp, int *cur_index, | 264 | int add_uevent_var(char **envp, int num_envp, int *cur_index, |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 40ccf8cc4239..01db7b88a2b1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -829,19 +829,21 @@ static inline void netif_rx_schedule(struct net_device *dev) | |||
829 | __netif_rx_schedule(dev); | 829 | __netif_rx_schedule(dev); |
830 | } | 830 | } |
831 | 831 | ||
832 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). | 832 | |
833 | * Do not inline this? | 833 | static inline void __netif_rx_reschedule(struct net_device *dev, int undo) |
834 | */ | 834 | { |
835 | dev->quota += undo; | ||
836 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); | ||
837 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
838 | } | ||
839 | |||
840 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */ | ||
835 | static inline int netif_rx_reschedule(struct net_device *dev, int undo) | 841 | static inline int netif_rx_reschedule(struct net_device *dev, int undo) |
836 | { | 842 | { |
837 | if (netif_rx_schedule_prep(dev)) { | 843 | if (netif_rx_schedule_prep(dev)) { |
838 | unsigned long flags; | 844 | unsigned long flags; |
839 | |||
840 | dev->quota += undo; | ||
841 | |||
842 | local_irq_save(flags); | 845 | local_irq_save(flags); |
843 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); | 846 | __netif_rx_reschedule(dev, undo); |
844 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
845 | local_irq_restore(flags); | 847 | local_irq_restore(flags); |
846 | return 1; | 848 | return 1; |
847 | } | 849 | } |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index f6bdef82a322..38701454e197 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -361,7 +361,11 @@ struct compat_xt_entry_target | |||
361 | 361 | ||
362 | struct compat_xt_counters | 362 | struct compat_xt_counters |
363 | { | 363 | { |
364 | #if defined(CONFIG_X86_64) || defined(CONFIG_IA64) | ||
364 | u_int32_t cnt[4]; | 365 | u_int32_t cnt[4]; |
366 | #else | ||
367 | u_int64_t cnt[2]; | ||
368 | #endif | ||
365 | }; | 369 | }; |
366 | 370 | ||
367 | struct compat_xt_counters_info | 371 | struct compat_xt_counters_info |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 9539efd4f7e6..7a1af574dedf 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -78,6 +78,8 @@ extern struct page * find_or_create_page(struct address_space *mapping, | |||
78 | unsigned long index, gfp_t gfp_mask); | 78 | unsigned long index, gfp_t gfp_mask); |
79 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, | 79 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, |
80 | unsigned int nr_pages, struct page **pages); | 80 | unsigned int nr_pages, struct page **pages); |
81 | unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, | ||
82 | unsigned int nr_pages, struct page **pages); | ||
81 | unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, | 83 | unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, |
82 | int tag, unsigned int nr_pages, struct page **pages); | 84 | int tag, unsigned int nr_pages, struct page **pages); |
83 | 85 | ||
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index ef7f33c0be19..0008d4bd4059 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -61,4 +61,21 @@ void __free_pipe_info(struct pipe_inode_info *); | |||
61 | /* from/to, of course */ | 61 | /* from/to, of course */ |
62 | #define SPLICE_F_MORE (0x04) /* expect more data */ | 62 | #define SPLICE_F_MORE (0x04) /* expect more data */ |
63 | 63 | ||
64 | /* | ||
65 | * Passed to the actors | ||
66 | */ | ||
67 | struct splice_desc { | ||
68 | unsigned int len, total_len; /* current and remaining length */ | ||
69 | unsigned int flags; /* splice flags */ | ||
70 | struct file *file; /* file to read/write */ | ||
71 | loff_t pos; /* file position */ | ||
72 | }; | ||
73 | |||
74 | typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *, | ||
75 | struct splice_desc *); | ||
76 | |||
77 | extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
78 | loff_t *, size_t, unsigned int, | ||
79 | splice_actor *); | ||
80 | |||
64 | #endif | 81 | #endif |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index d3ebc0e68b2b..3996960fc565 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -574,6 +574,9 @@ asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, | |||
574 | int fd_out, loff_t __user *off_out, | 574 | int fd_out, loff_t __user *off_out, |
575 | size_t len, unsigned int flags); | 575 | size_t len, unsigned int flags); |
576 | 576 | ||
577 | asmlinkage long sys_vmsplice(int fd, const struct iovec __user *iov, | ||
578 | unsigned long nr_segs, unsigned int flags); | ||
579 | |||
577 | asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); | 580 | asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); |
578 | 581 | ||
579 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | 582 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, |
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h index 6b3693f05ca0..b1ebfbae397f 100644 --- a/include/net/ieee80211softmac.h +++ b/include/net/ieee80211softmac.h | |||
@@ -96,10 +96,13 @@ struct ieee80211softmac_assoc_info { | |||
96 | * | 96 | * |
97 | * bssvalid is true if we found a matching network | 97 | * bssvalid is true if we found a matching network |
98 | * and saved it's BSSID into the bssid above. | 98 | * and saved it's BSSID into the bssid above. |
99 | * | ||
100 | * bssfixed is used for SIOCSIWAP. | ||
99 | */ | 101 | */ |
100 | u8 static_essid:1, | 102 | u8 static_essid:1, |
101 | associating:1, | 103 | associating:1, |
102 | bssvalid:1; | 104 | bssvalid:1, |
105 | bssfixed:1; | ||
103 | 106 | ||
104 | /* Scan retries remaining */ | 107 | /* Scan retries remaining */ |
105 | int scan_retry; | 108 | int scan_retry; |