linux/arch/powerpc
Benjamin Herrenschmidt bc033b63bb powerpc/mm: Fix attribute confusion with htab_bolt_mapping()
The function htab_bolt_mapping() is used to create permanent
mappings in the MMU hash table, for example, in order to create
the linear mapping of vmemmap.  It's also used by early boot
ioremap (before mem_init_done).

However, the way ioremap uses it is incorrect as it passes it the
protection flags in the "linux PTE" form while htab_bolt_mapping()
expects them in the hash table format.  This is made more confusing by
the fact that some of those flags are actually in the same position in
both cases.

This fixes it all by making htab_bolt_mapping() take normal linux
protection flags instead, and use a little helper to convert them to
htab flags. Callers can now use the usual PAGE_* definitions safely.

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

 arch/powerpc/include/asm/mmu-hash64.h |    2 -
 arch/powerpc/mm/hash_utils_64.c       |   65 ++++++++++++++++++++--------------
 arch/powerpc/mm/init_64.c             |    9 +---
 3 files changed, 44 insertions(+), 32 deletions(-)
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-11 10:09:56 +10:00
..
boot powerpc/44x: Incorrect NOR offset in Warp DTS 2008-08-04 21:42:07 -04:00
configs powerpc/4xx: Update defconfig files for 2.6.27-rc1 2008-08-06 07:55:37 -04:00
include/asm powerpc/mm: Fix attribute confusion with htab_bolt_mapping() 2008-08-11 10:09:56 +10:00
kernel powerpc/pci: Don't keep ISA memory hole resources in the tree 2008-08-11 10:09:56 +10:00
kvm KVM: ppc: fix invalidation of large guest pages 2008-07-27 12:02:05 +03:00
lib powerpc: Remove use of CONFIG_PPC_MERGE 2008-08-04 13:18:17 +10:00
math-emu powerpc: Add macros to access floating point registers in thread_struct. 2008-07-01 11:28:43 +10:00
mm powerpc/mm: Fix attribute confusion with htab_bolt_mapping() 2008-08-11 10:09:56 +10:00
oprofile
platforms powerpc/4xx: Cleanup Warp for i2c driver changes. 2008-08-04 21:42:07 -04:00
sysdev powerpc: Remove use of CONFIG_PPC_MERGE 2008-08-04 13:18:17 +10:00
xmon
.gitignore
Kconfig powerpc/mm: Lockless get_user_pages_fast() for 64-bit (v3) 2008-07-30 15:26:54 +10:00
Kconfig.debug powerpc: Remove use of CONFIG_PPC_MERGE 2008-08-04 13:18:17 +10:00
Makefile powerpc/bootwrapper: Add documentation of boot wrapper targets 2008-07-04 00:59:03 -06:00