summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/io.h
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2015-12-17 05:43:12 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2015-12-17 14:40:59 +0300
commita84bf321401ab206baafbbfd3bfad485a1a2c3b4 (patch)
treee040c03ca8dfcc24d365120f56977ab002e748ed /arch/powerpc/include/asm/io.h
parent94973b24d61b03f99017f836d85e7d6739741bab (diff)
downloadlinux-a84bf321401ab206baafbbfd3bfad485a1a2c3b4.tar.xz
powerpc: Add __raw_rm_writeq() function
Move __raw_rm_writeq() from platforms/powernv/pci-ioda.c to include/asm/io.h so that it can be used by other code. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/io.h')
-rw-r--r--arch/powerpc/include/asm/io.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index 5879fde56f3c..6c1297ec374c 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -385,6 +385,17 @@ static inline void __raw_writeq(unsigned long v, volatile void __iomem *addr)
{
*(volatile unsigned long __force *)PCI_FIX_ADDR(addr) = v;
}
+
+/*
+ * Real mode version of the above. stdcix is only supposed to be used
+ * in hypervisor real mode as per the architecture spec.
+ */
+static inline void __raw_rm_writeq(u64 val, volatile void __iomem *paddr)
+{
+ __asm__ __volatile__("stdcix %0,0,%1"
+ : : "r" (val), "r" (paddr) : "memory");
+}
+
#endif /* __powerpc64__ */
/*