From: "Pat O'Rourke" <orourke@mclinux.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] [PATCH] ivt.S
Date: Wed, 27 Sep 2000 20:27:25 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590678205523@msgid-missing> (raw)
There are two parts to this patch:
1) First, in the VHPT miss handler I added a 'cmp.eq.andcm p10,p11=r0,r0'
to ensure that p10 and p11 are false. Further on in the miss handler
we load into either the ITC or DTC based on p10/p11 respectively, but
it seems we may not always set p10/p11. Granted that we will fault in
these cases, but it seems prudent to make sure the predicates are in a
known state and avoid putting arbitrary values in TC.
2) The ITLB and DTLB miss handlers would load r16 with the VA of PTE and
r19 with the VA we missed on. By switching the use of these registers,
we can avoid a re-load of r16 in the case where the speculative load
of the PTE fails.
Pat
--
Patrick O'Rourke
orourke@missioncriticallinux.com
--- xxxxx/linux/arch/ia64/kernel/ivt.S Wed Sep 27 15:09:03 2000
+++ linux-test7/arch/ia64/kernel/ivt.S Wed Sep 27 12:51:54 2000
@@ -115,6 +115,7 @@
mov r19=ar.k7 // get page table base address
shl r21=r16,3 // shift bit 60 into sign bit
shr.u r17=r16,61 // get the region number into r17
+ cmp.eq.andcm p10,p11=r0,r0 // guarantee p10,p11 are false
;;
cmp.eq p6,p7=5,r17 // is IFA pointing into to region 5?
shr.u r18=r16,PGDIR_SHIFT // get bits 33-63 of the faulting address
@@ -196,32 +197,31 @@
* The speculative access will fail if there is no TLB entry
* for the L3 page table page we're trying to access.
*/
- mov r16=cr.iha // get virtual address of L3 PTE
- mov r19=cr.ifa // get virtual address
+ mov r19=cr.iha // get virtual address of L3 PTE
+ mov r16=cr.ifa // get virtual address
;;
- ld8.s r17=[r16] // try to read L3 PTE
+ ld8.s r17=[r19] // try to read L3 PTE
mov r31=pr // save predicates
;;
- tnat.nz p6,p0=r16 // did read succeed?
+ tnat.nz p6,p0=r19 // did read succeed?
(p6) br.cond.spnt.many 1f
;;
itc.i r17
;;
#ifdef CONFIG_SMP
- ld8.s r18=[r16] // try to read L3 PTE again and see if same
+ ld8.s r18=[r19] // try to read L3 PTE again and see if same
mov r20=PAGE_SHIFT<<2 // setup page size for purge
;;
cmp.eq p6,p7=r17,r18
;;
-(p7) ptc.l r19,r20
+(p7) ptc.l r16,r20
#endif
mov pr=r31,-1
rfi
-
-1: mov r16=cr.ifa // get address that caused the TLB miss
;;
- rsm psr.dt // use physical addressing for data
+
+1: rsm psr.dt // use physical addressing for data
mov r19=ar.k7 // get page table base address
shl r21=r16,3 // shift bit 60 into sign bit
shr.u r17=r16,61 // get the region number into r17
@@ -283,31 +283,30 @@
* The speculative access will fail if there is no TLB entry
* for the L3 page table page we're trying to access.
*/
- mov r16=cr.iha // get virtual address of L3 PTE
- mov r19=cr.ifa // get virtual address
+ mov r19=cr.iha // get virtual address of L3 PTE
+ mov r16=cr.ifa // get virtual address
;;
- ld8.s r17=[r16] // try to read L3 PTE
+ ld8.s r17=[r19] // try to read L3 PTE
mov r31=pr // save predicates
;;
- tnat.nz p6,p0=r16 // did read succeed?
+ tnat.nz p6,p0=r19 // did read succeed?
(p6) br.cond.spnt.many 1f
;;
itc.d r17
;;
#ifdef CONFIG_SMP
- ld8.s r18=[r16] // try to read L3 PTE again and see if same
+ ld8.s r18=[r19] // try to read L3 PTE again and see if same
mov r20=PAGE_SHIFT<<2 // setup page size for purge
;;
cmp.eq p6,p7=r17,r18
;;
-(p7) ptc.l r19,r20
+(p7) ptc.l r16,r20
#endif
mov pr=r31,-1
rfi
-
-1: mov r16=cr.ifa // get address that caused the TLB miss
;;
- rsm psr.dt // use physical addressing for data
+
+1: rsm psr.dt // use physical addressing for data
mov r19=ar.k7 // get page table base address
shl r21=r16,3 // shift bit 60 into sign bit
shr.u r17=r16,61 // get the region number into r17
next reply other threads:[~2000-09-27 20:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-27 20:27 Pat O'Rourke [this message]
2000-09-27 21:34 ` [Linux-ia64] [PATCH] ivt.S David Mosberger
2000-09-27 23:54 ` Pat O'Rourke
2000-09-27 23:55 ` David Mosberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105590678205523@msgid-missing \
--to=orourke@mclinux.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox