linux/arch/parisc
John David Anglin 50861f5a02 parisc: Fix cache routines to ignore vma's with an invalid pfn
The parisc architecture does not have a pte special bit. As a result,
special mappings are handled with the VM_PFNMAP and VM_MIXEDMAP flags.
VM_MIXEDMAP mappings may or may not have a "struct page" backing. When
pfn_valid() is false, there is no "struct page" backing. Otherwise, they
are treated as normal pages.

The FireGL driver uses the VM_MIXEDMAP without a backing "struct page".
This treatment caused a panic due to a TLB data miss in
update_mmu_cache. This appeared to be in the code generated for
page_address(). We were in fact using a very circular bit of code to
determine the physical address of the PFN in various cache routines.
This wasn't valid when there was no "struct page" backing.  The needed
address can in fact be determined simply from the PFN itself without
using the "struct page".

The attached patch updates update_mmu_cache(), flush_cache_mm(),
flush_cache_range() and flush_cache_page() to check pfn_valid() and to
directly compute the PFN physical and virtual addresses.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: <stable@vger.kernel.org> # 3.10
Signed-off-by: Helge Deller <deller@gmx.de>
2013-07-31 23:41:47 +02:00
..
configs kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
hpux [readdir] constify ->actor 2013-06-29 12:57:05 +04:00
include Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-14 11:42:26 -07:00
kernel parisc: Fix cache routines to ignore vma's with an invalid pfn 2013-07-31 23:41:47 +02:00
lib parisc: Fix gcc miscompilation in pa_memcpy() 2013-07-09 22:09:23 +02:00
math-emu parisc: avoid undefined shift in cnv_float.h 2013-01-07 23:06:22 +01:00
mm mm/PARISC: prepare for killing free_all_bootmem_node() 2013-07-03 16:07:39 -07:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
defpalo.conf parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
install.sh parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
Kconfig Merge branch 'kconfig-diet' from Dave Hansen 2013-07-04 11:25:51 -07:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Makefile parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
nm