summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/iommu.h
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2013-12-09 18:17:01 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-12-30 14:17:06 +1100
commite589a4404fa06730355de204d3d136ed9bbc7dea (patch)
treea7b4d1dad98a06d89e652194947735db7eec02b5 /arch/powerpc/include/asm/iommu.h
parentfee26f6d5d68a8815b20c32d15dd70d5384eb937 (diff)
powerpc/iommu: Update constant names to reflect their hardcoded page size
The powerpc iommu uses a hardcoded page size of 4K. This patch changes the name of the IOMMU_PAGE_* macros to reflect the hardcoded values. A future patch will use the existing names to support dynamic page sizes. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/iommu.h')
-rw-r--r--arch/powerpc/include/asm/iommu.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
index 774fa2776907..0869c7e74421 100644
--- a/arch/powerpc/include/asm/iommu.h
+++ b/arch/powerpc/include/asm/iommu.h
@@ -30,10 +30,10 @@
#include <asm/machdep.h>
#include <asm/types.h>
-#define IOMMU_PAGE_SHIFT 12
-#define IOMMU_PAGE_SIZE (ASM_CONST(1) << IOMMU_PAGE_SHIFT)
-#define IOMMU_PAGE_MASK (~((1 << IOMMU_PAGE_SHIFT) - 1))
-#define IOMMU_PAGE_ALIGN(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE)
+#define IOMMU_PAGE_SHIFT_4K 12
+#define IOMMU_PAGE_SIZE_4K (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K)
+#define IOMMU_PAGE_MASK_4K (~((1 << IOMMU_PAGE_SHIFT_4K) - 1))
+#define IOMMU_PAGE_ALIGN_4K(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE_4K)
/* Boot time flags */
extern int iommu_is_off;
@@ -42,7 +42,7 @@ extern int iommu_force_on;
/* Pure 2^n version of get_order */
static __inline__ __attribute_const__ int get_iommu_order(unsigned long size)
{
- return __ilog2((size - 1) >> IOMMU_PAGE_SHIFT) + 1;
+ return __ilog2((size - 1) >> IOMMU_PAGE_SHIFT_4K) + 1;
}