Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 1999 04:50:02 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
Cc:        Doug Rabson <dfr@nlsystems.com>, alpha@FreeBSD.ORG
Subject:   Re: Hmm!! 
Message-ID:  <19990627205002.0C7CB81@overcee.netplex.com.au>
In-Reply-To: Your message of "Sun, 27 Jun 1999 20:44:08 %2B0400." <199906271644.UAA00502@tejblum.dnttm.rssi.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
Dmitrij Tejblum wrote:
> I once noticed that our pmap miss some calls to alpha_pal_imb(). I did 
> suspect it may cause problems like the ones you see. Unfortunately, I 
> did almost nothing to fix that, but still have plans :-(. At that time, 
> I made this change to pmap.c (cut & pasted)
> 
> @@ -2176,6 +2183,8 @@
>                 *pte = newpte;
>                 if (origpte)
>                         pmap_invalidate_page(pmap, va);
> +               if (prot & VM_PROT_EXECUTE)
> +                       alpha_pal_imb();
>         }
>  }
>  
> and probably didn't see such gremlins since that, but it may be 
> coincidence. (I got a feeling that the weird things I seen in a 
> nightmare, not in reality...)
> 
> (I suspect a little it may be 164sx specific.)
> 
> Dima

I went a bit further and it seems to have fixed my mystery problems:

Index: pmap.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/alpha/pmap.c,v
retrieving revision 1.26
diff -c -r1.26 pmap.c
*** pmap.c	1999/06/10 20:40:55	1.26
--- pmap.c	1999/06/27 20:41:52
***************
*** 728,745 ****
  static void
  pmap_invalidate_page(pmap_t pmap, vm_offset_t va)
  {
! 	if (pmap_isactive(pmap))
  		ALPHA_TBIS(va);
! 	else
  		pmap_invalidate_asn(pmap);
  }
  
  static void
  pmap_invalidate_all(pmap_t pmap)
  {
! 	if (pmap_isactive(pmap))
  		ALPHA_TBIA();
! 	else
  		pmap_invalidate_asn(pmap);
  }
  
--- 728,747 ----
  static void
  pmap_invalidate_page(pmap_t pmap, vm_offset_t va)
  {
! 	if (pmap_isactive(pmap)) {
  		ALPHA_TBIS(va);
! 		alpha_pal_imb();
! 	} else
  		pmap_invalidate_asn(pmap);
  }
  
  static void
  pmap_invalidate_all(pmap_t pmap)
  {
! 	if (pmap_isactive(pmap)) {
  		ALPHA_TBIA();
! 		alpha_pal_imb();
! 	} else
  		pmap_invalidate_asn(pmap);
  }
  
***************
*** 2176,2181 ****
--- 2178,2185 ----
  		*pte = newpte;
  		if (origpte)
  			pmap_invalidate_page(pmap, va);
+ 		if (prot & VM_PROT_EXECUTE)
+			alpha_pal_imb();
  	}
  }


 I'm pretty sure this is overkill, but it doesn't seem to hurt so far.  I
have not tried your single patch though, I got out the sledgehammer to see
if I could get some sanity.  I'm not sure if the alpha_pal_tbi() functions
do an implied imb as well or not.  If so, then the first chunks are
irrelevant.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990627205002.0C7CB81>