aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/io.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-24 00:27:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:15 -0400
commita1f242ff460e4b50a045fa237c3c56cce9eabf83 (patch)
tree657766b55251042b38967422dc9c3ea893b98747 /include/asm-powerpc/io.h
parent7ae8ed5053a39082d224a3f48409e016baca9c16 (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/io.h')
-rw-r--r--include/asm-powerpc/io.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index 8b627823f5f9..77c7fa025e65 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -617,7 +617,8 @@ static inline void iosync(void)
617 * and can be hooked by the platform via ppc_md 617 * and can be hooked by the platform via ppc_md
618 * 618 *
619 * * ioremap_flags allows to specify the page flags as an argument and can 619 * * ioremap_flags allows to specify the page flags as an argument and can
620 * also be hooked by the platform via ppc_md 620 * also be hooked by the platform via ppc_md. ioremap_prot is the exact
621 * same thing as ioremap_flags.
621 * 622 *
622 * * ioremap_nocache is identical to ioremap 623 * * ioremap_nocache is identical to ioremap
623 * 624 *
@@ -639,6 +640,8 @@ extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
639extern void __iomem *ioremap_flags(phys_addr_t address, unsigned long size, 640extern void __iomem *ioremap_flags(phys_addr_t address, unsigned long size,
640 unsigned long flags); 641 unsigned long flags);
641#define ioremap_nocache(addr, size) ioremap((addr), (size)) 642#define ioremap_nocache(addr, size) ioremap((addr), (size))
643#define ioremap_prot(addr, size, prot) ioremap_flags((addr), (size), (prot))
644
642extern void iounmap(volatile void __iomem *addr); 645extern void iounmap(volatile void __iomem *addr);
643 646
644extern void __iomem *__ioremap(phys_addr_t, unsigned long size, 647extern void __iomem *__ioremap(phys_addr_t, unsigned long size,