Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: Cleanup whitespace damage in sh4_flush_icache_range().

There was quite a lot of tab->space damage done here from a former patch,
clean it up once and for all.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+33 -30
+33 -30
arch/sh/mm/cache-sh4.c
··· 46 46 static void sh4_flush_icache_range(void *args) 47 47 { 48 48 struct flusher_data *data = args; 49 - int icacheaddr; 50 49 unsigned long start, end; 51 50 unsigned long flags, v; 52 51 int i; ··· 53 54 start = data->addr1; 54 55 end = data->addr2; 55 56 56 - /* If there are too many pages then just blow the caches */ 57 - if (((end - start) >> PAGE_SHIFT) >= MAX_ICACHE_PAGES) { 58 - local_flush_cache_all(args); 59 - } else { 60 - /* selectively flush d-cache then invalidate the i-cache */ 61 - /* this is inefficient, so only use for small ranges */ 62 - start &= ~(L1_CACHE_BYTES-1); 63 - end += L1_CACHE_BYTES-1; 64 - end &= ~(L1_CACHE_BYTES-1); 65 - 66 - local_irq_save(flags); 67 - jump_to_uncached(); 68 - 69 - for (v = start; v < end; v+=L1_CACHE_BYTES) { 70 - asm volatile("ocbwb %0" 71 - : /* no output */ 72 - : "m" (__m(v))); 73 - 74 - icacheaddr = CACHE_IC_ADDRESS_ARRAY | ( 75 - v & cpu_data->icache.entry_mask); 76 - 77 - for (i = 0; i < cpu_data->icache.ways; 78 - i++, icacheaddr += cpu_data->icache.way_incr) 79 - /* Clear i-cache line valid-bit */ 80 - ctrl_outl(0, icacheaddr); 81 - } 82 - 83 - back_to_cached(); 84 - local_irq_restore(flags); 57 + /* If there are too many pages then just blow away the caches */ 58 + if (((end - start) >> PAGE_SHIFT) >= MAX_ICACHE_PAGES) { 59 + local_flush_cache_all(NULL); 60 + return; 85 61 } 62 + 63 + /* 64 + * Selectively flush d-cache then invalidate the i-cache. 65 + * This is inefficient, so only use this for small ranges. 66 + */ 67 + start &= ~(L1_CACHE_BYTES-1); 68 + end += L1_CACHE_BYTES-1; 69 + end &= ~(L1_CACHE_BYTES-1); 70 + 71 + local_irq_save(flags); 72 + jump_to_uncached(); 73 + 74 + for (v = start; v < end; v += L1_CACHE_BYTES) { 75 + unsigned long icacheaddr; 76 + 77 + __ocbwb(v); 78 + 79 + icacheaddr = CACHE_IC_ADDRESS_ARRAY | (v & 80 + cpu_data->icache.entry_mask); 81 + 82 + /* Clear i-cache line valid-bit */ 83 + for (i = 0; i < cpu_data->icache.ways; i++) { 84 + __raw_writel(0, icacheaddr); 85 + icacheaddr += cpu_data->icache.way_incr; 86 + } 87 + } 88 + 89 + back_to_cached(); 90 + local_irq_restore(flags); 86 91 } 87 92 88 93 static inline void flush_cache_4096(unsigned long start,