From patchwork Wed Sep 25 05:38:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 277673 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 213892C0322 for ; Wed, 25 Sep 2013 15:40:00 +1000 (EST) Received: by ozlabs.org (Postfix) id DC38C2C00C0; Wed, 25 Sep 2013 15:38:55 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1034) id CBABD2C00C2; Wed, 25 Sep 2013 15:38:55 +1000 (EST) From: Michael Ellerman To: Subject: [PATCH 2/2] powerpc: Add real mode cache inhibited IO accessors Date: Wed, 25 Sep 2013 15:38:52 +1000 Message-Id: <1380087532-20219-2-git-send-email-michael@ellerman.id.au> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1380087532-20219-1-git-send-email-michael@ellerman.id.au> References: <1380087532-20219-1-git-send-email-michael@ellerman.id.au> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16rc2 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 --- 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) {