public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel•crashing.org>
To: Juergen Kienhoefer <juergen@kienhoefer•com>
Cc: linuxppc-dev list <linuxppc-dev@lists•linuxppc.org>
Subject: Re: cache coherence problem
Date: Tue, 18 Nov 2003 16:22:35 +1100	[thread overview]
Message-ID: <1069132955.7170.120.camel@gaston> (raw)
In-Reply-To: <3FB9A77C.3030101@kienhoefer.com>


On Tue, 2003-11-18 at 16:00, Juergen Kienhoefer wrote:
> Guys,
> Thank you very much for the ideas.
> Basically, what I need to do is:
> dcbst
> sync
> iccci
^^^^^^^
No: icbi

> sync
> isync
> for every 32 bytes of the memory block I put code in.
> Right?
> Cheers
> Juergen
>
>
> Benjamin Herrenschmidt wrote:
>
> >On Tue, 2003-11-18 at 12:16, Juergen Kienhoefer wrote:
> >
> >
> >>Guys,
> >>Look at the folloging test program. It mmaps memory, puts some
> >>instructions in it and executes it.
> >>Sometimes it works, sometimes it crashes with illegal instruction.
> >>This smells like cache problems.
> >>Should the kernel clean the instruction cache for these addresses
> >>in mmap system call?
> >>Thanks for any thoughts!
> >>Juergen
> >>
> >>
> >
> >It's your duty to ensure cache coherency. Actually, the kernel
> >will eventually clean the icache for newly mapped in blank pages,
> >but it will certainly not enforce flush of your writes to memory.
> >
> >You need to first flush the data cache to memory using dcbf or
> >dcbst, then sync for this to complete, then invalidate the
> >instruction cache, sync and isync.
> >
> >Ben.
> >
> >
> >
>
>

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

  reply	other threads:[~2003-11-18  5:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-18  1:16 cache coherence problem Juergen Kienhoefer
2003-11-18  2:36 ` Matt Porter
2003-11-18  2:38 ` Michael R. Zucca
2003-11-19 22:35   ` linas
2003-11-18  3:02 ` Benjamin Herrenschmidt
2003-11-18  5:00   ` Juergen Kienhoefer
2003-11-18  5:22     ` Benjamin Herrenschmidt [this message]
2003-11-18  5:24       ` Benjamin Herrenschmidt
2003-11-18 17:40         ` cache coherence problem: FIXED Juergen Kienhoefer
2003-11-18  8:04     ` cache coherence problem Wolfgang Denk
2003-11-18  9:37   ` Gabriel Paubert
2003-11-19  0:35     ` Benjamin Herrenschmidt

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=1069132955.7170.120.camel@gaston \
    --to=benh@kernel$(echo .)crashing.org \
    --cc=juergen@kienhoefer$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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