[PATCH 2/2] powerpc: Add real mode cache inhibited IO accessors
Michael Ellerman
michael at ellerman.id.au
Wed Sep 25 15:38:52 EST 2013
These accessors allow us to do cache inhibited accesses when in real
mode. They should only be used in real mode.
Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
---
arch/powerpc/include/asm/io.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index 8b3bd66..1cac8d3 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -178,10 +178,24 @@ DEF_MMIO_OUT_DFORM(out_be32, 32, stw);
DEF_MMIO_OUT_XFORM(out_le16, 16, sthbrx);
DEF_MMIO_OUT_XFORM(out_le32, 32, stwbrx);
+/*
+ * Cache inhibitied accessors for use in real mode, you don't want to use these
+ * unless you know what you're doing.
+ */
+DEF_MMIO_OUT_XFORM(out_rm8, 8, stbcix);
+DEF_MMIO_OUT_XFORM(out_rm16, 16, sthcix);
+DEF_MMIO_OUT_XFORM(out_rm32, 32, stwcix);
+DEF_MMIO_IN_XFORM(in_rm8, 8, lbzcix);
+DEF_MMIO_IN_XFORM(in_rm16, 16, lhzcix);
+DEF_MMIO_IN_XFORM(in_rm32, 32, lwzcix);
+
#ifdef __powerpc64__
DEF_MMIO_OUT_DFORM(out_be64, 64, std);
DEF_MMIO_IN_DFORM(in_be64, 64, ld);
+DEF_MMIO_OUT_XFORM(out_rm64, 64, stdcix);
+DEF_MMIO_IN_XFORM(in_rm64, 64, ldcix);
+
/* There is no asm instructions for 64 bits reverse loads and stores */
static inline u64 in_le64(const volatile u64 __iomem *addr)
{
--
1.8.1.2
More information about the Linuxppc-dev
mailing list