linux/arch/mn10300/mm
David Howells 57cf4f78c6 MN10300: Fix flush_icache_range()
flush_icache_range() is given virtual addresses to describe the region.  It
deals with these by attempting to translate them through the current set of
page tables.

This is fine for userspace memory and vmalloc()'d areas as they are governed by
page tables.  However, since the regions above 0x80000000 aren't translated
through the page tables by the MMU, the kernel doesn't bother to set up page
tables for them (see paging_init()).

This means flush_icache_range() as it stands cannot be used to flush regions of
the VM area between 0x80000000 and 0x9fffffff where the kernel resides if the
data cache is operating in WriteBack mode.

To fix this, make flush_icache_range() first check for addresses in the upper
half of VM space and deal with them appropriately, before dealing with any
range in the page table mapped area.

Ordinarily, this is not a problem, but it has the capacity to make kprobes and
kgdb malfunction.  It should not affect gdbstub, signal frame setup or module
loading as gdb has its own flush functions, and the others take place in the
page table mapped area only.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-01 15:01:47 -07:00
..
cache-disabled.c MN10300: Handle missing sys_cacheflush() when caching disabled 2010-09-28 18:01:14 -07:00
cache-flush-mn10300.S
cache-mn10300.S
cache.c MN10300: Fix flush_icache_range() 2010-10-01 15:01:47 -07:00
dma-alloc.c arch/mn10300/mm: eliminate NULL dereference 2010-08-23 11:41:24 -07:00
extable.c
fault.c mn10300: invoke oom-killer from page fault 2010-06-04 15:21:44 -07:00
init.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Makefile MN10300: Handle missing sys_cacheflush() when caching disabled 2010-09-28 18:01:14 -07:00
misalignment.c mn10300: add cc clobbers to asm statements 2010-01-11 09:34:10 -08:00
mmu-context.c MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
pgtable.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
tlb-mn10300.S MN10300: Don't set the dirty bit in the DTLB entries in the TLB-miss handler 2009-06-11 09:02:20 -07:00