linux-mips
[Top] [All Lists]

Re: RM7k cache_flush_sigtramp

To: Dominic Sweetman <dom@mips.com>
Subject: Re: RM7k cache_flush_sigtramp
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 1 Aug 2003 11:26:49 +0200
Cc: Adam Kiepul <Adam_Kiepul@pmc-sierra.com>, Fuxin Zhang <fxzhang@ict.ac.cn>, linux-mips@linux-mips.org
In-reply-to: <16170.7179.635988.268987@doms-laptop.algor.co.uk>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <9DFF23E1E33391449FDC324526D1F259017DF087@SJC1EXM02> <16170.7179.635988.268987@doms-laptop.algor.co.uk>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.1i
On Fri, Aug 01, 2003 at 08:51:39AM +0100, Dominic Sweetman wrote:

> The MIPS32/MIPS64 release 2 architecture includes a useful instruction
> SYNCI which does the whole job (repeat on each affected cache line)
> and is legal in user mode; this will take a while to spread but I'd
> recommend it as a model worth following.

> So I hope that kernels will provide one function for "I've just
> written instructions and now I want to execute them", and not export
> the separate writeback-D/invalidate-I interface.

Linux supports the traditional MIPS UNIX cacheflush(2) syscall through
a libc interface.  Since I've not seen any other use for the call than
I/D-cache synchronization.  I'd just make cacheflush(3) use SYNCI where
available (Or maybe one of the other vendor specific mechanisms ...) and
fallback to cacheflush(2) where available.  Gcc would be another place
to teach about SYNCI for it's trampolines.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>