kernel-ark/arch
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
..
alpha [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
arm Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-08-03 10:39:02 -07:00
avr32 avr32: some mmc/sd cleanups 2008-07-27 13:57:36 +02:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6 2008-07-26 13:23:17 -07:00
cris Merge branch 'linus' into core/generic-dma-coherent 2008-07-29 00:07:55 +02:00
frv FRV: Wire up new system calls 2008-08-01 13:03:49 -07:00
h8300 h8300: use generic show_mem() 2008-07-26 12:00:11 -07:00
ia64 [IA64] Move include/asm-ia64 to arch/ia64/include/asm 2008-08-01 10:21:21 -07:00
m32r m32r: use generic show_mem() 2008-07-26 12:00:11 -07:00
m68k m68k: use generic show_mem() 2008-07-26 12:00:11 -07:00
m68knommu m68knommu: use generic show_mem() 2008-07-26 12:00:11 -07:00
mips [MIPS] Cobalt: update defconfig 2008-07-30 21:54:43 +01:00
mn10300 mn10300: Fix up __bug_table handling in module loader. 2008-08-04 17:22:17 -07:00
parisc [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
powerpc powerpc/mm: Fix attribute confusion with htab_bolt_mapping() 2008-08-11 10:09:56 +10:00
s390 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2008-08-04 17:15:07 -07:00
sh sh: enable maple_keyb in dreamcast_defconfig. 2008-08-04 16:52:34 +09:00
sparc sparc: Add __KERNEL__ ifdef protection to pt_regs helpers. 2008-07-31 20:32:35 -07:00
sparc64 sparc64: Do not clobber %g7 in setcontext() trap. 2008-07-31 20:40:46 -07:00
um uml: fix tty-related build error 2008-07-30 09:41:45 -07:00
x86 Merge branch 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-08-01 12:48:16 -07:00
xtensa xtensa: use generic show_mem() 2008-07-26 12:00:10 -07:00
.gitignore
Kconfig tracehook: CONFIG_HAVE_ARCH_TRACEHOOK 2008-07-26 12:00:09 -07:00