From 90833fdab89da02fc0276224167f0a42e5176f41 Mon Sep 17 00:00:00 2001 From: Jared Hulbert Date: Wed, 22 Aug 2007 17:38:25 +0100 Subject: [ARM] 4554/1: replace consistent_sync() with flush_ioremap_region() This fixes a regression from around 2.6.18, consistent_sync() will now BUG() under these circumstances. The use of consistent_sync() was a hack, replacing it's usage here with a new function, flush_ioremap_region(). Signed-off-by: Jared Hulbert Acked-by: Pavel Pisa Signed-off-by: Russell King --- include/asm-arm/cacheflush.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/asm-arm/cacheflush.h') diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index d1294a46c70..6c1c968b298 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h @@ -426,6 +426,13 @@ static inline void flush_anon_page(struct vm_area_struct *vma, */ #define flush_icache_page(vma,page) do { } while (0) +static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt, + unsigned offset, size_t size) +{ + const void *start = (void __force *)virt + offset; + dmac_inv_range(start, start + size); +} + #define __cacheid_present(val) (val != read_cpuid(CPUID_ID)) #define __cacheid_type_v7(val) ((val & (7 << 29)) == (4 << 29)) -- cgit v1.2.3