From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 3 Aug 2016 12:35:28 -0600 Subject: [U-Boot] [PATCH] mtd: nand: mxs: fix cache alignment for cache lines >32 In-Reply-To: References: <20160802065518.24140-1-stefan@agner.ch> <25dc4a8aeadcdc3698ce4f59b619dc01@agner.ch> <20160803180908.GA9942@bill-the-cat> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 3 August 2016 at 12:29, Fabio Estevam wrote: > Hi Tom, > > On Wed, Aug 3, 2016 at 3:09 PM, Tom Rini wrote: > >> I feel like we must have done something wrong of late, can you bisect >> when these came in? Thanks! > > This cache warnings start to appear since commit: > > commit bcc53bf095893fbdae531a9a7b5d4ef4a125a7fc > Author: Simon Glass > Date: Sun Jun 19 19:43:05 2016 -0600 > > arm: Show cache warnings in U-Boot proper only > > Avoid bloating the SPL image size. > > Signed-off-by: Simon Glass > > Prior to this commit the cache warnings would be printed only with > DEBUG enabled. Now they are always enabled when we build a non-spl > target. > > We could restore the original behavior and also keep Simon's intention > of not bloating the SPL image size with the following change: > > --- a/arch/arm/lib/cache.c > +++ b/arch/arm/lib/cache.c > @@ -60,10 +60,11 @@ int check_cache_range(unsigned long start, unsigned long sto > if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1)) > ok = 0; > > - if (!ok) { > - warn_non_spl("CACHE: Misaligned operation at range [%08lx, %08lx > - start, stop); > - } > +#ifndef CONFIG_SPL_BUILD > + if (!ok) > + debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n", > + start, stop); > +#endif > > return ok; > } > > If this looks OK, I can submit a formal patch. Actually I think these are bugs and should be fixed. In this case, from what I can tell netboot_common() should cache-align the size in the call to: /* flush cache */ flush_cache(load_addr, size); Regards, Simon