diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 18:18:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 18:18:06 -0400 |
commit | d973664992d814d93db161b28c0cc9a4c7e68f42 (patch) | |
tree | 03de3a9ef1f8f0d5dcd2e3c217c4fdf334f6691e /arch/arm/mm/proc-feroceon.S | |
parent | 2d5e3e8d28a7820de1eb7b18a7c15d645bb26992 (diff) | |
parent | 9d87dd97ffcd3b5eb2bbaf0d5d93f4bfcaed3f04 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (26 commits)
[ARM] pxa: fix 1c104e0e4f6ab396960c058e95e18bdedcac945b
[ARM] serial: s3c2410: platform_get_irq() may return signed unnoticed
[ARM] am79c961a: platform_get_irq() may return signed unnoticed
[ARM] Feroceon: Feroceon-specific WA-cache compatible {copy,clear}_user_page()
[ARM] Feroceon: fix function alignment in proc-feroceon.S
[ARM] Orion: catch a couple more alternative spellings of PCIe
[ARM] Orion: fix orion-ehci platform resource end addresses
[ARM] Orion: fix ->map_irq() PCIe bus number check
[ARM] Orion: fix ioremap() optimization
[ARM] feroceon: remove CONFIG_CPU_CACHE_ROUND_ROBIN check
[ARM] feroceon: remove CONFIG_CPU_DCACHE_WRITETHROUGH check
kprobes/arm: fix decoding of arithmetic immediate instructions
kprobes/arm: fix cache flush address for instruction stub
[ARM] 5022/1: Race in ARM MMCI PL18x driver, V2
[ARM] 5021/1: at91: buildfix for sam9263 + PM
[ARM] 5018/1: RealView: Fix the ARM11MPCore Oprofile compilation
[ARM] 5016/1: AT91: typo in mci configuration for at91cap at91sam9263
[ARM] 5017/1: pxa3xx: Report unsupported wakeup sources in pxa3xx_set_wake()
[ARM] 5020/1: magician: remove __devinit marker from pasic3_leds_info
[ARM] 5014/1: Cleanup reset state before entering suspend or resetting.
...
Diffstat (limited to 'arch/arm/mm/proc-feroceon.S')
-rw-r--r-- | arch/arm/mm/proc-feroceon.S | 60 |
1 files changed, 12 insertions, 48 deletions
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index 90e7594e29b1..a02c1712b52d 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
@@ -93,7 +93,7 @@ ENTRY(cpu_feroceon_reset) | |||
93 | * | 93 | * |
94 | * Called with IRQs disabled | 94 | * Called with IRQs disabled |
95 | */ | 95 | */ |
96 | .align 10 | 96 | .align 5 |
97 | ENTRY(cpu_feroceon_do_idle) | 97 | ENTRY(cpu_feroceon_do_idle) |
98 | mov r0, #0 | 98 | mov r0, #0 |
99 | mcr p15, 0, r0, c7, c10, 4 @ Drain write buffer | 99 | mcr p15, 0, r0, c7, c10, 4 @ Drain write buffer |
@@ -106,6 +106,7 @@ ENTRY(cpu_feroceon_do_idle) | |||
106 | * Clean and invalidate all cache entries in a particular | 106 | * Clean and invalidate all cache entries in a particular |
107 | * address space. | 107 | * address space. |
108 | */ | 108 | */ |
109 | .align 5 | ||
109 | ENTRY(feroceon_flush_user_cache_all) | 110 | ENTRY(feroceon_flush_user_cache_all) |
110 | /* FALLTHROUGH */ | 111 | /* FALLTHROUGH */ |
111 | 112 | ||
@@ -118,12 +119,8 @@ ENTRY(feroceon_flush_kern_cache_all) | |||
118 | mov r2, #VM_EXEC | 119 | mov r2, #VM_EXEC |
119 | mov ip, #0 | 120 | mov ip, #0 |
120 | __flush_whole_cache: | 121 | __flush_whole_cache: |
121 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
122 | mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache | ||
123 | #else | ||
124 | 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate | 122 | 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate |
125 | bne 1b | 123 | bne 1b |
126 | #endif | ||
127 | tst r2, #VM_EXEC | 124 | tst r2, #VM_EXEC |
128 | mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache | 125 | mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache |
129 | mcrne p15, 0, ip, c7, c10, 4 @ drain WB | 126 | mcrne p15, 0, ip, c7, c10, 4 @ drain WB |
@@ -139,27 +136,19 @@ __flush_whole_cache: | |||
139 | * - end - end address (exclusive) | 136 | * - end - end address (exclusive) |
140 | * - flags - vm_flags describing address space | 137 | * - flags - vm_flags describing address space |
141 | */ | 138 | */ |
139 | .align 5 | ||
142 | ENTRY(feroceon_flush_user_cache_range) | 140 | ENTRY(feroceon_flush_user_cache_range) |
143 | mov ip, #0 | 141 | mov ip, #0 |
144 | sub r3, r1, r0 @ calculate total size | 142 | sub r3, r1, r0 @ calculate total size |
145 | cmp r3, #CACHE_DLIMIT | 143 | cmp r3, #CACHE_DLIMIT |
146 | bgt __flush_whole_cache | 144 | bgt __flush_whole_cache |
147 | 1: tst r2, #VM_EXEC | 145 | 1: tst r2, #VM_EXEC |
148 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
149 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry | ||
150 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry | ||
151 | add r0, r0, #CACHE_DLINESIZE | ||
152 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry | ||
153 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry | ||
154 | add r0, r0, #CACHE_DLINESIZE | ||
155 | #else | ||
156 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry | 146 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry |
157 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry | 147 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry |
158 | add r0, r0, #CACHE_DLINESIZE | 148 | add r0, r0, #CACHE_DLINESIZE |
159 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry | 149 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry |
160 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry | 150 | mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry |
161 | add r0, r0, #CACHE_DLINESIZE | 151 | add r0, r0, #CACHE_DLINESIZE |
162 | #endif | ||
163 | cmp r0, r1 | 152 | cmp r0, r1 |
164 | blo 1b | 153 | blo 1b |
165 | tst r2, #VM_EXEC | 154 | tst r2, #VM_EXEC |
@@ -176,6 +165,7 @@ ENTRY(feroceon_flush_user_cache_range) | |||
176 | * - start - virtual start address | 165 | * - start - virtual start address |
177 | * - end - virtual end address | 166 | * - end - virtual end address |
178 | */ | 167 | */ |
168 | .align 5 | ||
179 | ENTRY(feroceon_coherent_kern_range) | 169 | ENTRY(feroceon_coherent_kern_range) |
180 | /* FALLTHROUGH */ | 170 | /* FALLTHROUGH */ |
181 | 171 | ||
@@ -207,6 +197,7 @@ ENTRY(feroceon_coherent_user_range) | |||
207 | * | 197 | * |
208 | * - addr - page aligned address | 198 | * - addr - page aligned address |
209 | */ | 199 | */ |
200 | .align 5 | ||
210 | ENTRY(feroceon_flush_kern_dcache_page) | 201 | ENTRY(feroceon_flush_kern_dcache_page) |
211 | add r1, r0, #PAGE_SZ | 202 | add r1, r0, #PAGE_SZ |
212 | 1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry | 203 | 1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry |
@@ -231,13 +222,12 @@ ENTRY(feroceon_flush_kern_dcache_page) | |||
231 | * | 222 | * |
232 | * (same as v4wb) | 223 | * (same as v4wb) |
233 | */ | 224 | */ |
225 | .align 5 | ||
234 | ENTRY(feroceon_dma_inv_range) | 226 | ENTRY(feroceon_dma_inv_range) |
235 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
236 | tst r0, #CACHE_DLINESIZE - 1 | 227 | tst r0, #CACHE_DLINESIZE - 1 |
237 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 228 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
238 | tst r1, #CACHE_DLINESIZE - 1 | 229 | tst r1, #CACHE_DLINESIZE - 1 |
239 | mcrne p15, 0, r1, c7, c10, 1 @ clean D entry | 230 | mcrne p15, 0, r1, c7, c10, 1 @ clean D entry |
240 | #endif | ||
241 | bic r0, r0, #CACHE_DLINESIZE - 1 | 231 | bic r0, r0, #CACHE_DLINESIZE - 1 |
242 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry | 232 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry |
243 | add r0, r0, #CACHE_DLINESIZE | 233 | add r0, r0, #CACHE_DLINESIZE |
@@ -256,14 +246,13 @@ ENTRY(feroceon_dma_inv_range) | |||
256 | * | 246 | * |
257 | * (same as v4wb) | 247 | * (same as v4wb) |
258 | */ | 248 | */ |
249 | .align 5 | ||
259 | ENTRY(feroceon_dma_clean_range) | 250 | ENTRY(feroceon_dma_clean_range) |
260 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
261 | bic r0, r0, #CACHE_DLINESIZE - 1 | 251 | bic r0, r0, #CACHE_DLINESIZE - 1 |
262 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 252 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
263 | add r0, r0, #CACHE_DLINESIZE | 253 | add r0, r0, #CACHE_DLINESIZE |
264 | cmp r0, r1 | 254 | cmp r0, r1 |
265 | blo 1b | 255 | blo 1b |
266 | #endif | ||
267 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 256 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
268 | mov pc, lr | 257 | mov pc, lr |
269 | 258 | ||
@@ -275,14 +264,10 @@ ENTRY(feroceon_dma_clean_range) | |||
275 | * - start - virtual start address | 264 | * - start - virtual start address |
276 | * - end - virtual end address | 265 | * - end - virtual end address |
277 | */ | 266 | */ |
267 | .align 5 | ||
278 | ENTRY(feroceon_dma_flush_range) | 268 | ENTRY(feroceon_dma_flush_range) |
279 | bic r0, r0, #CACHE_DLINESIZE - 1 | 269 | bic r0, r0, #CACHE_DLINESIZE - 1 |
280 | 1: | 270 | 1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry |
281 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
282 | mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry | ||
283 | #else | ||
284 | mcr p15, 0, r0, c7, c10, 1 @ clean D entry | ||
285 | #endif | ||
286 | add r0, r0, #CACHE_DLINESIZE | 271 | add r0, r0, #CACHE_DLINESIZE |
287 | cmp r0, r1 | 272 | cmp r0, r1 |
288 | blo 1b | 273 | blo 1b |
@@ -300,13 +285,12 @@ ENTRY(feroceon_cache_fns) | |||
300 | .long feroceon_dma_clean_range | 285 | .long feroceon_dma_clean_range |
301 | .long feroceon_dma_flush_range | 286 | .long feroceon_dma_flush_range |
302 | 287 | ||
288 | .align 5 | ||
303 | ENTRY(cpu_feroceon_dcache_clean_area) | 289 | ENTRY(cpu_feroceon_dcache_clean_area) |
304 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
305 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 290 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
306 | add r0, r0, #CACHE_DLINESIZE | 291 | add r0, r0, #CACHE_DLINESIZE |
307 | subs r1, r1, #CACHE_DLINESIZE | 292 | subs r1, r1, #CACHE_DLINESIZE |
308 | bhi 1b | 293 | bhi 1b |
309 | #endif | ||
310 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 294 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
311 | mov pc, lr | 295 | mov pc, lr |
312 | 296 | ||
@@ -323,13 +307,9 @@ ENTRY(cpu_feroceon_dcache_clean_area) | |||
323 | ENTRY(cpu_feroceon_switch_mm) | 307 | ENTRY(cpu_feroceon_switch_mm) |
324 | #ifdef CONFIG_MMU | 308 | #ifdef CONFIG_MMU |
325 | mov ip, #0 | 309 | mov ip, #0 |
326 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
327 | mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache | ||
328 | #else | ||
329 | @ && 'Clean & Invalidate whole DCache' | 310 | @ && 'Clean & Invalidate whole DCache' |
330 | 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate | 311 | 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate |
331 | bne 1b | 312 | bne 1b |
332 | #endif | ||
333 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | 313 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache |
334 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 314 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
335 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer | 315 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer |
@@ -362,16 +342,9 @@ ENTRY(cpu_feroceon_set_pte_ext) | |||
362 | tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young? | 342 | tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young? |
363 | movne r2, #0 | 343 | movne r2, #0 |
364 | 344 | ||
365 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
366 | eor r3, r2, #0x0a @ C & small page? | ||
367 | tst r3, #0x0b | ||
368 | biceq r2, r2, #4 | ||
369 | #endif | ||
370 | str r2, [r0] @ hardware version | 345 | str r2, [r0] @ hardware version |
371 | mov r0, r0 | 346 | mov r0, r0 |
372 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
373 | mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 347 | mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
374 | #endif | ||
375 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 348 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
376 | #endif | 349 | #endif |
377 | mov pc, lr | 350 | mov pc, lr |
@@ -387,20 +360,11 @@ __feroceon_setup: | |||
387 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 | 360 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 |
388 | #endif | 361 | #endif |
389 | 362 | ||
390 | |||
391 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
392 | mov r0, #4 @ disable write-back on caches explicitly | ||
393 | mcr p15, 7, r0, c15, c0, 0 | ||
394 | #endif | ||
395 | |||
396 | adr r5, feroceon_crval | 363 | adr r5, feroceon_crval |
397 | ldmia r5, {r5, r6} | 364 | ldmia r5, {r5, r6} |
398 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 365 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
399 | bic r0, r0, r5 | 366 | bic r0, r0, r5 |
400 | orr r0, r0, r6 | 367 | orr r0, r0, r6 |
401 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | ||
402 | orr r0, r0, #0x4000 @ .1.. .... .... .... | ||
403 | #endif | ||
404 | mov pc, lr | 368 | mov pc, lr |
405 | .size __feroceon_setup, . - __feroceon_setup | 369 | .size __feroceon_setup, . - __feroceon_setup |
406 | 370 | ||
@@ -476,7 +440,7 @@ __feroceon_old_id_proc_info: | |||
476 | .long cpu_feroceon_name | 440 | .long cpu_feroceon_name |
477 | .long feroceon_processor_functions | 441 | .long feroceon_processor_functions |
478 | .long v4wbi_tlb_fns | 442 | .long v4wbi_tlb_fns |
479 | .long v4wb_user_fns | 443 | .long feroceon_user_fns |
480 | .long feroceon_cache_fns | 444 | .long feroceon_cache_fns |
481 | .size __feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info | 445 | .size __feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info |
482 | #endif | 446 | #endif |
@@ -502,6 +466,6 @@ __feroceon_proc_info: | |||
502 | .long cpu_feroceon_name | 466 | .long cpu_feroceon_name |
503 | .long feroceon_processor_functions | 467 | .long feroceon_processor_functions |
504 | .long v4wbi_tlb_fns | 468 | .long v4wbi_tlb_fns |
505 | .long v4wb_user_fns | 469 | .long feroceon_user_fns |
506 | .long feroceon_cache_fns | 470 | .long feroceon_cache_fns |
507 | .size __feroceon_proc_info, . - __feroceon_proc_info | 471 | .size __feroceon_proc_info, . - __feroceon_proc_info |