From 9a29703191d74364fc4a21122333acccacaed808 Mon Sep 17 00:00:00 2001 From: David Daney Date: Tue, 14 Aug 2012 11:08:01 -0700 Subject: [PATCH] --- yaml --- r: 334323 b: refs/heads/master c: 485172b3dff29f888a88d3dba8caec5d589a4049 h: refs/heads/master i: 334321: 049267b3b2da981d6c68f58ed12cee1830af2d56 334319: 18d4f742928388ccd55e834f00cd7eac049bea21 v: v3 --- [refs] | 2 +- trunk/arch/mips/kernel/vmlinux.lds.S | 21 +++++++++++++++++++-- trunk/arch/mips/mm/init.c | 17 +++++++++-------- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index a6ca99b7689f..8cbc587a894a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c87728ca82a1057eb8f84e139bf416ca5488b6fb +refs/heads/master: 485172b3dff29f888a88d3dba8caec5d589a4049 diff --git a/trunk/arch/mips/kernel/vmlinux.lds.S b/trunk/arch/mips/kernel/vmlinux.lds.S index df243a64f430..007ccbe1e264 100644 --- a/trunk/arch/mips/kernel/vmlinux.lds.S +++ b/trunk/arch/mips/kernel/vmlinux.lds.S @@ -1,6 +1,13 @@ #include #include #include + +/* + * Put .bss..swapper_pg_dir as the first thing in .bss. This will + * ensure that it has .bss alignment (64K). + */ +#define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir) + #include #undef mips @@ -119,11 +126,21 @@ SECTIONS } PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT) - . = ALIGN(PAGE_SIZE); + /* + * Align to 64K in attempt to eliminate holes before the + * .bss..swapper_pg_dir section at the start of .bss. This + * also satisfies PAGE_SIZE alignment as the largest page size + * allowed is 64K. + */ + . = ALIGN(0x10000); __init_end = .; /* freed after init ends here */ - BSS_SECTION(0, 0, 0) + /* + * Force .bss to 64K alignment so that .bss..swapper_pg_dir + * gets that alignment. .sbss should be empty, so there will be + * no holes after __init_end. */ + BSS_SECTION(0, 0x10000, 0) _end = . ; diff --git a/trunk/arch/mips/mm/init.c b/trunk/arch/mips/mm/init.c index 1a85ba92eb5c..be9acb2b959d 100644 --- a/trunk/arch/mips/mm/init.c +++ b/trunk/arch/mips/mm/init.c @@ -469,19 +469,20 @@ void __init_refok free_initmem(void) #ifndef CONFIG_MIPS_PGD_C0_CONTEXT unsigned long pgd_current[NR_CPUS]; #endif -/* - * On 64-bit we've got three-level pagetables with a slightly - * different layout ... - */ -#define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<