aboutsummaryrefslogtreecommitdiff
path: root/arch/m68k/mm
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2014-04-24 12:24:48 +0200
committerGeert Uytterhoeven <geert@linux-m68k.org>2014-05-28 10:11:54 +0200
commit486df8bc4627bdfc032d11bedcd056cc5343ee62 (patch)
tree758edca69ce10df13802ae2035f3f677552c61f4 /arch/m68k/mm
parent44074e892cc2e5579b8d75c37612fcf8d023554a (diff)
m68k: Increase initial mapping to 8 or 16 MiB if possible
If the size of the first memory chunk is at least 8 or 16 MiB increase the initial mapping to 8 resp. 16 MiB instead of 4 MiB. This makes it possible to 1. Map more memory in the first node without running out of space for the page tables, 2. Boot kernels that don't fit in 4 MiB (e.g. multi_defconfig). Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> - Add support for 8 MiB, - Store initial mapping size in head.S for later reuse, - Add comment about large kernels. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mm')
-rw-r--r--arch/m68k/mm/motorola.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c
index 7d4024432163..b958916e5eac 100644
--- a/arch/m68k/mm/motorola.c
+++ b/arch/m68k/mm/motorola.c
@@ -45,7 +45,7 @@ EXPORT_SYMBOL(mm_cachebits);
#endif
/* size of memory already mapped in head.S */
-#define INIT_MAPPED_SIZE (4UL<<20)
+extern __initdata unsigned long m68k_init_mapped_size;
extern unsigned long availmem;
@@ -271,10 +271,12 @@ void __init paging_init(void)
*/
addr = m68k_memory[0].addr;
size = m68k_memory[0].size;
- free_bootmem_node(NODE_DATA(0), availmem, min(INIT_MAPPED_SIZE, size) - (availmem - addr));
+ free_bootmem_node(NODE_DATA(0), availmem,
+ min(m68k_init_mapped_size, size) - (availmem - addr));
map_node(0);
- if (size > INIT_MAPPED_SIZE)
- free_bootmem_node(NODE_DATA(0), addr + INIT_MAPPED_SIZE, size - INIT_MAPPED_SIZE);
+ if (size > m68k_init_mapped_size)
+ free_bootmem_node(NODE_DATA(0), addr + m68k_init_mapped_size,
+ size - m68k_init_mapped_size);
for (i = 1; i < m68k_num_memory; i++)
map_node(i);