diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2013-04-04 22:16:51 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-04-17 11:53:24 -0400 |
commit | de40614e92bf1b0308d953387b0cb9d3a5710186 (patch) | |
tree | 79acdd36b82452be003f02db7621e88656fe0aa7 | |
parent | f5d6a1441a5045824f36ff7c6b6bbae0373472a6 (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>
-rw-r--r-- | arch/arm/kernel/setup.c | 3 | ||||
-rw-r--r-- | arch/arm/kernel/tcm.c | 1 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/tcm.h (renamed from arch/arm/kernel/tcm.h) | 0 |
4 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index d343a6c3a6d1..234e339196c0 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #include <asm/virt.h> | 56 | #include <asm/virt.h> |
57 | 57 | ||
58 | #include "atags.h" | 58 | #include "atags.h" |
59 | #include "tcm.h" | ||
60 | 59 | ||
61 | 60 | ||
62 | #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE) | 61 | #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE) |
@@ -798,8 +797,6 @@ void __init setup_arch(char **cmdline_p) | |||
798 | 797 | ||
799 | reserve_crashkernel(); | 798 | reserve_crashkernel(); |
800 | 799 | ||
801 | tcm_init(); | ||
802 | |||
803 | #ifdef CONFIG_MULTI_IRQ_HANDLER | 800 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
804 | handle_arch_irq = mdesc->handle_irq; | 801 | handle_arch_irq = mdesc->handle_irq; |
805 | #endif | 802 | #endif |
diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c index 30ae6bb4a310..f50f19e5c138 100644 --- a/arch/arm/kernel/tcm.c +++ b/arch/arm/kernel/tcm.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
18 | #include <asm/memory.h> | 18 | #include <asm/memory.h> |
19 | #include <asm/system_info.h> | 19 | #include <asm/system_info.h> |
20 | #include "tcm.h" | ||
21 | 20 | ||
22 | static struct gen_pool *tcm_pool; | 21 | static struct gen_pool *tcm_pool; |
23 | static bool dtcm_present; | 22 | static bool dtcm_present; |
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/kernel/tcm.h b/arch/arm/mm/tcm.h index 8015ad434a40..8015ad434a40 100644 --- a/arch/arm/kernel/tcm.h +++ b/arch/arm/mm/tcm.h | |||