]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 6639/1: allow highmem on SMP platforms without h/w TLB ops broadcast
authorNicolas Pitre <nico@fluxnic.net>
Tue, 25 Jan 2011 20:35:38 +0000 (21:35 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 23 Feb 2011 17:24:17 +0000 (17:24 +0000)
commit0d591eba6ffbcaca625486cae4c43e0589dd1545
treea41e04a190420fb970981b8535db7cc9f6e583bd
parent7bf503ca8ff0354006278602fdbed04aede3a279
ARM: 6639/1: allow highmem on SMP platforms without h/w TLB ops broadcast

In commit 66118f8080ee25b2bd3ad27238412e64a25d68e0, highmem support was
deactivated for SMP platforms without hardware TLB ops broadcast because
usage of kmap_high_get() requires that IRQs be disabled when kmap_lock
is locked which is incompatible with the IPI mechanism used by the
software TLB ops broadcast invoked through flush_all_zero_pkmaps().

The reason for kmap_high_get() is to ensure that the currently kmap'd
page usage count does not decrease to zero while we're using its
existing virtual mapping in an atomic context.  With a VIVT cache this
is essential to do due to cache coherency issues, but with a VIPT cache
this is only an optimization so not to pay the price of establishing a
second mapping if an existing one can be used.  However, on VIPT
platforms without hardware TLB maintenance we can give up on that
optimization in order to be able to use highmem.

From ARMv7 onwards the TLB ops are broadcasted in hardware, so let's
disable ARCH_NEEDS_KMAP_HIGH_GET only when CONFIG_SMP and
CONFIG_CPU_TLB_V6 are defined.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Saeed Bishara <saeed.bishara@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/highmem.h
arch/arm/mm/mmu.c