linux-mips
[Top] [All Lists]

Re: [PATCH]: c-r4k.c 4/7 flush_cache_mm cleanup

To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Subject: Re: [PATCH]: c-r4k.c 4/7 flush_cache_mm cleanup
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 28 Mar 2003 19:59:53 +0100
Cc: Juan Quintela <quintela@mandrakesoft.com>, mipslist <linux-mips@linux-mips.org>
In-reply-to: <Pine.GSO.3.96.1030328175039.26178B-100000@delta.ds2.pg.gda.pl>; from macro@ds2.pg.gda.pl on Fri, Mar 28, 2003 at 06:51:57PM +0100
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <m2smt89ut8.fsf@neno.mitica> <Pine.GSO.3.96.1030328175039.26178B-100000@delta.ds2.pg.gda.pl>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5.1i
On Fri, Mar 28, 2003 at 06:51:57PM +0100, Maciej W. Rozycki wrote:

> >     flush_cache_mm can use __flush_cache_all.
> 
>  Wrong, it should use r4k_flush_pcache_all() unconditionally, but I'm told
> such a setup triggers a bug somewhere, that needs to be tracked down
> before committing that change to the CVS.

Now that the problem is mentioned on the list lemme elaborate a bit.  The
problem mentioned only affects R4000SC and R4400SC processors.
Flush_cache_mm is only used when a mm is either copied on fork or when
it's finally destroyed.  Because the S-cache is is physically indexed
and the P-cache is refilled from the S-cache if data should be still in
there we don't need to flush the S-cache ever for any of the mm's
cacheflushing functions.  So the observation that things are only
working properly if we do flush the S-cache also suggest we're either
having a bug elsewhere in the cache code or we're hitting a hardware
problem.

  Ralf

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