linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Roland McGrath <roland@redhat.com>
Cc: linuxppc-dev@ozlabs.org,
	Jan Kratochvil <jan.kratochvil@redhat.com>,
	Paul Mackerras <paulus@samba.org>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: PPC upstream kernel ignored DABR bug
Date: Fri, 14 Mar 2008 03:11:12 +0100	[thread overview]
Message-ID: <7d9961563967d5f810a5f597519a7c63@kernel.crashing.org> (raw)
In-Reply-To: <20080313224234.0A4FB26F993@magilla.localdomain>

> The pointer to the test case was given here before.

Oh, I missed that.  Anyway, I wanted to see the asm, and who knows,
with different compiler versions and all that.

> 	0x10000984 <child_thread+52>:   bl      0x10001750 <sleep>
> 	0x10000988 <child_thread+56>:   lis     r9,4097
> --->	0x1000098c <child_thread+60>:   stw     r29,7792(r9)

> 	0x0000000010000d4c <child_thread+60>:   bl      0x10000a88
> 	0x0000000010000d50 <child_thread+64>:   ld      r2,40(r1)
> 	0x0000000010000d54 <child_thread+68>:   ld      r9,-32688(r2)
> --->	0x0000000010000d58 <child_thread+72>:   std     r29,0(r9)

In both these cases, the storage access goes to LSU0, so you're
not hitting the errata.

I noticed set_dabr() doesn't do proper synchronisation insns, could
you try this patch?  I doubt it helps, but it changes the code to do
"the right thing".


diff --git a/arch/powerpc/kernel/process.c 
b/arch/powerpc/kernel/process.c
index 4846bf5..ee925f5 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -250,7 +250,9 @@ int set_dabr(unsigned long dabr)

         /* XXX should we have a CPU_FTR_HAS_DABR ? */
  #if defined(CONFIG_PPC64) || defined(CONFIG_6xx)
+       asm("sync");
         mtspr(SPRN_DABR, dabr);
+       asm("isync");
  #endif
         return 0;
  }


(badly copy/pasted, please apply by hand.  Will send a real patch later 
;-) )

If this doesn't help, and the failures stay intermittent, I don't think 
there
is a close-to-the-hardware problem here.


Segher

  reply	other threads:[~2008-03-14  2:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-26 22:02 PPC upstream kernel ignored DABR bug Jan Kratochvil
2007-11-27 22:35 ` Arnd Bergmann
2007-11-28  8:59   ` Jan Kratochvil
2007-11-28 12:28     ` Arnd Bergmann
2007-11-28 12:45       ` Jan Kratochvil
2007-11-28 22:59   ` Geoff Levand
2007-11-29  0:13     ` Arnd Bergmann
2008-03-10  0:53       ` Luis Machado
2008-03-10 14:01         ` Jens Osterkamp
2008-03-10 15:13           ` Luis Machado
2008-03-10 19:19           ` Roland McGrath
2008-03-10 19:36             ` Luis Machado
2008-03-10 19:50               ` Olof Johansson
2008-03-10 19:54                 ` Roland McGrath
2008-03-10 22:06             ` Segher Boessenkool
2008-03-12 17:51           ` Luis Machado
2008-03-12 22:30             ` Jens Osterkamp
2008-03-13  1:47               ` Roland McGrath
2008-03-13 22:20                 ` Segher Boessenkool
2008-03-13 22:42                   ` Roland McGrath
2008-03-14  2:11                     ` Segher Boessenkool [this message]
2008-03-14  7:45                       ` Roland McGrath
2008-03-14  8:42                         ` Segher Boessenkool
2008-03-16 20:38                           ` Benjamin Herrenschmidt
2008-03-16 20:37                   ` Benjamin Herrenschmidt
2008-03-26 20:57                 ` Josh Boyer
2008-03-27  1:47                   ` Josh Boyer
2008-03-13 13:13               ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d9961563967d5f810a5f597519a7c63@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=arnd@arndb.de \
    --cc=jan.kratochvil@redhat.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=roland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).