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: Thu, 13 Mar 2008 23:20:47 +0100 [thread overview]
Message-ID: <2f8f82fe943fcd5103ec4cc39cc1bb26@kernel.crashing.org> (raw)
In-Reply-To: <20080313014745.DE97826F992@magilla.localdomain>
> AFAICT the DABRX register just has two global bits that enable paying
> attention to the DABR register.
It has four bits:
01 match in user mode
02 match in supervisor mode
04 match in hypervisor mode
08 ignore translation field in DABR
If the kernel can write to DABRX, it is running in hypervisor mode, so
it should set 07 instead of 03 (as it currently does) if it wants to
match in kernel mode; or 01, if it doesn't.
OTOH, the Apple version of the 970 is special (it has no separate
hypervisor mode); still, 07 should always work.
> It only needs to be set once at boot time
> (as the cell code does). I don't see how missing that initialization
> could
> ever have explained the behavior we see where DABR matches are
> intermittent.
> If those DABRX bits weren't set then no DABR match would have happened.
> (Apparently they are set before boot on an Apple G5.)
I don't see the Apple boot code initialising DABRX; maybe the bootup
state
for DABRX is 07, dunno. Either way, it would be good if the kernel set
it
properly, esp. if it wants to enable or disable matches in the kernel
itself.
> What we actually see is that DABR matches seem to be reliable when
> things
> are slow, and get intermittent when there are enough threads with DABR
> set.
> I happened across:
>
> http://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/
> 79B6E24422AA101287256E93006C957E/$file/
> PowerPC_970FX_errata_DD3.X_V1.7.pdf
>
> which is "IBM PowerPC 970FX RISC Microprocessor Errata List for DD3.X"
> and contains "Erratum #8: DABRX register might not always be updated
> correctly":
> The only machine I have at home for testing powerpc is an Apple G5,
> supplied to me by IBM. It says:
> cpu : PPC970FX, altivec supported
> revision : 3.0 (pvr 003c 0300)
> so I am guessing this document applies to the chips I have.
Indeed.
> Since I can't
> test on other chips myself, it is plausible from what I've seen that
> there
> is no mysterious kernel problem and only this hardware problem. The
> description of the hardware problem would not make me think that it
> would
> behave this way, but it is not very detailed or precise, or at least
> does
> not seem so to a reader not expert on powerpc.
Since the 970 kernel never sets DABRX currently, #8 cannot explain
_intermittent_ problems: either it always works, or never does.
You could be happening upon #5, if the non-triggering data breakpoints
are with vector loads/stores in strange code.
> I don't know what I can do next to tell whether this processor erratum
> is in
> fact what's happening in the test case. If it is, I don't know if
> there
> might be some arcane way to work around it despite "None" cited above.
It would help if you could give us the disassembly of some code where
the
breakpoint did not trigger; say, that insn and the previous 20 or so
insns.
Segher
next prev parent reply other threads:[~2008-03-13 22:21 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 [this message]
2008-03-13 22:42 ` Roland McGrath
2008-03-14 2:11 ` Segher Boessenkool
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=2f8f82fe943fcd5103ec4cc39cc1bb26@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.