Skip to content

Commit

Permalink
ARM: 7694/1: ARM, TCM: initialize TCM in paging_init(), instead of se…
Browse files Browse the repository at this point in the history
…tup_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>
  • Loading branch information
Joonsoo Kim authored and Russell King committed Apr 17, 2013
1 parent f5d6a14 commit de40614
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#include <asm/virt.h>

#include "atags.h"
#include "tcm.h"


#if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE)
Expand Down Expand Up @@ -798,8 +797,6 @@ void __init setup_arch(char **cmdline_p)

reserve_crashkernel();

tcm_init();

#ifdef CONFIG_MULTI_IRQ_HANDLER
handle_arch_irq = mdesc->handle_irq;
#endif
Expand Down
1 change: 0 additions & 1 deletion arch/arm/kernel/tcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <asm/mach/map.h>
#include <asm/memory.h>
#include <asm/system_info.h>
#include "tcm.h"

static struct gen_pool *tcm_pool;
static bool dtcm_present;
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <asm/mach/pci.h>

#include "mm.h"
#include "tcm.h"

/*
* empty_zero_page is a special page that is used for
Expand Down Expand Up @@ -1277,6 +1278,7 @@ void __init paging_init(struct machine_desc *mdesc)
dma_contiguous_remap();
devicemaps_init(mdesc);
kmap_init();
tcm_init();

top_pmd = pmd_off_k(0xffff0000);

Expand Down
File renamed without changes.

0 comments on commit de40614

Please sign in to comment.