From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 15504 invoked from network); 18 Dec 1998 17:04:23 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 18 Dec 1998 17:04:23 -0000 Received: from cygnus.com (runyon.cygnus.com [205.180.230.5]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id LAA31475 for ; Fri, 18 Dec 1998 11:53:58 -0500 Received: from dot.cygnus.com (dot.cygnus.com [205.180.230.224]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id IAA26782 for ; Fri, 18 Dec 1998 08:53:48 -0800 (PST) Received: (rth@localhost) by dot.cygnus.com (8.8.7/8.6.4) id IAA15486; Fri, 18 Dec 1998 08:53:48 -0800 Message-ID: <19981218085348.B15474@dot.cygnus.com> Date: Fri, 18 Dec 1998 08:53:48 -0800 From: Richard Henderson To: axp-list@redhat.com Subject: Re: LX164 and rpcc Reply-To: Richard Henderson References: <19981217123625.G2290@zib.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1 In-Reply-To: ; 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 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~