[PATCH 3/3] ARM: use memalign to allocate page table
Sascha Hauer
s.hauer at pengutronix.de
Mon Mar 7 13:01:08 EST 2011
We have the proper function for getting aligned memory, so use it.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/cpu/mmu.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index df664f6..7b5686b 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -31,8 +31,7 @@ void mmu_init(void)
{
int i;
- ttb = xzalloc(0x8000);
- ttb = (void *)(((unsigned long)ttb + 0x4000) & ~0x3fff);
+ ttb = memalign(0x10000, 0x4000);
/* Set the ttb register */
asm volatile ("mcr p15,0,%0,c2,c0,0" : : "r"(ttb) /*:*/);
--
1.7.2.3
More information about the barebox
mailing list