···4646static void sh4_flush_icache_range(void *args)4747{4848 struct flusher_data *data = args;4949- int icacheaddr;5049 unsigned long start, end;5150 unsigned long flags, v;5251 int i;···5354 start = data->addr1;5455 end = data->addr2;55565656- /* If there are too many pages then just blow the caches */5757- if (((end - start) >> PAGE_SHIFT) >= MAX_ICACHE_PAGES) {5858- local_flush_cache_all(args);5959- } else {6060- /* selectively flush d-cache then invalidate the i-cache */6161- /* this is inefficient, so only use for small ranges */6262- start &= ~(L1_CACHE_BYTES-1);6363- end += L1_CACHE_BYTES-1;6464- end &= ~(L1_CACHE_BYTES-1);6565-6666- local_irq_save(flags);6767- jump_to_uncached();6868-6969- for (v = start; v < end; v+=L1_CACHE_BYTES) {7070- asm volatile("ocbwb %0"7171- : /* no output */7272- : "m" (__m(v)));7373-7474- icacheaddr = CACHE_IC_ADDRESS_ARRAY | (7575- v & cpu_data->icache.entry_mask);7676-7777- for (i = 0; i < cpu_data->icache.ways;7878- i++, icacheaddr += cpu_data->icache.way_incr)7979- /* Clear i-cache line valid-bit */8080- ctrl_outl(0, icacheaddr);8181- }8282-8383- back_to_cached();8484- local_irq_restore(flags);5757+ /* If there are too many pages then just blow away the caches */5858+ if (((end - start) >> PAGE_SHIFT) >= MAX_ICACHE_PAGES) {5959+ local_flush_cache_all(NULL);6060+ return;8561 }6262+6363+ /*6464+ * Selectively flush d-cache then invalidate the i-cache.6565+ * This is inefficient, so only use this for small ranges.6666+ */6767+ start &= ~(L1_CACHE_BYTES-1);6868+ end += L1_CACHE_BYTES-1;6969+ end &= ~(L1_CACHE_BYTES-1);7070+7171+ local_irq_save(flags);7272+ jump_to_uncached();7373+7474+ for (v = start; v < end; v += L1_CACHE_BYTES) {7575+ unsigned long icacheaddr;7676+7777+ __ocbwb(v);7878+7979+ icacheaddr = CACHE_IC_ADDRESS_ARRAY | (v &8080+ cpu_data->icache.entry_mask);8181+8282+ /* Clear i-cache line valid-bit */8383+ for (i = 0; i < cpu_data->icache.ways; i++) {8484+ __raw_writel(0, icacheaddr);8585+ icacheaddr += cpu_data->icache.way_incr;8686+ }8787+ }8888+8989+ back_to_cached();9090+ local_irq_restore(flags);8691}87928893static inline void flush_cache_4096(unsigned long start,