Commit 5f2da0f1 authored by LEROY Christophe's avatar LEROY Christophe Committed by Scott Wood

powerpc/8xx: Fixing memory init issue with CONFIG_PIN_TLB

Activating CONFIG_PIN_TLB allows access to the 24 first Mbytes of
memory at bootup instead of 8.  It is needed for "big" kernels for
instance when activating CONFIG_LOCKDEP_SUPPORT.  This needs to be
taken into account in init_32 too, otherwise memory allocation soon
fails after startup.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Acked-by: default avatarJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
parent 4e591f3c
...@@ -213,7 +213,12 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base, ...@@ -213,7 +213,12 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
*/ */
BUG_ON(first_memblock_base != 0); BUG_ON(first_memblock_base != 0);
#ifdef CONFIG_PIN_TLB
/* 8xx can only access 24MB at the moment */
memblock_set_current_limit(min_t(u64, first_memblock_size, 0x01800000));
#else
/* 8xx can only access 8MB at the moment */ /* 8xx can only access 8MB at the moment */
memblock_set_current_limit(min_t(u64, first_memblock_size, 0x00800000)); memblock_set_current_limit(min_t(u64, first_memblock_size, 0x00800000));
#endif
} }
#endif /* CONFIG_8xx */ #endif /* CONFIG_8xx */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment