From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Wed, 10 Aug 2011 12:18:32 +0530 Subject: [U-Boot] [PATCH 4/4] armv7: cache: remove flush on un-aligned invalidate In-Reply-To: References: <1312197486-31712-2-git-send-email-aneesh@ti.com> <1312888225-22293-5-git-send-email-aneesh@ti.com> Message-ID: <4E4229C0.6090201@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Anton, On Tuesday 09 August 2011 10:09 PM, Anton Staaf wrote: > I'm not sure what the larger context of this change is, but it seems > like a bad idea to me. There are a lot of locations in U-Boot that Please see this thread for the context. http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/105113/focus=105135 > will end up causing an unaligned invalidate (ext2 and dos file system > code in particular). And this change will cause those unaligned > invalidates to possibly throw away stores to adjacent variables. If No. Those partial cache-lines on the boundary are left alone. They are not invalidated. So, it still affects only the party calling the invalidate. > you are going to make this change you should at least assert instead > of just printing a warning. And there should be a concerted effort to > clean up the buffer management in U-Boot so that invalidates will > never be unaligned. This is also a departure from the cache > management implementations in the Linux kernel, not that U-Boot has to > do exactly what they do, but I feel they have the correct > implementation, from the perspective of ensuring that all stores > actually make it to main memory. Yes, I had implemented it in line with the kernel apporach. However, with un-aligned buffers there is no perfect solution anyway. So, I don't have a strong opinion on this. Leaving alone the boundary cache-lines and printing a big warning seems reasonable enough. best regards, Aneesh