original_kernel/arch/powerpc/mm
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
..
40x_mmu.c
44x_mmu.c
Makefile powerpc/mm: Lockless get_user_pages_fast() for 64-bit (v3) 2008-07-30 15:26:54 +10:00
fault.c
fsl_booke_mmu.c
gup.c powerpc/mm: Lockless get_user_pages_fast() for 64-bit (v3) 2008-07-30 15:26:54 +10:00
hash_low_32.S
hash_low_64.S
hash_native_64.c
hash_utils_64.c powerpc/mm: Fix attribute confusion with htab_bolt_mapping() 2008-08-11 10:09:56 +10:00
hugetlbpage.c powerpc: Disable 64K hugetlb support when doing 64K SPU mappings 2008-07-28 16:30:53 +10:00
init_32.c
init_64.c powerpc/mm: Fix attribute confusion with htab_bolt_mapping() 2008-08-11 10:09:56 +10:00
mem.c powerpc: Fix compiler warning in arch/powerpc/mm/mem.c 2008-08-04 13:18:17 +10:00
mmap.c
mmu_context_32.c
mmu_context_64.c
mmu_decl.h
numa.c
pgtable_32.c
pgtable_64.c
ppc_mmu_32.c powerpc: Force printing of 'total_memory' to unsigned long long 2008-08-04 13:18:17 +10:00
slb.c
slb_low.S
slice.c
stab.c
subpage-prot.c
tlb_32.c
tlb_64.c powerpc: Move include files to arch/powerpc/include/asm 2008-08-04 12:02:00 +10:00