diff options
Diffstat (limited to 'arch/mips/mm/init.c')
-rw-r--r-- | arch/mips/mm/init.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 8d1f4f363049..2efcbd24c82f 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/proc_fs.h> | 28 | #include <linux/proc_fs.h> |
29 | #include <linux/pfn.h> | 29 | #include <linux/pfn.h> |
30 | #include <linux/hardirq.h> | 30 | #include <linux/hardirq.h> |
31 | #include <linux/gfp.h> | ||
31 | 32 | ||
32 | #include <asm/asm-offsets.h> | 33 | #include <asm/asm-offsets.h> |
33 | #include <asm/bootinfo.h> | 34 | #include <asm/bootinfo.h> |
@@ -143,7 +144,7 @@ void *kmap_coherent(struct page *page, unsigned long addr) | |||
143 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | 144 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) |
144 | entrylo = pte.pte_high; | 145 | entrylo = pte.pte_high; |
145 | #else | 146 | #else |
146 | entrylo = pte_val(pte) >> 6; | 147 | entrylo = pte_to_entrylo(pte_val(pte)); |
147 | #endif | 148 | #endif |
148 | 149 | ||
149 | ENTER_CRITICAL(flags); | 150 | ENTER_CRITICAL(flags); |
@@ -298,7 +299,7 @@ void __init fixrange_init(unsigned long start, unsigned long end, | |||
298 | } | 299 | } |
299 | 300 | ||
300 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 301 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
301 | static int __init page_is_ram(unsigned long pagenr) | 302 | int page_is_ram(unsigned long pagenr) |
302 | { | 303 | { |
303 | int i; | 304 | int i; |
304 | 305 | ||
@@ -424,7 +425,7 @@ void __init mem_init(void) | |||
424 | reservedpages << (PAGE_SHIFT-10), | 425 | reservedpages << (PAGE_SHIFT-10), |
425 | datasize >> 10, | 426 | datasize >> 10, |
426 | initsize >> 10, | 427 | initsize >> 10, |
427 | (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))); | 428 | totalhigh_pages << (PAGE_SHIFT-10)); |
428 | } | 429 | } |
429 | #endif /* !CONFIG_NEED_MULTIPLE_NODES */ | 430 | #endif /* !CONFIG_NEED_MULTIPLE_NODES */ |
430 | 431 | ||
@@ -462,7 +463,9 @@ void __init_refok free_initmem(void) | |||
462 | __pa_symbol(&__init_end)); | 463 | __pa_symbol(&__init_end)); |
463 | } | 464 | } |
464 | 465 | ||
466 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT | ||
465 | unsigned long pgd_current[NR_CPUS]; | 467 | unsigned long pgd_current[NR_CPUS]; |
468 | #endif | ||
466 | /* | 469 | /* |
467 | * On 64-bit we've got three-level pagetables with a slightly | 470 | * On 64-bit we've got three-level pagetables with a slightly |
468 | * different layout ... | 471 | * different layout ... |
@@ -475,7 +478,7 @@ unsigned long pgd_current[NR_CPUS]; | |||
475 | * will officially be retired. | 478 | * will officially be retired. |
476 | */ | 479 | */ |
477 | pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER); | 480 | pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER); |
478 | #ifdef CONFIG_64BIT | 481 | #ifndef __PAGETABLE_PMD_FOLDED |
479 | pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned(PMD_ORDER); | 482 | pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned(PMD_ORDER); |
480 | #endif | 483 | #endif |
481 | pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER); | 484 | pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER); |