diff options
Diffstat (limited to 'arch/sparc64/kernel/tsb.S')
-rw-r--r-- | arch/sparc64/kernel/tsb.S | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S index 1b154c863628..118baea44f69 100644 --- a/arch/sparc64/kernel/tsb.S +++ b/arch/sparc64/kernel/tsb.S | |||
@@ -371,3 +371,72 @@ copy_tsb: /* %o0=old_tsb_base, %o1=old_tsb_size | |||
371 | retl | 371 | retl |
372 | TSB_MEMBAR | 372 | TSB_MEMBAR |
373 | .size copy_tsb, .-copy_tsb | 373 | .size copy_tsb, .-copy_tsb |
374 | |||
375 | /* Set the invalid bit in all TSB entries. */ | ||
376 | .align 32 | ||
377 | .globl tsb_init | ||
378 | .type tsb_init,#function | ||
379 | tsb_init: /* %o0 = TSB vaddr, %o1 = size in bytes */ | ||
380 | prefetch [%o0 + 0x000], #n_writes | ||
381 | mov 1, %g1 | ||
382 | prefetch [%o0 + 0x040], #n_writes | ||
383 | sllx %g1, TSB_TAG_INVALID_BIT, %g1 | ||
384 | prefetch [%o0 + 0x080], #n_writes | ||
385 | 1: prefetch [%o0 + 0x0c0], #n_writes | ||
386 | stx %g1, [%o0 + 0x00] | ||
387 | stx %g1, [%o0 + 0x10] | ||
388 | stx %g1, [%o0 + 0x20] | ||
389 | stx %g1, [%o0 + 0x30] | ||
390 | prefetch [%o0 + 0x100], #n_writes | ||
391 | stx %g1, [%o0 + 0x40] | ||
392 | stx %g1, [%o0 + 0x50] | ||
393 | stx %g1, [%o0 + 0x60] | ||
394 | stx %g1, [%o0 + 0x70] | ||
395 | prefetch [%o0 + 0x140], #n_writes | ||
396 | stx %g1, [%o0 + 0x80] | ||
397 | stx %g1, [%o0 + 0x90] | ||
398 | stx %g1, [%o0 + 0xa0] | ||
399 | stx %g1, [%o0 + 0xb0] | ||
400 | prefetch [%o0 + 0x180], #n_writes | ||
401 | stx %g1, [%o0 + 0xc0] | ||
402 | stx %g1, [%o0 + 0xd0] | ||
403 | stx %g1, [%o0 + 0xe0] | ||
404 | stx %g1, [%o0 + 0xf0] | ||
405 | subcc %o1, 0x100, %o1 | ||
406 | bne,pt %xcc, 1b | ||
407 | add %o0, 0x100, %o0 | ||
408 | retl | ||
409 | nop | ||
410 | nop | ||
411 | nop | ||
412 | .size tsb_init, .-tsb_init | ||
413 | |||
414 | .globl NGtsb_init | ||
415 | .type NGtsb_init,#function | ||
416 | NGtsb_init: | ||
417 | rd %asi, %g2 | ||
418 | mov 1, %g1 | ||
419 | wr %g0, ASI_BLK_INIT_QUAD_LDD_P, %asi | ||
420 | sllx %g1, TSB_TAG_INVALID_BIT, %g1 | ||
421 | 1: stxa %g1, [%o0 + 0x00] %asi | ||
422 | stxa %g1, [%o0 + 0x10] %asi | ||
423 | stxa %g1, [%o0 + 0x20] %asi | ||
424 | stxa %g1, [%o0 + 0x30] %asi | ||
425 | stxa %g1, [%o0 + 0x40] %asi | ||
426 | stxa %g1, [%o0 + 0x50] %asi | ||
427 | stxa %g1, [%o0 + 0x60] %asi | ||
428 | stxa %g1, [%o0 + 0x70] %asi | ||
429 | stxa %g1, [%o0 + 0x80] %asi | ||
430 | stxa %g1, [%o0 + 0x90] %asi | ||
431 | stxa %g1, [%o0 + 0xa0] %asi | ||
432 | stxa %g1, [%o0 + 0xb0] %asi | ||
433 | stxa %g1, [%o0 + 0xc0] %asi | ||
434 | stxa %g1, [%o0 + 0xd0] %asi | ||
435 | stxa %g1, [%o0 + 0xe0] %asi | ||
436 | stxa %g1, [%o0 + 0xf0] %asi | ||
437 | subcc %o1, 0x100, %o1 | ||
438 | bne,pt %xcc, 1b | ||
439 | add %o0, 0x100, %o0 | ||
440 | retl | ||
441 | wr %g2, 0x0, %asi | ||
442 | .size NGtsb_init, .-NGtsb_init | ||