From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] [PATCH] ivt.S
Date: Wed, 27 Sep 2000 21:34:15 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590678205524@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590678205523@msgid-missing>
>>>>> On Wed, 27 Sep 2000 16:27:25 -0400, "Pat O'Rourke" <orourke@mclinux.com> said:
Pat> There are two parts to this patch: 1) First, in the VHPT miss
Pat> handler I added a 'cmp.eq.andcm p10,p11=r0,r0' to ensure that
Pat> p10 and p11 are false. Further on in the miss handler we load
Pat> into either the ITC or DTC based on p10/p11 respectively, but
Pat> it seems we may not always set p10/p11. Granted that we will
Pat> fault in these cases, but it seems prudent to make sure the
Pat> predicates are in a known state and avoid putting arbitrary
Pat> values in TC.
I don't see why that would be necessary. Perhaps you misunderstood
how tbit.nc.unc works?
Pat> 2) The ITLB and DTLB miss handlers would load r16 with the VA
Pat> of PTE and r19 with the VA we missed on. By switching the use
Pat> of these registers, we can avoid a re-load of r16 in the case
Pat> where the speculative load of the PTE fails.
Thanks for pointing that out. Actually, looking at that code, I
noticed that the tnat was testing the wrong register. Ouch.
Can you try the attached patch (it's relative to the original
version)?
Thanks,
--david
--- arch/ia64/kernel/ivt.S~ Fri Sep 22 16:45:25 2000
+++ arch/ia64/kernel/ivt.S Wed Sep 27 14:30:51 2000
@@ -196,35 +196,32 @@
* 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 r16=cr.ifa // get virtual address
+ mov r19=cr.iha // get virtual address of L3 PTE
;;
- 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=r17 // 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
- ;;
#ifdef CONFIG_DISABLE_VHPT
itlb_fault:
#endif
- 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
@@ -286,34 +283,32 @@
* 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 r16=cr.ifa // get virtual address
+ mov r19=cr.iha // get virtual address of L3 PTE
;;
- 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=r17 // 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
- ;;
#ifdef CONFIG_DISABLE_VHPT
dtlb_fault:
#endif
- 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 prev parent reply other threads:[~2000-09-27 21:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-27 20:27 [Linux-ia64] [PATCH] ivt.S Pat O'Rourke
2000-09-27 21:34 ` David Mosberger [this message]
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-105590678205524@msgid-missing \
--to=davidm@hpl.hp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.