linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Edelsohn <dje@watson.ibm.com>
To: "kerler" <kerler@mailandnews.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: dynamic modification exception handler
Date: Mon, 26 Feb 2001 13:35:25 -0500	[thread overview]
Message-ID: <200102261835.NAA26566@mal-ach.watson.ibm.com> (raw)
In-Reply-To: Message from "kerler" <kerler@mailandnews.com> of "Mon, 26 Feb 2001 19:06:27 +0800." <017201c09fe4$52a1cff0$5ef1d092@chn.agilent.com>


	The suggested sequence for 604 and 604-derived processors is:

     dcbst (or dcbf)          ;# flush data block to memory
     sync                     ;# ensure flush made it to memory
     icbi                     ;# invalidate block from icache
     sync                     ;# wait for icbi to be globally performed
     isync                    ;# refetch instructions

	The dcbst must be performed before the icbi, because otherwise the
processor instruction prefetch mechanism could refetch the (stale) block
from memory before the dcbst/dcbf has actually been written back to
memory.  The sync between them is required for the same reason, because
icbi could be performed locally before the dcbst has sent the block to
memory.

	The dcbst/sync/icbi sequence can be batched up to amortize the
cost of the sync operations, but it should be written so all the dcbst's
are performed, then a sync, then all the icbi's:

     mr        r5, r3
     mtctr     blocks
$1:
     dcbst     r0, r5
     addi      r5, r5, 32
     bdnz      $1
     sync
     mr        r5, r3
     mtctr     blocks
$2:
     icbi      r0, r5
     addi      r5, r5, 32
     bdnz      $2

     sync
     isync


David

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-02-26 18:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-19  9:04 why there is NOT support for FADS board ? Rolf Liu
2001-02-19 17:57 ` Wolfgang Denk
2001-02-19 18:10 ` Dan Malek
2001-02-26 11:06 ` dynamic modification exception handler kerler
2001-02-26 18:35   ` David Edelsohn [this message]
2001-02-27  2:08     ` kerler
2001-03-01  3:49     ` kerler
2001-03-01  4:11       ` David Edelsohn

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=200102261835.NAA26566@mal-ach.watson.ibm.com \
    --to=dje@watson.ibm.com \
    --cc=kerler@mailandnews.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /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).