aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2013-04-04 22:16:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-04-17 11:53:24 -0400
commitde40614e92bf1b0308d953387b0cb9d3a5710186 (patch)
tree79acdd36b82452be003f02db7621e88656fe0aa7 /arch/arm/mm
parentf5d6a1441a5045824f36ff7c6b6bbae0373472a6 (diff)
ARM: 7694/1: ARM, TCM: initialize TCM in paging_init(), instead of setup_arch()
tcm_init() call iotable_init() and it use early_alloc variants which do memblock allocation. Directly using memblock allocation after initializing bootmem should not permitted, because bootmem can't know where are additinally reserved. So move tcm_init() to a safe place before initalizing bootmem. (On the U300) Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/mmu.c2
-rw-r--r--arch/arm/mm/tcm.h17
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 78978945492a..a84ff763ac39 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -34,6 +34,7 @@
34#include <asm/mach/pci.h> 34#include <asm/mach/pci.h>
35 35
36#include "mm.h" 36#include "mm.h"
37#include "tcm.h"
37 38
38/* 39/*
39 * empty_zero_page is a special page that is used for 40 * empty_zero_page is a special page that is used for
@@ -1277,6 +1278,7 @@ void __init paging_init(struct machine_desc *mdesc)
1277 dma_contiguous_remap(); 1278 dma_contiguous_remap();
1278 devicemaps_init(mdesc); 1279 devicemaps_init(mdesc);
1279 kmap_init(); 1280 kmap_init();
1281 tcm_init();
1280 1282
1281 top_pmd = pmd_off_k(0xffff0000); 1283 top_pmd = pmd_off_k(0xffff0000);
1282 1284
diff --git a/arch/arm/mm/tcm.h b/arch/arm/mm/tcm.h
new file mode 100644
index 000000000000..8015ad434a40
--- /dev/null
+++ b/arch/arm/mm/tcm.h
@@ -0,0 +1,17 @@
1/*
2 * Copyright (C) 2008-2009 ST-Ericsson AB
3 * License terms: GNU General Public License (GPL) version 2
4 * TCM memory handling for ARM systems
5 *
6 * Author: Linus Walleij <linus.walleij@stericsson.com>
7 * Author: Rickard Andersson <rickard.andersson@stericsson.com>
8 */
9
10#ifdef CONFIG_HAVE_TCM
11void __init tcm_init(void);
12#else
13/* No TCM support, just blank inlines to be optimized out */
14inline void tcm_init(void)
15{
16}
17#endif