diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-10 17:48:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-10 17:48:43 -0400 |
commit | 0f166396e7e8931bb4acfd1a6ea1bd4f0b43f1dd (patch) | |
tree | 6279fa70695a4c56b7e935018a4c0fc1dfa82e68 /arch/mips/mm/tlb-r4k.c | |
parent | 5f60cfd932b42c69ed3226400cb5eab152576c3a (diff) | |
parent | 105b1bca4d7bed85bb296f7e7caec2fc643e9fbf (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (62 commits)
[MIPS] PNX8550: Cleanup proc code.
[MIPS] WRPPMC: Fix build.
[MIPS] Yosemite: Fix modpost warnings.
[MIPS] Change names of local variables to silence sparse
[MIPS] SB1: Fix modpost warning.
[MIPS] PNX: Fix modpost warnings.
[MIPS] Alchemy: Fix modpost warnings.
[MIPS] Non-FPAFF: Fix warning.
[MIPS] DEC: Fix modpost warning.
[MIPS] MIPSsim: Enable MIPSsim virtual network driver.
[MIPS] Delete Ocelot 3 support.
[MIPS] remove LASAT Networks platforms support
[MIPS] Early check for SMTC kernel on non-MT processor
[MIPS] Add debugfs files to show fpuemu statistics
[MIPS] Add some debugfs files to debug unaligned accesses
[MIPS] rbtx4938: Fix secondary PCIC and glue internal NICs
[MIPS] tc35815: Load MAC address via platform_device
[MIPS] Move FPU affinity code into separate file.
[MIPS] Make ioremap() work on TX39/49 special unmapped segment
[MIPS] rbtx4938: Update and minimize defconfig
...
Diffstat (limited to 'arch/mips/mm/tlb-r4k.c')
-rw-r--r-- | arch/mips/mm/tlb-r4k.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 65160d4984d9..dcd6913dc1ff 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -48,6 +48,22 @@ extern void build_tlb_refill_handler(void); | |||
48 | 48 | ||
49 | #endif /* CONFIG_MIPS_MT_SMTC */ | 49 | #endif /* CONFIG_MIPS_MT_SMTC */ |
50 | 50 | ||
51 | #if defined(CONFIG_CPU_LOONGSON2) | ||
52 | /* | ||
53 | * LOONGSON2 has a 4 entry itlb which is a subset of dtlb, | ||
54 | * unfortrunately, itlb is not totally transparent to software. | ||
55 | */ | ||
56 | #define FLUSH_ITLB write_c0_diag(4); | ||
57 | |||
58 | #define FLUSH_ITLB_VM(vma) { if ((vma)->vm_flags & VM_EXEC) write_c0_diag(4); } | ||
59 | |||
60 | #else | ||
61 | |||
62 | #define FLUSH_ITLB | ||
63 | #define FLUSH_ITLB_VM(vma) | ||
64 | |||
65 | #endif | ||
66 | |||
51 | void local_flush_tlb_all(void) | 67 | void local_flush_tlb_all(void) |
52 | { | 68 | { |
53 | unsigned long flags; | 69 | unsigned long flags; |
@@ -73,6 +89,7 @@ void local_flush_tlb_all(void) | |||
73 | } | 89 | } |
74 | tlbw_use_hazard(); | 90 | tlbw_use_hazard(); |
75 | write_c0_entryhi(old_ctx); | 91 | write_c0_entryhi(old_ctx); |
92 | FLUSH_ITLB; | ||
76 | EXIT_CRITICAL(flags); | 93 | EXIT_CRITICAL(flags); |
77 | } | 94 | } |
78 | 95 | ||
@@ -136,6 +153,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
136 | } else { | 153 | } else { |
137 | drop_mmu_context(mm, cpu); | 154 | drop_mmu_context(mm, cpu); |
138 | } | 155 | } |
156 | FLUSH_ITLB; | ||
139 | EXIT_CRITICAL(flags); | 157 | EXIT_CRITICAL(flags); |
140 | } | 158 | } |
141 | } | 159 | } |
@@ -178,6 +196,7 @@ void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) | |||
178 | } else { | 196 | } else { |
179 | local_flush_tlb_all(); | 197 | local_flush_tlb_all(); |
180 | } | 198 | } |
199 | FLUSH_ITLB; | ||
181 | EXIT_CRITICAL(flags); | 200 | EXIT_CRITICAL(flags); |
182 | } | 201 | } |
183 | 202 | ||
@@ -210,6 +229,7 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) | |||
210 | 229 | ||
211 | finish: | 230 | finish: |
212 | write_c0_entryhi(oldpid); | 231 | write_c0_entryhi(oldpid); |
232 | FLUSH_ITLB_VM(vma); | ||
213 | EXIT_CRITICAL(flags); | 233 | EXIT_CRITICAL(flags); |
214 | } | 234 | } |
215 | } | 235 | } |
@@ -241,7 +261,7 @@ void local_flush_tlb_one(unsigned long page) | |||
241 | tlbw_use_hazard(); | 261 | tlbw_use_hazard(); |
242 | } | 262 | } |
243 | write_c0_entryhi(oldpid); | 263 | write_c0_entryhi(oldpid); |
244 | 264 | FLUSH_ITLB; | |
245 | EXIT_CRITICAL(flags); | 265 | EXIT_CRITICAL(flags); |
246 | } | 266 | } |
247 | 267 | ||
@@ -293,6 +313,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte) | |||
293 | else | 313 | else |
294 | tlb_write_indexed(); | 314 | tlb_write_indexed(); |
295 | tlbw_use_hazard(); | 315 | tlbw_use_hazard(); |
316 | FLUSH_ITLB_VM(vma); | ||
296 | EXIT_CRITICAL(flags); | 317 | EXIT_CRITICAL(flags); |
297 | } | 318 | } |
298 | 319 | ||