cache coherence problem

Michael R. Zucca mrz5149 at acm.org
Tue Nov 18 13:38:32 EST 2003


On Monday, November 17, 2003, at 08:16  PM, 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!

I don't think this is the kernel's responsibility. I think this is just
life with PPCs. If you dump random instructions into random memory, you
have to make sure everything is flushed and the icache is invalidated
before executing the code. You have to do the same thing when you do
self-modifying code.

Why would you want to do this, anyway?

--
----------------------------------------------
  Michael Zucca - mrz5149 at acm.org
----------------------------------------------
  "I'm too old to use Emacs." -- Rod MacDonald
----------------------------------------------


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





More information about the Linuxppc-dev mailing list