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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'nios2-v4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2

Pull nios2 fix from Ley Foon Tan:
"nios2: fix cache coherency"

* tag 'nios2-v4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
nios2: fix cache coherency

+4 -20
+4 -20
arch/nios2/mm/cacheflush.c
··· 23 23 end += (cpuinfo.dcache_line_size - 1); 24 24 end &= ~(cpuinfo.dcache_line_size - 1); 25 25 26 - for (addr = start; addr < end; addr += cpuinfo.dcache_line_size) { 27 - __asm__ __volatile__ (" flushda 0(%0)\n" 28 - : /* Outputs */ 29 - : /* Inputs */ "r"(addr) 30 - /* : No clobber */); 31 - } 32 - } 33 - 34 - static void __flush_dcache_all(unsigned long start, unsigned long end) 35 - { 36 - unsigned long addr; 37 - 38 - start &= ~(cpuinfo.dcache_line_size - 1); 39 - end += (cpuinfo.dcache_line_size - 1); 40 - end &= ~(cpuinfo.dcache_line_size - 1); 41 - 42 26 if (end > start + cpuinfo.dcache_size) 43 27 end = start + cpuinfo.dcache_size; 44 28 ··· 96 112 97 113 void flush_cache_all(void) 98 114 { 99 - __flush_dcache_all(0, cpuinfo.dcache_size); 115 + __flush_dcache(0, cpuinfo.dcache_size); 100 116 __flush_icache(0, cpuinfo.icache_size); 101 117 } 102 118 ··· 166 182 */ 167 183 unsigned long start = (unsigned long)page_address(page); 168 184 169 - __flush_dcache_all(start, start + PAGE_SIZE); 185 + __flush_dcache(start, start + PAGE_SIZE); 170 186 } 171 187 172 188 void flush_dcache_page(struct page *page) ··· 252 268 { 253 269 flush_cache_page(vma, user_vaddr, page_to_pfn(page)); 254 270 memcpy(dst, src, len); 255 - __flush_dcache_all((unsigned long)src, (unsigned long)src + len); 271 + __flush_dcache((unsigned long)src, (unsigned long)src + len); 256 272 if (vma->vm_flags & VM_EXEC) 257 273 __flush_icache((unsigned long)src, (unsigned long)src + len); 258 274 } ··· 263 279 { 264 280 flush_cache_page(vma, user_vaddr, page_to_pfn(page)); 265 281 memcpy(dst, src, len); 266 - __flush_dcache_all((unsigned long)dst, (unsigned long)dst + len); 282 + __flush_dcache((unsigned long)dst, (unsigned long)dst + len); 267 283 if (vma->vm_flags & VM_EXEC) 268 284 __flush_icache((unsigned long)dst, (unsigned long)dst + len); 269 285 }