summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Murphy2015-12-04 18:53:01 +0100
committerWill Deacon2015-12-17 13:05:35 +0100
commitfdc38967633ec23b3b24dfc487dfb7b90d1a0215 (patch)
tree1a4426c067fe5f9fb275573e2a1a7863864487f2
parentiommu/arm-smmu: Invalidate TLBs properly (diff)
downloadkernel-qcow2-linux-fdc38967633ec23b3b24dfc487dfb7b90d1a0215.tar.gz
kernel-qcow2-linux-fdc38967633ec23b3b24dfc487dfb7b90d1a0215.tar.xz
kernel-qcow2-linux-fdc38967633ec23b3b24dfc487dfb7b90d1a0215.zip
iommu/io-pgtable: Make io_pgtable_ops_to_pgtable() macro common
There is no need to keep a useful accessor for a public structure hidden away in a private implementation. Move it out alongside the structure definition so that other implementations may reuse it. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--drivers/iommu/io-pgtable-arm.c3
-rw-r--r--drivers/iommu/io-pgtable.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
index 7a5c772f7be2..937ba23e48d7 100644
--- a/drivers/iommu/io-pgtable-arm.c
+++ b/drivers/iommu/io-pgtable-arm.c
@@ -38,9 +38,6 @@
#define io_pgtable_to_data(x) \
container_of((x), struct arm_lpae_io_pgtable, iop)
-#define io_pgtable_ops_to_pgtable(x) \
- container_of((x), struct io_pgtable, ops)
-
#define io_pgtable_ops_to_data(x) \
io_pgtable_to_data(io_pgtable_ops_to_pgtable(x))
diff --git a/drivers/iommu/io-pgtable.h b/drivers/iommu/io-pgtable.h
index 2e18469afe3c..36673c83de58 100644
--- a/drivers/iommu/io-pgtable.h
+++ b/drivers/iommu/io-pgtable.h
@@ -131,6 +131,8 @@ struct io_pgtable {
struct io_pgtable_ops ops;
};
+#define io_pgtable_ops_to_pgtable(x) container_of((x), struct io_pgtable, ops)
+
/**
* struct io_pgtable_init_fns - Alloc/free a set of page tables for a
* particular format.