linux/arch/powerpc
Benjamin Herrenschmidt ee4f2ea486 [POWERPC] Fix 32-bit mm operations when not using BATs
On hash table based 32 bits powerpc's, the hash management code runs with
a big spinlock. It's thus important that it never causes itself a hash
fault. That code is generally safe (it does memory accesses in real mode
among other things) with the exception of the actual access to the code
itself. That is, the kernel text needs to be accessible without taking
a hash miss exceptions.

This is currently guaranteed by having a BAT register mapping part of the
linear mapping permanently, which includes the kernel text. But this is
not true if using the "nobats" kernel command line option (which can be
useful for debugging) and will not be true when using DEBUG_PAGEALLOC
implemented in a subsequent patch.

This patch fixes this by pre-faulting in the hash table pages that hit
the kernel text, and making sure we never evict such a page under hash
pressure.

Signed-off-by: Benjamin Herrenchmidt <benh@kernel.crashing.org>

 arch/powerpc/mm/hash_low_32.S |   22 ++++++++++++++++++++--
 arch/powerpc/mm/mem.c         |    3 ---
 arch/powerpc/mm/mmu_decl.h    |    4 ++++
 arch/powerpc/mm/pgtable_32.c  |   11 +++++++----
 4 files changed, 31 insertions(+), 9 deletions(-)
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13 04:09:39 +10:00
..
boot [POWERPC] bootwrapper: Decompress less, check more 2007-04-13 03:55:17 +10:00
configs Merge branch 'linux-2.6' into for-2.6.22 2007-04-13 03:50:03 +10:00
kernel [POWERPC] Make tlb flush batch use lazy MMU mode 2007-04-13 04:09:38 +10:00
lib [POWERPC] Use mtocrf instruction in asm when CONFIG_POWER4_ONLY=y 2007-04-13 03:55:13 +10:00
math-emu [POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c 2006-09-26 15:24:35 +10:00
mm [POWERPC] Fix 32-bit mm operations when not using BATs 2007-04-13 04:09:39 +10:00
oprofile [POWERPC] cell: pm_rtas_activat_signals routine cleanup 2007-02-13 22:03:07 +01:00
platforms [POWERPC] Rename get_property to of_get_property: the last one 2007-04-13 03:55:19 +10:00
sysdev [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
xmon [POWERPC] Allow xmon to build without CONFIG_DEBUG_BUGVERBOSE 2007-03-09 15:03:26 +11:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig [POWERPC] 86xx/85xx: Move 8641 PCI-Express to arch/powerpc/sysdev/fsl_pcie.c. 2007-03-26 17:03:25 -05:00
Kconfig.debug [POWERPC] Removed config options that we don't support in embedded6xx 2007-03-22 10:06:40 -05:00
Makefile [POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot 2006-09-28 14:30:02 +10:00