The ARM 32-bit and 64-bit MMU code makes heavy use of uint32_t and
uint64_t respectively.

We can't use ulong for common code between them as u32 is an unsigned long
and u64 is a unsigned long long and pointers to them can not be implicitly
converted. As we don't want to rewrite all MMU code to use ullong, let's
just define a new mmu_addr_t, which can be used in code that should be
callable from either ISA.

Signed-off-by: Ahmad Fatoum <a.fat...@pengutronix.de>
---
 arch/arm/cpu/mmu_32.h | 2 ++
 arch/arm/cpu/mmu_64.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/cpu/mmu_32.h b/arch/arm/cpu/mmu_32.h
index 607d9e8608b2..7a58a819f08a 100644
--- a/arch/arm/cpu/mmu_32.h
+++ b/arch/arm/cpu/mmu_32.h
@@ -9,6 +9,8 @@
 
 #include "mmu-common.h"
 
+typedef u32 mmu_addr_t;
+
 #define PGDIR_SHIFT    20
 #define PGDIR_SIZE     (1UL << PGDIR_SHIFT)
 
diff --git a/arch/arm/cpu/mmu_64.h b/arch/arm/cpu/mmu_64.h
index d3c39dabb507..ad7c1bde5631 100644
--- a/arch/arm/cpu/mmu_64.h
+++ b/arch/arm/cpu/mmu_64.h
@@ -2,6 +2,8 @@
 
 #include "mmu-common.h"
 
+typedef u64 mmu_addr_t;
+
 #define CACHED_MEM      (PTE_BLOCK_MEMTYPE(MT_NORMAL) | \
                         PTE_BLOCK_OUTER_SHARE | \
                         PTE_BLOCK_AF)
-- 
2.39.5


Reply via email to