diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/pgtable-ppc32.h | 13 | ||||
-rw-r--r-- | include/asm-powerpc/tlbflush.h | 12 |
2 files changed, 19 insertions, 6 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/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, |