From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] powerpc: Cell timebase bug workaround
Date: Mon, 09 Oct 2006 18:57:55 +1000 [thread overview]
Message-ID: <1160384275.10229.4.camel@localhost.localdomain> (raw)
In-Reply-To: <20061009183652.3d4897bc.sfr@canb.auug.org.au>
On Mon, 2006-10-09 at 18:36 +1000, Stephen Rothwell wrote:
> On Mon, 09 Oct 2006 17:05:17 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > > Why not branch back to the mftb if the lower word is zero (this would
> > > also take care of the very unlikely "hitting the bug more than once" case
> > > and the "normal" case would then not have to branch at all. (And it uses
> > > one less instruction.)
> >
> > Because that would cause us to spinloop for the whole duration of a tb
> > tick in that case, which is pretty bad when the timebase is slow (the
> > slower I've seen so far is 14Mhz).
>
> Right! /me hits himself in the forehead :-)
Well, it's not -that- stupid .... I did consider it. The chances of
hitting the problem at all are so small that taking a 100ns hit or so
when it happen isn't -that- bad and it does make the normal case nicer
avoiding a branch....
In fact, I'll ask Mike what he thinks of doing it that way instead, it
might be a better option in the long run.
Ben.
prev parent reply other threads:[~2006-10-09 8:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-09 5:10 [PATCH] powerpc: Cell timebase bug workaround Benjamin Herrenschmidt
2006-10-09 6:56 ` Stephen Rothwell
2006-10-09 7:05 ` Benjamin Herrenschmidt
2006-10-09 8:36 ` Stephen Rothwell
2006-10-09 8:57 ` Benjamin Herrenschmidt [this message]
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=1160384275.10229.4.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
/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).