From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Thu, 21 Mar 2013 13:51:39 -0500 Subject: [U-Boot] [RFC] command/cache: Add flush_cache command In-Reply-To: <514A945F.8040700@ti.com> (from r.sricharan@ti.com on Thu Mar 21 00:02:23 2013) References: <20130320191519.GO25919@bill-the-cat> <1363808165.25034.14@snotra> <20130320231157.4f312493@lilith> <1363818951.25034.28@snotra> <4BABA974-A22D-4FD7-9678-035DD5AE5107@prograde.net> <1363823318.25034.33@snotra> <867D8C0F-FE72-49A5-915D-470E731437C4@prograde.net> <1363825902.25034.37@snotra> <514A945F.8040700@ti.com> Message-ID: <1363891899.31522.19@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 03/21/2013 12:02:23 AM, Sricharan R wrote: > On Thursday 21 March 2013 06:01 AM, Scott Wood wrote: > > On 03/20/2013 07:27:29 PM, Michael Cashwell wrote: > >> On Mar 20, 2013, at 7:48 PM, Scott Wood > wrote: > >> > >> > On 03/20/2013 06:33:41 PM, Michael Cashwell wrote: > >> > > >> >> What is the purpose of limiting the memory range to be flushed? > Is there a reason one might want to NOT flush certain data sitting in > a dirty cache line out to memory before doing a go or boot command? > >> > > >> > Because it would take a while to flush all of RAM? > >> > >> "Flushing all of RAM" is what trips me up. Fundamentally, that > puts the cart in front of the horse. The goal isn't to flush all of > RAM but rather to flush all of cache. > > > > Right, I was just responding to your question of, "What is the > purpose of limiting the memory range to be flushed?" > > > >> Iterating over the small thing rather than the large would seem > reasonably efficient. > >> > >> But as you say, if there are architectures where that can't be > done and you must pass GBs of physical address space (rather than KB > of cache space) through some process then range limiting it does make > sense. > > > > Right. The range specified is a minimum to be flushed -- if a > particular architecture finds it easier/quicker to flush everything > instead, that's fine. > > > So in your case, how do you find out the addresses of buffers to be > flushed from command ? > Just thinking how this can be used generically ? I'm not sure what you're asking. How does the user know what address range to pass to the command? It's whatever covers the program they want to run. -Scott