aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/mm/misc.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa/mm/misc.S')
-rw-r--r--arch/xtensa/mm/misc.S51
1 files changed, 50 insertions, 1 deletions
diff --git a/arch/xtensa/mm/misc.S b/arch/xtensa/mm/misc.S
index b048406d8756..d97ed1ba7b0a 100644
--- a/arch/xtensa/mm/misc.S
+++ b/arch/xtensa/mm/misc.S
@@ -29,6 +29,7 @@
29 */ 29 */
30 30
31ENTRY(clear_page) 31ENTRY(clear_page)
32
32 entry a1, 16 33 entry a1, 16
33 34
34 movi a3, 0 35 movi a3, 0
@@ -45,6 +46,8 @@ ENTRY(clear_page)
45 46
46 retw 47 retw
47 48
49ENDPROC(clear_page)
50
48/* 51/*
49 * copy_page and copy_user_page are the same for non-cache-aliased configs. 52 * copy_page and copy_user_page are the same for non-cache-aliased configs.
50 * 53 *
@@ -53,6 +56,7 @@ ENTRY(clear_page)
53 */ 56 */
54 57
55ENTRY(copy_page) 58ENTRY(copy_page)
59
56 entry a1, 16 60 entry a1, 16
57 61
58 __loopi a2, a4, PAGE_SIZE, 32 62 __loopi a2, a4, PAGE_SIZE, 32
@@ -84,6 +88,8 @@ ENTRY(copy_page)
84 88
85 retw 89 retw
86 90
91ENDPROC(copy_page)
92
87#ifdef CONFIG_MMU 93#ifdef CONFIG_MMU
88/* 94/*
89 * If we have to deal with cache aliasing, we use temporary memory mappings 95 * If we have to deal with cache aliasing, we use temporary memory mappings
@@ -109,6 +115,7 @@ ENTRY(__tlbtemp_mapping_start)
109 */ 115 */
110 116
111ENTRY(clear_user_page) 117ENTRY(clear_user_page)
118
112 entry a1, 32 119 entry a1, 32
113 120
114 /* Mark page dirty and determine alias. */ 121 /* Mark page dirty and determine alias. */
@@ -164,6 +171,8 @@ ENTRY(clear_user_page)
164 171
165 retw 172 retw
166 173
174ENDPROC(clear_user_page)
175
167/* 176/*
168 * copy_page_user (void *to, void *from, unsigned long vaddr, struct page *page) 177 * copy_page_user (void *to, void *from, unsigned long vaddr, struct page *page)
169 * a2 a3 a4 a5 178 * a2 a3 a4 a5
@@ -171,7 +180,7 @@ ENTRY(clear_user_page)
171 180
172ENTRY(copy_user_page) 181ENTRY(copy_user_page)
173 182
174 entry a1, 32 183 entry a1, 32
175 184
176 /* Mark page dirty and determine alias for destination. */ 185 /* Mark page dirty and determine alias for destination. */
177 186
@@ -262,6 +271,8 @@ ENTRY(copy_user_page)
262 271
263 retw 272 retw
264 273
274ENDPROC(copy_user_page)
275
265#endif 276#endif
266 277
267#if (DCACHE_WAY_SIZE > PAGE_SIZE) 278#if (DCACHE_WAY_SIZE > PAGE_SIZE)
@@ -272,6 +283,7 @@ ENTRY(copy_user_page)
272 */ 283 */
273 284
274ENTRY(__flush_invalidate_dcache_page_alias) 285ENTRY(__flush_invalidate_dcache_page_alias)
286
275 entry sp, 16 287 entry sp, 16
276 288
277 movi a7, 0 # required for exception handler 289 movi a7, 0 # required for exception handler
@@ -287,6 +299,7 @@ ENTRY(__flush_invalidate_dcache_page_alias)
287 299
288 retw 300 retw
289 301
302ENDPROC(__flush_invalidate_dcache_page_alias)
290#endif 303#endif
291 304
292ENTRY(__tlbtemp_mapping_itlb) 305ENTRY(__tlbtemp_mapping_itlb)
@@ -294,6 +307,7 @@ ENTRY(__tlbtemp_mapping_itlb)
294#if (ICACHE_WAY_SIZE > PAGE_SIZE) 307#if (ICACHE_WAY_SIZE > PAGE_SIZE)
295 308
296ENTRY(__invalidate_icache_page_alias) 309ENTRY(__invalidate_icache_page_alias)
310
297 entry sp, 16 311 entry sp, 16
298 312
299 addi a6, a3, (PAGE_KERNEL_EXEC | _PAGE_HW_WRITE) 313 addi a6, a3, (PAGE_KERNEL_EXEC | _PAGE_HW_WRITE)
@@ -307,11 +321,14 @@ ENTRY(__invalidate_icache_page_alias)
307 isync 321 isync
308 retw 322 retw
309 323
324ENDPROC(__invalidate_icache_page_alias)
325
310#endif 326#endif
311 327
312/* End of special treatment in tlb miss exception */ 328/* End of special treatment in tlb miss exception */
313 329
314ENTRY(__tlbtemp_mapping_end) 330ENTRY(__tlbtemp_mapping_end)
331
315#endif /* CONFIG_MMU 332#endif /* CONFIG_MMU
316 333
317/* 334/*
@@ -319,6 +336,7 @@ ENTRY(__tlbtemp_mapping_end)
319 */ 336 */
320 337
321ENTRY(__invalidate_icache_page) 338ENTRY(__invalidate_icache_page)
339
322 entry sp, 16 340 entry sp, 16
323 341
324 ___invalidate_icache_page a2 a3 342 ___invalidate_icache_page a2 a3
@@ -326,11 +344,14 @@ ENTRY(__invalidate_icache_page)
326 344
327 retw 345 retw
328 346
347ENDPROC(__invalidate_icache_page)
348
329/* 349/*
330 * void __invalidate_dcache_page(ulong start) 350 * void __invalidate_dcache_page(ulong start)
331 */ 351 */
332 352
333ENTRY(__invalidate_dcache_page) 353ENTRY(__invalidate_dcache_page)
354
334 entry sp, 16 355 entry sp, 16
335 356
336 ___invalidate_dcache_page a2 a3 357 ___invalidate_dcache_page a2 a3
@@ -338,11 +359,14 @@ ENTRY(__invalidate_dcache_page)
338 359
339 retw 360 retw
340 361
362ENDPROC(__invalidate_dcache_page)
363
341/* 364/*
342 * void __flush_invalidate_dcache_page(ulong start) 365 * void __flush_invalidate_dcache_page(ulong start)
343 */ 366 */
344 367
345ENTRY(__flush_invalidate_dcache_page) 368ENTRY(__flush_invalidate_dcache_page)
369
346 entry sp, 16 370 entry sp, 16
347 371
348 ___flush_invalidate_dcache_page a2 a3 372 ___flush_invalidate_dcache_page a2 a3
@@ -350,11 +374,14 @@ ENTRY(__flush_invalidate_dcache_page)
350 dsync 374 dsync
351 retw 375 retw
352 376
377ENDPROC(__flush_invalidate_dcache_page)
378
353/* 379/*
354 * void __flush_dcache_page(ulong start) 380 * void __flush_dcache_page(ulong start)
355 */ 381 */
356 382
357ENTRY(__flush_dcache_page) 383ENTRY(__flush_dcache_page)
384
358 entry sp, 16 385 entry sp, 16
359 386
360 ___flush_dcache_page a2 a3 387 ___flush_dcache_page a2 a3
@@ -362,11 +389,14 @@ ENTRY(__flush_dcache_page)
362 dsync 389 dsync
363 retw 390 retw
364 391
392ENDPROC(__flush_dcache_page)
393
365/* 394/*
366 * void __invalidate_icache_range(ulong start, ulong size) 395 * void __invalidate_icache_range(ulong start, ulong size)
367 */ 396 */
368 397
369ENTRY(__invalidate_icache_range) 398ENTRY(__invalidate_icache_range)
399
370 entry sp, 16 400 entry sp, 16
371 401
372 ___invalidate_icache_range a2 a3 a4 402 ___invalidate_icache_range a2 a3 a4
@@ -374,11 +404,14 @@ ENTRY(__invalidate_icache_range)
374 404
375 retw 405 retw
376 406
407ENDPROC(__invalidate_icache_range)
408
377/* 409/*
378 * void __flush_invalidate_dcache_range(ulong start, ulong size) 410 * void __flush_invalidate_dcache_range(ulong start, ulong size)
379 */ 411 */
380 412
381ENTRY(__flush_invalidate_dcache_range) 413ENTRY(__flush_invalidate_dcache_range)
414
382 entry sp, 16 415 entry sp, 16
383 416
384 ___flush_invalidate_dcache_range a2 a3 a4 417 ___flush_invalidate_dcache_range a2 a3 a4
@@ -386,11 +419,14 @@ ENTRY(__flush_invalidate_dcache_range)
386 419
387 retw 420 retw
388 421
422ENDPROC(__flush_invalidate_dcache_range)
423
389/* 424/*
390 * void _flush_dcache_range(ulong start, ulong size) 425 * void _flush_dcache_range(ulong start, ulong size)
391 */ 426 */
392 427
393ENTRY(__flush_dcache_range) 428ENTRY(__flush_dcache_range)
429
394 entry sp, 16 430 entry sp, 16
395 431
396 ___flush_dcache_range a2 a3 a4 432 ___flush_dcache_range a2 a3 a4
@@ -398,22 +434,28 @@ ENTRY(__flush_dcache_range)
398 434
399 retw 435 retw
400 436
437ENDPROC(__flush_dcache_range)
438
401/* 439/*
402 * void _invalidate_dcache_range(ulong start, ulong size) 440 * void _invalidate_dcache_range(ulong start, ulong size)
403 */ 441 */
404 442
405ENTRY(__invalidate_dcache_range) 443ENTRY(__invalidate_dcache_range)
444
406 entry sp, 16 445 entry sp, 16
407 446
408 ___invalidate_dcache_range a2 a3 a4 447 ___invalidate_dcache_range a2 a3 a4
409 448
410 retw 449 retw
411 450
451ENDPROC(__invalidate_dcache_range)
452
412/* 453/*
413 * void _invalidate_icache_all(void) 454 * void _invalidate_icache_all(void)
414 */ 455 */
415 456
416ENTRY(__invalidate_icache_all) 457ENTRY(__invalidate_icache_all)
458
417 entry sp, 16 459 entry sp, 16
418 460
419 ___invalidate_icache_all a2 a3 461 ___invalidate_icache_all a2 a3
@@ -421,11 +463,14 @@ ENTRY(__invalidate_icache_all)
421 463
422 retw 464 retw
423 465
466ENDPROC(__invalidate_icache_all)
467
424/* 468/*
425 * void _flush_invalidate_dcache_all(void) 469 * void _flush_invalidate_dcache_all(void)
426 */ 470 */
427 471
428ENTRY(__flush_invalidate_dcache_all) 472ENTRY(__flush_invalidate_dcache_all)
473
429 entry sp, 16 474 entry sp, 16
430 475
431 ___flush_invalidate_dcache_all a2 a3 476 ___flush_invalidate_dcache_all a2 a3
@@ -433,11 +478,14 @@ ENTRY(__flush_invalidate_dcache_all)
433 478
434 retw 479 retw
435 480
481ENDPROC(__flush_invalidate_dcache_all)
482
436/* 483/*
437 * void _invalidate_dcache_all(void) 484 * void _invalidate_dcache_all(void)
438 */ 485 */
439 486
440ENTRY(__invalidate_dcache_all) 487ENTRY(__invalidate_dcache_all)
488
441 entry sp, 16 489 entry sp, 16
442 490
443 ___invalidate_dcache_all a2 a3 491 ___invalidate_dcache_all a2 a3
@@ -445,3 +493,4 @@ ENTRY(__invalidate_dcache_all)
445 493
446 retw 494 retw
447 495
496ENDPROC(__invalidate_dcache_all)