linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: linas@austin.ibm.com (Linas Vepstas)
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: ppc-dev <linuxppc-dev@ozlabs.org>,
	Paul Mackerras <paulus@samba.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH]: powerpc documentation: Clarify why twi appears in the i/o	macros.
Date: Fri, 8 Dec 2006 18:11:30 -0600	[thread overview]
Message-ID: <20061209001130.GA13128@austin.ibm.com> (raw)
In-Reply-To: <177E9875-1C08-4EFF-A066-E33C6C94DD91@kernel.crashing.org>

On Fri, Dec 08, 2006 at 10:54:56PM +0100, Segher Boessenkool wrote:
> >>+ * A data-dependent branch followed by an isync ensures that no
> >
> >I think it's potentially confusing to talk about data-dependent
> >branches when what the code does is a twi instruction.  Even if you
> >argue that a twi is a data-dependent branch (and I disagree with that,
> >since a trap is not a branch),
> 
> If you argue it is *not* a branch, where in the architecture
> documentation can we find any language that gives us the
> guarantee we depend on here?

How about this wording: "A data-dependent branch, or trap word, 
followed by an isync ensures that ..."

> >that wouldn't be obvious to a casual
> >reader of the code.

I was trying to understand why the spidernet driver seemed to 
behave in the crazy ways that it does, and I decided to scrutinize 
this code. Even if one is relatively familiar with the overall
powerpc architecture (as I am), the effect of the twi/isync 
was far from obvious, and left me scratching my head.

> >In other words, I don't think the comment
> >clarifies the situation very much.

Later on, I tripped over some text written by Segher, that
made a lightbulb go off in my head ... and thus I was motiviated
to plagiarizingly cut-n-paste it into here.  So this block of 
text clarified things a lot for me, it "hit the spot".

Now, what I don't know is how accurate it really is ... I don't
know if there aren't any strange deviations on 403 or 601 or 
any of the modern embedded processors, or whatever. But the text
certainly makes me beleive I now know what's going on. As a
service to the next person who scratches thier head in wonderment, 
we should have at least something written up here.

--linas

  reply	other threads:[~2006-12-09  0:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06 18:29 [PATCH]: powerpc documentation: Clarify why twi appears in the i/o macros Linas Vepstas
2006-12-06 18:39 ` Sergei Shtylyov
2006-12-06 19:45   ` Linas Vepstas
     [not found]     ` <45772700.2080708@ru.mvista.com>
2006-12-06 22:22       ` Linas Vepstas
2006-12-08  2:58         ` Paul Mackerras
2006-12-08 21:54           ` Segher Boessenkool
2006-12-09  0:11             ` Linas Vepstas [this message]
2006-12-09  0:19             ` Paul Mackerras
2006-12-09  1:21               ` Linas Vepstas
2006-12-09  9:32               ` Segher Boessenkool
2006-12-11  2:37                 ` Paul Mackerras
2006-12-11 16:37                   ` Segher Boessenkool

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=20061209001130.GA13128@austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=segher@kernel.crashing.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).