diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:16:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:16:52 -0500 |
commit | c4888f9ffafe7db107b7eafb3a68eaeeff3779c3 (patch) | |
tree | d30da15f6b5d74c8c04fd92991af5e1615d95691 /include | |
parent | e36aeee65d4db050bd8713537416a0a0632db079 (diff) | |
parent | 688016f4e2028e3c2c27e959ad001536e10ee2c5 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (37 commits)
[POWERPC] EEH: Make sure warning message is printed
[POWERPC] Make altivec code in swsusp_32.S depend on CONFIG_ALTIVEC
[POWERPC] windfarm: Fix windfarm thread freezer interaction
[POWERPC] Fix si_addr value on low level hash failures
[POWERPC] Refresh ppc64_defconfig and enable pasemi-related options
[POWERPC] pasemi: Update defconfig
[POWERPC] iSeries: Fix ref counting in vio setup
[POWERPC] ] Fix memset size error
[POWERPC] Fix link errors for allyesconfig
[POWERPC] iSeries_init_IRQ non-PCI tidy
[POWERPC] Change fallocate to match unistd.h on powerpc
[POWERPC] EEH: Avoid crash on null device
[POWERPC] EEH: Drivers that need reset trump others
[POWERPC] EEH: Clean up comments
[POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)
[POWERPC] Fix switch_slb handling of 1T ESID values
[POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined
[POWERPC] Include udbg.h when using udbg_printf
[POWERPC] Fix cache line vs. block size confusion
[POWERPC] Fix sysctl table check failure on PowerMac
...
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/pgtable-ppc32.h | 13 | ||||
-rw-r--r-- | include/asm-powerpc/systbl.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/time.h | 20 | ||||
-rw-r--r-- | include/asm-powerpc/tlbflush.h | 12 |
4 files changed, 33 insertions, 14 deletions
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 86a54a4a8a2a..fea2d8ff1e73 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -11,6 +11,11 @@ | |||
11 | extern unsigned long va_to_phys(unsigned long address); | 11 | extern unsigned long va_to_phys(unsigned long address); |
12 | extern pte_t *va_to_pte(unsigned long address); | 12 | extern pte_t *va_to_pte(unsigned long address); |
13 | extern unsigned long ioremap_bot, ioremap_base; | 13 | extern unsigned long ioremap_bot, ioremap_base; |
14 | |||
15 | #ifdef CONFIG_44x | ||
16 | extern int icache_44x_need_flush; | ||
17 | #endif | ||
18 | |||
14 | #endif /* __ASSEMBLY__ */ | 19 | #endif /* __ASSEMBLY__ */ |
15 | 20 | ||
16 | /* | 21 | /* |
@@ -562,6 +567,10 @@ static inline unsigned long pte_update(pte_t *p, unsigned long clr, | |||
562 | : "=&r" (old), "=&r" (tmp), "=m" (*p) | 567 | : "=&r" (old), "=&r" (tmp), "=m" (*p) |
563 | : "r" (p), "r" (clr), "r" (set), "m" (*p) | 568 | : "r" (p), "r" (clr), "r" (set), "m" (*p) |
564 | : "cc" ); | 569 | : "cc" ); |
570 | #ifdef CONFIG_44x | ||
571 | if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) | ||
572 | icache_44x_need_flush = 1; | ||
573 | #endif | ||
565 | return old; | 574 | return old; |
566 | } | 575 | } |
567 | #else | 576 | #else |
@@ -582,6 +591,10 @@ static inline unsigned long long pte_update(pte_t *p, unsigned long clr, | |||
582 | : "=&r" (old), "=&r" (tmp), "=m" (*p) | 591 | : "=&r" (old), "=&r" (tmp), "=m" (*p) |
583 | : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) | 592 | : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) |
584 | : "cc" ); | 593 | : "cc" ); |
594 | #ifdef CONFIG_44x | ||
595 | if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) | ||
596 | icache_44x_need_flush = 1; | ||
597 | #endif | ||
585 | return old; | 598 | return old; |
586 | } | 599 | } |
587 | #endif | 600 | #endif |
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index cc6d87228258..11d5383b2f09 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
@@ -308,8 +308,8 @@ COMPAT_SYS_SPU(move_pages) | |||
308 | SYSCALL_SPU(getcpu) | 308 | SYSCALL_SPU(getcpu) |
309 | COMPAT_SYS(epoll_pwait) | 309 | COMPAT_SYS(epoll_pwait) |
310 | COMPAT_SYS_SPU(utimensat) | 310 | COMPAT_SYS_SPU(utimensat) |
311 | COMPAT_SYS(fallocate) | ||
312 | COMPAT_SYS_SPU(signalfd) | 311 | COMPAT_SYS_SPU(signalfd) |
313 | COMPAT_SYS_SPU(timerfd) | 312 | COMPAT_SYS_SPU(timerfd) |
314 | SYSCALL_SPU(eventfd) | 313 | SYSCALL_SPU(eventfd) |
315 | COMPAT_SYS_SPU(sync_file_range2) | 314 | COMPAT_SYS_SPU(sync_file_range2) |
315 | COMPAT_SYS(fallocate) | ||
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index f05895522f7f..780f82642756 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -176,25 +176,31 @@ static inline unsigned int get_dec(void) | |||
176 | #endif | 176 | #endif |
177 | } | 177 | } |
178 | 178 | ||
179 | /* | ||
180 | * Note: Book E and 4xx processors differ from other PowerPC processors | ||
181 | * in when the decrementer generates its interrupt: on the 1 to 0 | ||
182 | * transition for Book E/4xx, but on the 0 to -1 transition for others. | ||
183 | */ | ||
179 | static inline void set_dec(int val) | 184 | static inline void set_dec(int val) |
180 | { | 185 | { |
181 | #if defined(CONFIG_40x) | 186 | #if defined(CONFIG_40x) |
182 | mtspr(SPRN_PIT, val); | 187 | mtspr(SPRN_PIT, val); |
183 | #elif defined(CONFIG_8xx_CPU6) | 188 | #elif defined(CONFIG_8xx_CPU6) |
184 | set_dec_cpu6(val); | 189 | set_dec_cpu6(val - 1); |
185 | #else | 190 | #else |
191 | #ifndef CONFIG_BOOKE | ||
192 | --val; | ||
193 | #endif | ||
186 | #ifdef CONFIG_PPC_ISERIES | 194 | #ifdef CONFIG_PPC_ISERIES |
187 | int cur_dec; | ||
188 | |||
189 | if (firmware_has_feature(FW_FEATURE_ISERIES) && | 195 | if (firmware_has_feature(FW_FEATURE_ISERIES) && |
190 | get_lppaca()->shared_proc) { | 196 | get_lppaca()->shared_proc) { |
191 | get_lppaca()->virtual_decr = val; | 197 | get_lppaca()->virtual_decr = val; |
192 | cur_dec = get_dec(); | 198 | if (get_dec() > val) |
193 | if (cur_dec > val) | ||
194 | HvCall_setVirtualDecr(); | 199 | HvCall_setVirtualDecr(); |
195 | } else | 200 | return; |
201 | } | ||
196 | #endif | 202 | #endif |
197 | mtspr(SPRN_DEC, val); | 203 | mtspr(SPRN_DEC, val); |
198 | #endif /* not 40x or 8xx_CPU6 */ | 204 | #endif /* not 40x or 8xx_CPU6 */ |
199 | } | 205 | } |
200 | 206 | ||
diff --git a/include/asm-powerpc/tlbflush.h b/include/asm-powerpc/tlbflush.h index b6b036ccee34..e7b4c0d298ae 100644 --- a/include/asm-powerpc/tlbflush.h +++ b/include/asm-powerpc/tlbflush.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef _ASM_POWERPC_TLBFLUSH_H | 1 | #ifndef _ASM_POWERPC_TLBFLUSH_H |
2 | #define _ASM_POWERPC_TLBFLUSH_H | 2 | #define _ASM_POWERPC_TLBFLUSH_H |
3 | |||
3 | /* | 4 | /* |
4 | * TLB flushing: | 5 | * TLB flushing: |
5 | * | 6 | * |
@@ -16,9 +17,6 @@ | |||
16 | */ | 17 | */ |
17 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
18 | 19 | ||
19 | struct mm_struct; | ||
20 | struct vm_area_struct; | ||
21 | |||
22 | #if defined(CONFIG_4xx) || defined(CONFIG_8xx) || defined(CONFIG_FSL_BOOKE) | 20 | #if defined(CONFIG_4xx) || defined(CONFIG_8xx) || defined(CONFIG_FSL_BOOKE) |
23 | /* | 21 | /* |
24 | * TLB flushing for software loaded TLB chips | 22 | * TLB flushing for software loaded TLB chips |
@@ -28,7 +26,9 @@ struct vm_area_struct; | |||
28 | * specific tlbie's | 26 | * specific tlbie's |
29 | */ | 27 | */ |
30 | 28 | ||
31 | extern void _tlbie(unsigned long address); | 29 | #include <linux/mm.h> |
30 | |||
31 | extern void _tlbie(unsigned long address, unsigned int pid); | ||
32 | 32 | ||
33 | #if defined(CONFIG_40x) || defined(CONFIG_8xx) | 33 | #if defined(CONFIG_40x) || defined(CONFIG_8xx) |
34 | #define _tlbia() asm volatile ("tlbia; sync" : : : "memory") | 34 | #define _tlbia() asm volatile ("tlbia; sync" : : : "memory") |
@@ -44,13 +44,13 @@ static inline void flush_tlb_mm(struct mm_struct *mm) | |||
44 | static inline void flush_tlb_page(struct vm_area_struct *vma, | 44 | static inline void flush_tlb_page(struct vm_area_struct *vma, |
45 | unsigned long vmaddr) | 45 | unsigned long vmaddr) |
46 | { | 46 | { |
47 | _tlbie(vmaddr); | 47 | _tlbie(vmaddr, vma->vm_mm->context.id); |
48 | } | 48 | } |
49 | 49 | ||
50 | static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, | 50 | static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, |
51 | unsigned long vmaddr) | 51 | unsigned long vmaddr) |
52 | { | 52 | { |
53 | _tlbie(vmaddr); | 53 | _tlbie(vmaddr, vma->vm_mm->context.id); |
54 | } | 54 | } |
55 | 55 | ||
56 | static inline void flush_tlb_range(struct vm_area_struct *vma, | 56 | static inline void flush_tlb_range(struct vm_area_struct *vma, |