diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2013-08-28 18:37:43 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-11 17:24:40 +1100 |
commit | 8e0a1611cb891e72a9affc4a8ee4795c634896a6 (patch) | |
tree | 05c7376a7be9a41de27ac60a6b412807c0f09adb /arch/powerpc/include/asm/machdep.h | |
parent | 8e0861fa3c4edfc2f30dd4cf4d58d3929f7c1b23 (diff) | |
download | linux-stable-8e0a1611cb891e72a9affc4a8ee4795c634896a6.tar.gz linux-stable-8e0a1611cb891e72a9affc4a8ee4795c634896a6.tar.bz2 linux-stable-8e0a1611cb891e72a9affc4a8ee4795c634896a6.zip |
powerpc: add real mode support for dma operations on powernv
The existing TCE machine calls (tce_build and tce_free) only support
virtual mode as they call __raw_writeq for TCE invalidation what
fails in real mode.
This introduces tce_build_rm and tce_free_rm real mode versions
which do mostly the same but use "Store Doubleword Caching Inhibited
Indexed" instruction for TCE invalidation.
This new feature is going to be utilized by real mode support of VFIO.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/machdep.h')
-rw-r--r-- | arch/powerpc/include/asm/machdep.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 8b480901165a..07dd3b1312e5 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h @@ -78,6 +78,18 @@ struct machdep_calls { long index); void (*tce_flush)(struct iommu_table *tbl); + /* _rm versions are for real mode use only */ + int (*tce_build_rm)(struct iommu_table *tbl, + long index, + long npages, + unsigned long uaddr, + enum dma_data_direction direction, + struct dma_attrs *attrs); + void (*tce_free_rm)(struct iommu_table *tbl, + long index, + long npages); + void (*tce_flush_rm)(struct iommu_table *tbl); + void __iomem * (*ioremap)(phys_addr_t addr, unsigned long size, unsigned long flags, void *caller); void (*iounmap)(volatile void __iomem *token); |