X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=arch%2Farm%2Flib%2Fcache.c;h=4f72f8914cc7bc5e18220de629704fbe8176dced;hb=067716bac59716b07f1ee70d9bf6e5528289bb45;hp=3bd87105c58bb760048f127c5e292ae9fec0362e;hpb=62e92077a8936e60087d55683538ee386cc673aa;p=platform%2Fkernel%2Fu-boot.git diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index 3bd8710..4f72f89 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -46,6 +46,24 @@ __weak void flush_dcache_range(unsigned long start, unsigned long stop) /* An empty stub, real implementation should be in platform code */ } +int check_cache_range(unsigned long start, unsigned long stop) +{ + int ok = 1; + + if (start & (CONFIG_SYS_CACHELINE_SIZE - 1)) + ok = 0; + + if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1)) + ok = 0; + + if (!ok) { + warn_non_spl("CACHE: Misaligned operation at range [%08lx, %08lx]\n", + start, stop); + } + + return ok; +} + #ifdef CONFIG_SYS_NONCACHED_MEMORY /* * Reserve one MMU section worth of address space below the malloc() area that