diff options
Diffstat (limited to 'arch/mips/mm/init.c')
-rw-r--r-- | arch/mips/mm/init.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 1a85ba92eb5c..be9acb2b959d 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -469,19 +469,20 @@ void __init_refok free_initmem(void) | |||
469 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT | 469 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT |
470 | unsigned long pgd_current[NR_CPUS]; | 470 | unsigned long pgd_current[NR_CPUS]; |
471 | #endif | 471 | #endif |
472 | /* | ||
473 | * On 64-bit we've got three-level pagetables with a slightly | ||
474 | * different layout ... | ||
475 | */ | ||
476 | #define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order))) | ||
477 | 472 | ||
478 | /* | 473 | /* |
479 | * gcc 3.3 and older have trouble determining that PTRS_PER_PGD and PGD_ORDER | 474 | * gcc 3.3 and older have trouble determining that PTRS_PER_PGD and PGD_ORDER |
480 | * are constants. So we use the variants from asm-offset.h until that gcc | 475 | * are constants. So we use the variants from asm-offset.h until that gcc |
481 | * will officially be retired. | 476 | * will officially be retired. |
477 | * | ||
478 | * Align swapper_pg_dir in to 64K, allows its address to be loaded | ||
479 | * with a single LUI instruction in the TLB handlers. If we used | ||
480 | * __aligned(64K), its size would get rounded up to the alignment | ||
481 | * size, and waste space. So we place it in its own section and align | ||
482 | * it in the linker script. | ||
482 | */ | 483 | */ |
483 | pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER); | 484 | pgd_t swapper_pg_dir[_PTRS_PER_PGD] __section(.bss..swapper_pg_dir); |
484 | #ifndef __PAGETABLE_PMD_FOLDED | 485 | #ifndef __PAGETABLE_PMD_FOLDED |
485 | pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned(PMD_ORDER); | 486 | pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned_bss; |
486 | #endif | 487 | #endif |
487 | pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER); | 488 | pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned_bss; |