Skip to contentSkip to conversation

xen/arm: remove cast in mmu_init_secondary_cpu

RFC PATCH In review ChanJu Park 2 participants 2 messages Sep 17, 2013

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/2 xen/arm: remove cast in mmu_init_secondary_cpu

At this moment, virt_to_maddr() is casted with 32 bit and this makes an error when 64 bit address is returned. This cast needs to be removed.

Singed-off-by: ChanJu Park
Singed-off-by: Min Kang
---
xen/arch/arm/mm.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/mm.c +1 -1
index 69c157a..bdfb7af 100644
@@ -520,7 +520,7 @@ void __cpuinit mmu_init_secondary_cpu(void)
     uint64_t ttbr;
 
     /* Change to this CPU's pagetables */
-    ttbr = (uintptr_t)virt_to_maddr(THIS_CPU_PGTABLE);
+    ttbr = virt_to_maddr(THIS_CPU_PGTABLE);
     WRITE_TTBR(ttbr);
 
     /* From now on, no mapping may be both writable and executable. */
Signature · 1 line
1.7.9.5
Acked-by on v1 1/2
#1 lore raw
Quoted 6 lines · ChanJu Park

At this moment, virt_to_maddr() is casted with 32 bit and this makes an error when 64 bit address is returned. This cast needs to be removed.

Singed-off-by: ChanJu Park
Singed-off-by: Min Kang

Please can you include your email addresses here?

Quoted 17 lines

---
xen/arch/arm/mm.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/mm.c +1 -1
index 69c157a..bdfb7af 100644
@@ -520,7 +520,7 @@ void __cpuinit mmu_init_secondary_cpu(void)
     uint64_t ttbr;
 
     /* Change to this CPU's pagetables */
-    ttbr = (uintptr_t)virt_to_maddr(THIS_CPU_PGTABLE);
+    ttbr = virt_to_maddr(THIS_CPU_PGTABLE);
     WRITE_TTBR(ttbr);
 
     /* From now on, no mapping may be both writable and executable. */