aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-03-01 02:37:56 +0000
committerRalf Baechle <ralf@linux-mips.org>2016-05-13 14:01:57 +0200
commit763fee97e743acb4f6e683a00fd2e7f5ad2484fb (patch)
tree093531ec5198ae6eb270d45a252208340a6636bb
parentMIPS: OCTEON: cavium_octeon_defconfig: enable all OCTEON SoC drivers (diff)
downloadlinux-dev-763fee97e743acb4f6e683a00fd2e7f5ad2484fb.tar.xz
linux-dev-763fee97e743acb4f6e683a00fd2e7f5ad2484fb.zip
MIPS: Flush dcache for flush_kernel_dcache_page
The flush_kernel_dcache_page function was previously essentially a nop. This is incorrect for MIPS, where if a page has been modified & either it aliases or it's executable & the icache doesn't fill from dcache then the content needs to be written back from dcache to the next level of the cache hierarchy (which is shared with the icache). Implement this by simply calling flush_dcache_page, treating this kmapped cache flush function (flush_kernel_dcache_page) exactly the same as its non-kmapped counterpart (flush_dcache_page). Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Lars Persson <lars.persson@axis.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12719/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/cacheflush.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cacheflush.h b/arch/mips/include/asm/cacheflush.h
index 723229f4cf27..7e9f46818eba 100644
--- a/arch/mips/include/asm/cacheflush.h
+++ b/arch/mips/include/asm/cacheflush.h
@@ -132,6 +132,7 @@ static inline void kunmap_noncoherent(void)
static inline void flush_kernel_dcache_page(struct page *page)
{
BUG_ON(cpu_has_dc_aliases && PageHighMem(page));
+ flush_dcache_page(page);
}
/*