mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] ARM: use memalign to allocate page table
Date: Mon,  7 Mar 2011 19:01:08 +0100	[thread overview]
Message-ID: <1299520868-30775-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1299520868-30775-1-git-send-email-s.hauer@pengutronix.de>

We have the proper function for getting aligned memory, so use it.

Signed-off-by: Sascha Hauer <s.hauer@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2011-03-07 18:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07 18:01 [PATCH] ARM mmu fixes Sascha Hauer
2011-03-07 18:01 ` [PATCH 1/3] ARM v7: Fix broken mmu initialization Sascha Hauer
2011-03-07 18:03   ` Sascha Hauer
2011-03-07 18:01 ` [PATCH 2/3] ARM v7: Fix typos in cache-armv7.S Sascha Hauer
2011-03-07 18:01 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299520868-30775-4-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox