android_kernel_xiaomi_sm7250/arch/sh/include
Paul Mundt c20351846e sh: Flush only the needed range when unmapping a VMA.
This follows the ARM change from Aaro Koskinen:

	When unmapping N pages (e.g. shared memory) the amount of TLB
	flushes done can be (N*PAGE_SIZE/ZAP_BLOCK_SIZE)*N although it
	should be N at maximum. With PREEMPT kernel ZAP_BLOCK_SIZE is 8
	pages, so there is a noticeable performance penalty when
	unmapping a large VMA and the system is spending its time in
	flush_tlb_range().

	The problem is that tlb_end_vma() is always flushing the full VMA
	range. The subrange that needs to be flushed can be calculated by
	tlb_remove_tlb_entry(). This approach was suggested by Hugh
	Dickins, and is also used by other arches.

	The speed increase is roughly 3x for 8M mappings and for larger
	mappings even more.

Bits and peices are taken from the ARM patch as well as the existing
arch/um implementation that is quite similar.

The end result is a significant reduction in both partial and full TLB
flushes initiated through flush_tlb_range().

At the same time, the nommu implementation was broken, had a superfluous
cache flush, and subsequently would have triggered a BUG_ON() if a
code-path had triggered it. Tidy this up for correctness and provide a
nopped-out implementation there.

More background on the initial discussion can be found at:

	http://marc.info/?t=123609820900002&r=1&w=2
	http://marc.info/?t=123660375800003&r=1&w=2

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 21:19:49 +09:00
..
asm sh: Flush only the needed range when unmapping a VMA. 2009-03-17 21:19:49 +09:00
cpu-common/cpu sh: Allow SH-3 and SH-5 to use common headers. 2008-07-29 22:52:49 +09:00
cpu-sh2/cpu SH2(A) cache update 2008-08-04 16:33:47 +09:00
cpu-sh2a/cpu sh: Move the CPU definition headers from asm/ to cpu/. 2008-10-20 12:04:53 +09:00
cpu-sh3/cpu sh: dma-sh updates for multi IRQ and new SH-4A CPUs. 2009-03-10 17:26:49 +09:00
cpu-sh4/cpu sh: Support for extended ASIDs on PTEAEX-capable SH-X3 cores. 2009-03-17 17:49:49 +09:00
cpu-sh5/cpu sh: Allow SH-3 and SH-5 to use common headers. 2008-07-29 22:52:49 +09:00
mach-common/mach sh: Urquell board support. 2009-03-03 16:22:00 +09:00
mach-dreamcast/mach sh: More header path fixups for mach dir refactoring. 2008-07-29 22:10:01 +09:00
mach-landisk/mach
mach-se/mach sh: mrshpc_setup_windows() needs to be inline. 2008-12-22 18:44:46 +09:00
mach-sh03/mach