From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QqJbr-0001Eu-HC for barebox@lists.infradead.org; Mon, 08 Aug 2011 06:46:49 +0000 From: Sascha Hauer Date: Mon, 8 Aug 2011 08:46:37 +0200 Message-Id: <1312786003-14734-3-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1312786003-14734-1-git-send-email-s.hauer@pengutronix.de> References: <1312786003-14734-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/8] ARM mmu: fix arm_create_pte To: barebox@lists.infradead.org Each section is 1MiB, so we have to shift by 20 to get the ttb entry corresponding to a section. Signed-off-by: Sascha Hauer --- arch/arm/cpu/mmu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 1f62d61..2f754c8 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -65,7 +65,7 @@ static u32 *arm_create_pte(unsigned long virt) table = memalign(0x400, 0x400); - ttb[virt] = (unsigned long)table | PMD_TYPE_TABLE; + ttb[virt >> 20] = (unsigned long)table | PMD_TYPE_TABLE; for (i = 0; i < 256; i++) { table[i] = virt | PTE_TYPE_SMALL | PTE_FLAGS_UNCACHED; -- 1.7.5.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox