diff options
-rw-r--r-- | include/linux/mm.h | 18 | ||||
-rw-r--r-- | mm/memory.c | 12 |
2 files changed, 18 insertions, 12 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7bf0bd882fc3..c95d96ebd5ad 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -850,8 +850,26 @@ static inline int vma_wants_writenotify(struct vm_area_struct *vma) | |||
850 | 850 | ||
851 | extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); | 851 | extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); |
852 | 852 | ||
853 | #ifdef __PAGETABLE_PUD_FOLDED | ||
854 | static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, | ||
855 | unsigned long address) | ||
856 | { | ||
857 | return 0; | ||
858 | } | ||
859 | #else | ||
853 | int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address); | 860 | int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address); |
861 | #endif | ||
862 | |||
863 | #ifdef __PAGETABLE_PMD_FOLDED | ||
864 | static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud, | ||
865 | unsigned long address) | ||
866 | { | ||
867 | return 0; | ||
868 | } | ||
869 | #else | ||
854 | int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); | 870 | int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); |
871 | #endif | ||
872 | |||
855 | int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address); | 873 | int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address); |
856 | int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); | 874 | int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); |
857 | 875 | ||
diff --git a/mm/memory.c b/mm/memory.c index 044feb7e7134..c252aae544e9 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -2633,12 +2633,6 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) | |||
2633 | spin_unlock(&mm->page_table_lock); | 2633 | spin_unlock(&mm->page_table_lock); |
2634 | return 0; | 2634 | return 0; |
2635 | } | 2635 | } |
2636 | #else | ||
2637 | /* Workaround for gcc 2.96 */ | ||
2638 | int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) | ||
2639 | { | ||
2640 | return 0; | ||
2641 | } | ||
2642 | #endif /* __PAGETABLE_PUD_FOLDED */ | 2636 | #endif /* __PAGETABLE_PUD_FOLDED */ |
2643 | 2637 | ||
2644 | #ifndef __PAGETABLE_PMD_FOLDED | 2638 | #ifndef __PAGETABLE_PMD_FOLDED |
@@ -2667,12 +2661,6 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) | |||
2667 | spin_unlock(&mm->page_table_lock); | 2661 | spin_unlock(&mm->page_table_lock); |
2668 | return 0; | 2662 | return 0; |
2669 | } | 2663 | } |
2670 | #else | ||
2671 | /* Workaround for gcc 2.96 */ | ||
2672 | int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) | ||
2673 | { | ||
2674 | return 0; | ||
2675 | } | ||
2676 | #endif /* __PAGETABLE_PMD_FOLDED */ | 2664 | #endif /* __PAGETABLE_PMD_FOLDED */ |
2677 | 2665 | ||
2678 | int make_pages_present(unsigned long addr, unsigned long end) | 2666 | int make_pages_present(unsigned long addr, unsigned long end) |