summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2007-10-16 03:20:32 +0000
committermarcel <marcel@FreeBSD.org>2007-10-16 03:20:32 +0000
commit28e8a1b2edfdab03fc726df2c073da69cc761b14 (patch)
treedc5b2d95639e645fd17541eb5c80d35656e11e37 /sys/ia64
parent70374bf52efc042706f4c031e8d167591d46f75a (diff)
downloadFreeBSD-src-28e8a1b2edfdab03fc726df2c073da69cc761b14.zip
FreeBSD-src-28e8a1b2edfdab03fc726df2c073da69cc761b14.tar.gz
Set PTE_ACCESSED in the PTE and before inserting it in the VHPT.
This avoids back-to-back faults for all TLB misses. This can be improved further in the future by also setting PTE_DIRTY for TLB misses for write accesses. MFC after: 1 week
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/exception.S14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/ia64/ia64/exception.S b/sys/ia64/ia64/exception.S
index aa96357..1f07602 100644
--- a/sys/ia64/ia64/exception.S
+++ b/sys/ia64/ia64/exception.S
@@ -729,7 +729,12 @@ IVT_ENTRY(Instruction_TLB, 0x0400)
cmp.ne p15,p0=r21,r19 // compare tags
(p15) br.cond.sptk.few 3f // if not, read next in chain
;;
- ld8 r21=[r20],8 // read pte
+ ld8 r21=[r20] // read pte
+ mov r22=PTE_ACCESSED
+ ;;
+ or r21=r21,r22
+ ;;
+ st8 [r20]=r21,8
;;
ld8 r22=[r20] // read rest of pte
;;
@@ -810,7 +815,12 @@ IVT_ENTRY(Data_TLB, 0x0800)
cmp.ne p15,p0=r21,r19 // compare tags
(p15) br.cond.sptk.few 3f // if not, read next in chain
;;
- ld8 r21=[r20],8 // read pte
+ ld8 r21=[r20] // read pte
+ mov r22=PTE_ACCESSED
+ ;;
+ or r21=r21,r22
+ ;;
+ st8 [r20]=r21,8
;;
ld8 r22=[r20] // read rest of pte
;;
OpenPOWER on IntegriCloud