]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
MIPS: Flush highmem pages in __flush_dcache_page
authorPaul Burton <paul.burton@imgtec.com>
Tue, 1 Mar 2016 02:37:57 +0000 (02:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 01:14:30 +0000 (18:14 -0700)
commita3dc327c1f5ccbe64d998f5e44926c967afd8a30
tree0122f9205a4787e35e8840584f244cc60b84b86c
parent68d64569ff9568752eee68ee2fceaf68725834e9
MIPS: Flush highmem pages in __flush_dcache_page

commit 234859e49a15323cf1b2331bdde7f658c4cb45fb upstream.

When flush_dcache_page is called on an executable page, that page is
about to be provided to userland & we can presume that the icache
contains no valid entries for its address range. However if the icache
does not fill from the dcache then we cannot presume that the pages
content has been written back as far as the memories that the dcache
will fill from (ie. L2 or further out).

This was being done for lowmem pages, but not for highmem which can lead
to icache corruption. Fix this by mapping highmem pages & flushing their
content from the dcache in __flush_dcache_page before providing the page
to userland, just as is done for lowmem pages.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Lars Persson <lars.persson@axis.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12720/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/mm/cache.c