linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Erratum 51 bugfix?
@ 2001-09-17  5:23 David Gibson
  2001-09-17 16:32 ` Dan Malek
  0 siblings, 1 reply; 21+ messages in thread
From: David Gibson @ 2001-09-17  5:23 UTC (permalink / raw)
  To: linuxppc-embedded


According to the ppc405gp errata, the workaround for erratum 51 is
incorrect.  The errata suggest that vector 0x1700 should branch to the
data tlb miss exception, whereas the current code branches to the
instruction tlb miss exception.  The patch below corrects this.

diff -urN ../linuxppc_2_4_devel/arch/ppc/kernel/head_4xx.S linux-bungo/arch/ppc/kernel/head_4xx.S
--- ../linuxppc_2_4_devel/arch/ppc/kernel/head_4xx.S	Mon Sep 17 10:32:05 2001
+++ linux-bungo/arch/ppc/kernel/head_4xx.S	Mon Sep 17 15:19:57 2001
@@ -591,7 +594,7 @@
 #ifdef CONFIG_IBM405_ERR51
 	/* 405GP errata 51 */
 	START_EXCEPTION(0x1700, Trap_17)
-	b ITLBMiss
+	b	DTLBMiss
 #else
 	STND_EXCEPTION(0x1700,	Trap_17,		UnknownException)
 #endif

--
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.  -- H.L. Mencken
http://www.ozlabs.org/people/dgibson


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Errata 67/77 / walnut bugs (was: Re: Erratum 51 bugfix?)
@ 2002-07-20  6:23 dank
  2002-07-20 15:14 ` Mark Hatle
  0 siblings, 1 reply; 21+ messages in thread
From: dank @ 2002-07-20  6:23 UTC (permalink / raw)
  To: linuxppc-embedded@lists.linuxppc.org, Mark Hatle
  Cc: Jan Olderdissen, David Gibson, Dan Kegel


Mark Hatle <fray@mvista.com> wrote on 18 Sep 2001:
> David Gibson wrote:
> > Ah, yes, I discovered ATOMIC_SYNC_FIX after I sent that, and have now
> > turned it on. That should certainly fix the atomic ops, however there
> > are quite a number of other places where the kernel uses stwcx., which
> > ATOMIX_SYNC_FIX doesn't fix - notably arch/ppc/kernel/bitops.c and
> > include/asm-ppc/bitops.h. As well as activating ATOMIX_SYNC_FIX I
> > tried inserting a sync before every other stwcx. that I could find,
> > and I haven't managed to get a process to lock up yet.
>
> Just as an FYI, we also do this in glibc to be safe. We have never been
> able to pin down a problem in userspace due to this bug, but we thought
> it would be better safe then sorry until we can get definative proof
> that the bug will not happen in userspace.
>
> The following two files in glibc should be patched:
> linuxthreads/sysdeps/powerpc/pt-machine.h
> sysdeps/powerpc/atomicity.h

We may have an example of a problem in userspace caused by erratum 77.
We've been using a version of gcc3.0.2 running with your patched glibc, and
had a very mysterious crash that happened roughly once in 1000 minutes,
but only with a lucky build of our c++ app.  The problem disappeared
if you looked at it in any way.  Fortunately (?), we had a rack of 100
CPUs running the app, so the MTBF was 10 minutes.

It looks like the following file in gcc3 must be patched:
 gcc-3.0.2/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h
Here's my and Jan's attempt at a patch:
 http://gcc.gnu.org/ml/libstdc++/2002-07/msg00152.html

Have your patches to glibc been contributed back to the mainline yet?
I'm looking carefully about how best to contribute my change;
I think it ought to be a multilib that is explicitly enabled.
- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2002-07-23 13:10 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-17  5:23 Erratum 51 bugfix? David Gibson
2001-09-17 16:32 ` Dan Malek
2001-09-18  0:29   ` Errata 67/77 / walnut bugs (was: Re: Erratum 51 bugfix?) David Gibson
2001-09-18 18:52     ` Dan Malek
2001-09-19  2:19       ` David Gibson
2001-09-19  2:23         ` Mark Hatle
2001-09-19  6:41           ` Dan Malek
2001-09-19 10:45           ` Ralph Blach
2001-09-19  6:39         ` Dan Malek
2001-09-21  4:36           ` David Gibson
2001-09-21  5:23             ` Dan Malek
2001-09-21  5:33               ` David Gibson
2001-09-21  6:24                 ` Dan Malek
2001-09-21  8:04                 ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2002-07-20  6:23 dank
2002-07-20 15:14 ` Mark Hatle
2002-07-20 15:38   ` dank
2002-07-20 16:02     ` Mark Hatle
2002-07-20 17:57       ` dank
2002-07-23 12:39   ` dank
2002-07-23 13:10     ` Mark Hatle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).