Thread (5 messages) flat view 5 messages, 2 authors, 2006-10-09

Re: [PATCH] powerpc: Cell timebase bug workaround

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-10-09 08:58:46

On Mon, 2006-10-09 at 18:36 +1000, Stephen Rothwell wrote:
On Mon, 09 Oct 2006 17:05:17 +1000 Benjamin Herrenschmidt [off-list ref] wrote:
quoted
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help