patch-2.4.0-test11 linux/arch/sparc64/kernel/itlb_base.S
Next file: linux/arch/sparc64/kernel/pci.c
Previous file: linux/arch/sparc64/kernel/ioctl32.c
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Sun Nov 12 20:37:16 2000
- Orig file:
v2.4.0-test10/linux/arch/sparc64/kernel/itlb_base.S
- Orig date:
Mon Mar 27 10:35:56 2000
diff -u --recursive --new-file v2.4.0-test10/linux/arch/sparc64/kernel/itlb_base.S linux/arch/sparc64/kernel/itlb_base.S
@@ -1,4 +1,4 @@
-/* $Id: itlb_base.S,v 1.9 2000/03/26 09:13:48 davem Exp $
+/* $Id: itlb_base.S,v 1.10 2000/11/10 08:28:45 davem Exp $
* itlb_base.S: Front end to ITLB miss replacement strategy.
* This is included directly into the trap table.
*
@@ -23,22 +23,13 @@
srax %g4, VPTE_SHIFT, %g6 ! Create VPTE offset
ldxa [%g3 + %g6] ASI_P, %g5 ! Load VPTE
1: brgez,pn %g5, 3f ! Not valid, branch out
- and %g5, (_PAGE_PRESENT|_PAGE_READ), %g4 ! Mask readable bits
+ nop ! Delay-slot
2: stxa %g5, [%g0] ASI_ITLB_DATA_IN ! Load PTE into TLB
retry ! Trap return
-3: cmp %g4, (_PAGE_PRESENT|_PAGE_READ) ! Readable page?
+3: rdpr %pstate, %g4 ! Move into alternate globals
-/* ITLB ** ICACHE line 2: Quick user ref updates */
- bne,pn %xcc, 4f ! Nope, real missing page
- sllx %g1, 60, %g4 ! Sliiickkk...
- or %g5, _PAGE_ACCESSED, %g5 ! Mark as touched
- or %g5, %g4, %g5 ! Allow user to see it
- ba,pt %xcc, 2b ! Branch to load TLB
- stxa %g5, [%g3 + %g6] ASI_S ! Update PTE table
-4: rdpr %pstate, %g4 ! Move into alternate globals
+/* ITLB ** ICACHE line 2: Real faults */
wrpr %g4, PSTATE_AG|PSTATE_MG, %pstate
-
-/* ITLB ** ICACHE line 3: Real faults */
rdpr %tpc, %g5 ! And load faulting VA
mov FAULT_CODE_ITLB, %g4 ! It was read from ITLB
sparc64_realfault_common: ! Called by TL0 dtlb_miss too
@@ -46,10 +37,11 @@
stx %g5, [%g6 + AOFF_task_thread + AOFF_thread_fault_address]
ba,pt %xcc, etrap ! Save state
1: rd %pc, %g7 ! ...
+ nop
+
+/* ITLB ** ICACHE line 3: Finish faults + window fixups */
call do_sparc64_fault ! Call fault handler
add %sp, STACK_BIAS + REGWIN_SZ, %o0! Compute pt_regs arg
-
-/* ITLB ** ICACHE line 4: Finish faults + window fixups */
ba,pt %xcc, rtrap_clr_l6 ! Restore cpu state
nop
winfix_trampoline:
@@ -57,6 +49,14 @@
or %g3, 0x7c, %g3 ! Compute offset to branch
wrpr %g3, %tnpc ! Write it into TNPC
done ! Do it to it
+
+/* ITLB ** ICACHE line 4: Unused... */
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
nop
nop
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)