From: Dave Liu Date: Fri, 25 Apr 2008 18:28:04 +0800 Subject: [U-Boot-Users] [PATCH][RFC] lib_ppc: make the flush_cache stronger In-Reply-To: <20080424144517.5F17E24AB1@gemini.denx.de> References: <20080424144517.5F17E24AB1@gemini.denx.de> Message-ID: <1209119284.3656.5.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > > Current flush_cache code does > > > > 1. clean the dcache with dcbst, but not invalidate dcache > > 2. invalidate icache > > > > This patch use the dcbf instead of dcbst to have stronger > > semantic, clean the dcache and invalidate dcache. > > On which processors did you test the changes? I have some unclear > memories of dcbf having problems on for example MPC8xx ? on 83xx parts. I remember the 601 processor not support the dcbf. > > We have two options: > > > > 1. Separate functions for them like linux kernel. > > A. clean dcache (dcbst) for DMA_TO_DEVICE > > B. invalidate dcache (dcbi) for DMA_FROM_DEVICE > > C. flush dcache (dcbf) for DMA_BIDIRECTIONAL. > > 2. Make current flush_cache stronger semanctic. > > use the dcbf instead of dcbst. > > > > Which one is better? or you have better option? > > Please suggest. > > We discussed this a bit on IRC; Kumar suggested to go for 1., and I > agree. Where is the IRC? Could you point it to me? Thanks, Dave