]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/platforms/powernv/pci.h
powerpc/iommu/powernv: Release replaced TCE
[karo-tx-linux.git] / arch / powerpc / platforms / powernv / pci.h
index d37cb4da409fb9bb9b64bad2373a1ce198ddb30d..8ef2d28aded0f6ebda3a0d9f767726927817dac5 100644 (file)
@@ -58,7 +58,6 @@ struct pnv_ioda_pe {
        int                     tce32_seg;
        int                     tce32_segcount;
        struct iommu_table_group table_group;
-       phys_addr_t             tce_inval_reg_phys;
 
        /* 64-bit TCE bypass region */
        bool                    tce_bypass_enabled;
@@ -184,6 +183,12 @@ struct pnv_phb {
                         * boot for resource allocation purposes
                         */
                        struct list_head        pe_dma_list;
+
+                       /* TCE cache invalidate registers (physical and
+                        * remapped)
+                        */
+                       phys_addr_t             tce_inval_reg_phys;
+                       __be64 __iomem          *tce_inval_reg;
                } ioda;
        };
 
@@ -202,6 +207,8 @@ extern int pnv_tce_build(struct iommu_table *tbl, long index, long npages,
                unsigned long uaddr, enum dma_data_direction direction,
                struct dma_attrs *attrs);
 extern void pnv_tce_free(struct iommu_table *tbl, long index, long npages);
+extern int pnv_tce_xchg(struct iommu_table *tbl, long index,
+               unsigned long *hpa, enum dma_data_direction *direction);
 extern unsigned long pnv_tce_get(struct iommu_table *tbl, long index);
 
 void pnv_pci_dump_phb_diag_data(struct pci_controller *hose,