Subject: Re: 1.6 woes
To: Jukka Marin , Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-sparc
Date: 07/27/2002 14:54:01
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sat, Jul 27, 2002 at 01:33:06PM +0300, Jukka Marin wrote:
> On Fri, Jul 26, 2002 at 09:43:18PM +0900, Izumi Tsutsui wrote:
> > > Ah.  How do I disable tagged queuing?
> > 
> > Just add flags for esp like this:
> > 
> > esp0	at sbus0 slot ? offset ? flags 0xff0000		# sun4c
> > 
> > Bits 16-23 disable tagged queuing for the corresponding SCSI target.
> 
> Thanks.
> 
> It seems that I can't build a kernel (or pkgsrc programs) on the 1.6beta
> systems.  gcc is getting signals 4, 10, 11 (probably others as well) or
> three different SS1's - all of which were rock solid under 1.3.3 (one of
> them had uptime of over 600 days and two over 300 days, but then a disk
> died).
> 
> If one system was acting up, I could blame RAM.. but all three, and they
> were rock solid before?
> 
> I guess 1.6 works Just Fine for everyone else?

No, 1.6 has problems on older sun4c (the ones with the "software flush"
caches). There have been several threads here about it.
Attached is a patch that makes my sun4c solid again, but
1) I have no idea why cache_flush_segment() doesn't do its job here.
   It could be a hardware bug with the ASI_FLUSHSEG instruction, but this
   sounds a bit strange.
2) The machine is really, really slow compiling things. It may be the new
   gcc, but I will profile the kernel anyway, as the machine seems to
   spend most of its time in kernel, according to top.


You can cross-compile a kernel from another machine; but I've put the
kernel I use on my ss1+, which should also work for you, at
ftp://antioche.lip6.fr/pub/bouyer/netbsd-SUN4C.gz
Note that this is not GENERIC, but a stripped down kernel.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
--

--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="sparc.diff2"

? compile/CORDOUAN
? compile/CHASSIRON
Index: sparc/pmap.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc/sparc/pmap.c,v
retrieving revision 1.207
diff -u -r1.207 pmap.c
--- pmap.c	2002/04/11 11:08:40	1.207
+++ pmap.c	2002/07/17 17:53:18
@@ -1570,8 +1570,15 @@
 	ctx = getcontext4();
 	if (CTX_USABLE(pm,rp)) {
 		CHANGE_CONTEXTS(ctx, pm->pm_ctxnum);
+#if 0 /* XXX MB */
 		cache_flush_segment(me->me_vreg, me->me_vseg);
 		va = VSTOVA(me->me_vreg,me->me_vseg);
+#else
+		va = VSTOVA(me->me_vreg,me->me_vseg);
+		for (i=0; i < 64; i++) {
+			cache_flush_page(va + i*NBPG);
+		}
+#endif
 	} else {
 		CHANGE_CONTEXTS(ctx, 0);
 		if (HASSUN4_MMU3L)

--qMm9M+Fa2AknHoGS--