Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Henderson <rth@cygnus.com>
To: axp-list@redhat.com
Subject: Re: LX164 and rpcc
Date: Fri, 18 Dec 1998 08:53:48 -0800	[thread overview]
Message-ID: <19981218085348.B15474@dot.cygnus.com> (raw)
In-Reply-To: <Pine.LNX.3.96.981218145230.21851A-100000@peak3.cs.hut.fi>; from Hannu Mallat on Fri, Dec 18, 1998 at 03:02:05PM +0200

On Fri, Dec 18, 1998 at 03:02:05PM +0200, Hannu Mallat wrote:
> Any kernel hackers out there? What's going on? Again, the sample program
> works fine on the OSF/1 machine I have access to. 

I think there's a bug in the PALcode, in that it doesn't 
properly handle the CC when swapping to the same context,
which we do when we need to change page table mappings.

If you're adventurous, you might try something like this:

        stq_p   t10, PCB_Q_USP(v0)      // Store user stack pointer
        addl    p5, p7, p7              // Set new time

+	cmpeq	v0, a0, t10		// Are old and new contexts equal?
+	cmoveq	t10, p7, p5		// If not, set new time.

-       stl_p   p7, PCB_L_PCC(v0)       // Store new time
+       stl_p   p5, PCB_L_PCC(v0)       // Store new time
        bis     zero, 1, t10            // Get a '1'

        sll     t10, ICSR_V_FPE, t10    // Shift '1' into ICSR<FPE> position
        mfpr    p7, icsr                // Get current ICSR value


Grr, actually, that won't work as-is cause we've run out of room
in the SwpCtx block.  More code would have to go out of line.
But that's the problem. 

Alternately, you could try

Index: mmu_context.h
===================================================================
RCS file: /home/rth/CVSROOT/linux/include/asm-alpha/mmu_context.h,v
retrieving revision 1.7
diff -u -p -r1.7 mmu_context.h
--- mmu_context.h       1998/09/06 06:45:25     1.7
+++ mmu_context.h       1998/12/18 16:51:25
@@ -169,7 +169,9 @@ __reload_tss(struct thread_struct *tss)
 __EXTERN_INLINE void
 reload_context(struct task_struct *task)
 {
+       int pcc = task->tss.pcc;
        __reload_tss(&task->tss);
+       task->tss.pcc = pcc;
 }
 
 /*




r~


  reply	other threads:[~1998-12-18 17:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-17 10:45 LX164 and rpcc Hannu Mallat
1998-12-17 11:36 ` Thorsten Koch
1998-12-17 14:58   ` Hannu Mallat
1998-12-18 13:02   ` Hannu Mallat
1998-12-18 16:53     ` Richard Henderson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-12-24 17:53 Hannu Mallat
1998-12-26 18:50 ` Jay.Estabrook
1998-12-29 14:03   ` Hannu Mallat
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox