return tbl;
}
+#ifdef CONFIG_IOMMU_API
static struct iommu_table_group_ops spapr_tce_table_group_ops;
+#endif
static struct iommu_table_group *iommu_pseries_alloc_group(int node)
{
return be64_to_cpu(*tcep);
}
+#ifdef CONFIG_IOMMU_API
static long pseries_tce_iommu_userspace_view_alloc(struct iommu_table *tbl)
{
unsigned long cb = ALIGN(sizeof(tbl->it_userspace[0]) * tbl->it_size, PAGE_SIZE);
return 0;
}
+#endif
static void tce_iommu_userspace_view_free(struct iommu_table *tbl)
{
.free = tce_free_pSeries
};
+#ifdef CONFIG_IOMMU_API
/*
* When the DMA window properties might have been removed,
* the parent node has the table_group setup on it.
return NULL;
}
+#endif
/*
* Find nearest ibm,dma-window (default DMA window) or direct DMA window or
return false;
}
+#ifdef CONFIG_IOMMU_API
/*
* A simple iommu_table_group_ops which only allows reusing the existing
* iommu_table. This handles VFIO for POWER7 or the nested KVM.
.take_ownership = spapr_tce_take_ownership,
.release_ownership = spapr_tce_release_ownership,
};
+#endif
static int iommu_mem_notifier(struct notifier_block *nb, unsigned long action,
void *data)