linux-mips
[Top] [All Lists]

Re: __flush_cache_all() miscellany

To: Justin Carlson <justinca@cs.cmu.edu>
Subject: Re: __flush_cache_all() miscellany
From: Jun Sun <jsun@mvista.com>
Date: Wed, 29 May 2002 16:24:37 -0700
Cc: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>, linux-mips@oss.sgi.com, ralf@oss.sgi.com
References: <Pine.GSO.3.96.1020529222325.17584N-100000@delta.ds2.pg.gda.pl> <1022713145.7644.363.camel@ldt-sj3-022.sj.broadcom.com>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901
Justin Carlson wrote:


I'm still looking for a reason for the existence of __flush_cache_all().



It is needed by kgdb where gdb client may modify several instructions before a 'c' command is issued. In that case, you cannot use flush_icache_range because you don't know the range. It is probably not safe either as the data cache may not be written back yet

Does flush_icache_range() mandates write-back of dcache in the same range? If it does, you might be able to get away with flush_icache_range(ICACHE_BEGIN, ICACHE_END).

Like someone else has pointed out, __flush_cache_all() is introduced to ensure i-cache/d-cache consistency. I remember it was shortly introduced after we had the first cache-coherent system where flush_cache_all() is a null function.

Jun



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