linux/arch/mips/mm
Kevin Cernekee d0023c4a0a MIPS: Add SYNC after cacheflush
On processors with deep write buffers, it is likely that many cycles
will pass between a CACHE instruction and the time the data actually
gets written out to DRAM.  Add a SYNC instruction to ensure that the
buffers get emptied before the flush functions return.

Actual problem seen in the wild:

1) dma_alloc_coherent() allocates cached memory

2) memset() is called to clear the new pages

3) dma_cache_wback_inv() is called to flush the zero data out to memory

4) dma_alloc_coherent() returns an uncached (kseg1) pointer to the
freshly allocated pages

5) Caller writes data through the kseg1 pointer

6) Buffered writeback data finally gets flushed out to DRAM

7) Part of caller's data is inexplicably zeroed out

This patch adds SYNC between steps 3 and 4, which fixed the problem.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: 
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-07-25 17:26:53 +01:00
..
c-octeon.c
c-r3k.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
c-r4k.c MIPS: Add SYNC after cacheflush 2011-07-25 17:26:53 +01:00
c-tx39.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
cache.c
cerr-sb1.c
cex-gen.S
cex-oct.S
cex-sb1.S Fix common misspellings 2011-03-31 11:26:23 -03:00
dma-default.c MIPS: HIGHMEM DMA on noncoherent MIPS32 processors 2011-07-25 17:26:52 +01:00
extable.c
fault.c
highmem.c
hugetlbpage.c
init.c MIPS: pfn_valid() is broken on low memory HIGHMEM systems 2011-07-25 17:26:52 +01:00
ioremap.c
Makefile MIPS: Move arch_get_unmapped_area and gang to new file. 2011-05-19 09:55:49 +01:00
mmap.c MIPS: topdown mmap support 2011-07-25 17:26:51 +01:00
page.c
pgtable-32.c
pgtable-64.c
sc-ip22.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
sc-mips.c
sc-r5k.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
sc-rm7k.c
tlb-r3k.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
tlb-r4k.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
tlb-r8k.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
tlbex-fault.S
tlbex.c MIPS: Netlogic: Cache, TLB support and feature overrides for XLR 2011-05-19 09:55:40 +01:00
uasm.c