diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-24 00:27:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:15 -0400 |
commit | a1f242ff460e4b50a045fa237c3c56cce9eabf83 (patch) | |
tree | 657766b55251042b38967422dc9c3ea893b98747 /include/asm-powerpc/pgtable-4k.h | |
parent | 7ae8ed5053a39082d224a3f48409e016baca9c16 (diff) |
powerpc ioremap_prot
This adds ioremap_prot and pte_pgprot() so that one can extract protection
bits from a PTE and use them to ioremap_prot() (in order to support ptrace
of VM_IO | VM_PFNMAP as per Rik's patch).
This moves a couple of flag checks around in the ioremap implementations
of arch/powerpc. There's a side effect of allowing non-cacheable and
non-guarded mappings on ppc32 which before would always have _PAGE_GUARDED
set whenever _PAGE_NO_CACHE is.
(standard ioremap will still set _PAGE_GUARDED, but ioremap_prot will be
capable of setting such a non guarded mapping).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-powerpc/pgtable-4k.h')
-rw-r--r-- | include/asm-powerpc/pgtable-4k.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h index fd2090dc1dce..c9601dfb4a1e 100644 --- a/include/asm-powerpc/pgtable-4k.h +++ b/include/asm-powerpc/pgtable-4k.h | |||
@@ -51,6 +51,9 @@ | |||
51 | #define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \ | 51 | #define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | \ |
52 | _PAGE_SECONDARY | _PAGE_GROUP_IX) | 52 | _PAGE_SECONDARY | _PAGE_GROUP_IX) |
53 | 53 | ||
54 | /* There is no 4K PFN hack on 4K pages */ | ||
55 | #define _PAGE_4K_PFN 0 | ||
56 | |||
54 | /* PAGE_MASK gives the right answer below, but only by accident */ | 57 | /* PAGE_MASK gives the right answer below, but only by accident */ |
55 | /* It should be preserving the high 48 bits and then specifically */ | 58 | /* It should be preserving the high 48 bits and then specifically */ |
56 | /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */ | 59 | /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */ |