diff options
-rw-r--r-- | arch/powerpc/include/asm/hugetlb.h | 3 | ||||
-rw-r--r-- | arch/powerpc/mm/hugetlbpage-book3e.c | 8 | ||||
-rw-r--r-- | arch/powerpc/mm/mem.c | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index 555044c310b2..863f49d5ea35 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h | |||
@@ -52,7 +52,8 @@ static inline int is_hugepage_only_range(struct mm_struct *mm, | |||
52 | } | 52 | } |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | void book3e_hugetlb_preload(struct mm_struct *mm, unsigned long ea, pte_t pte); | 55 | void book3e_hugetlb_preload(struct vm_area_struct *vma, unsigned long ea, |
56 | pte_t pte); | ||
56 | void flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | 57 | void flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); |
57 | 58 | ||
58 | void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr, | 59 | void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr, |
diff --git a/arch/powerpc/mm/hugetlbpage-book3e.c b/arch/powerpc/mm/hugetlbpage-book3e.c index 4d6d849a3e54..3bc700655fc8 100644 --- a/arch/powerpc/mm/hugetlbpage-book3e.c +++ b/arch/powerpc/mm/hugetlbpage-book3e.c | |||
@@ -37,12 +37,14 @@ static inline int book3e_tlb_exists(unsigned long ea, unsigned long pid) | |||
37 | return found; | 37 | return found; |
38 | } | 38 | } |
39 | 39 | ||
40 | void book3e_hugetlb_preload(struct mm_struct *mm, unsigned long ea, pte_t pte) | 40 | void book3e_hugetlb_preload(struct vm_area_struct *vma, unsigned long ea, |
41 | pte_t pte) | ||
41 | { | 42 | { |
42 | unsigned long mas1, mas2; | 43 | unsigned long mas1, mas2; |
43 | u64 mas7_3; | 44 | u64 mas7_3; |
44 | unsigned long psize, tsize, shift; | 45 | unsigned long psize, tsize, shift; |
45 | unsigned long flags; | 46 | unsigned long flags; |
47 | struct mm_struct *mm; | ||
46 | 48 | ||
47 | #ifdef CONFIG_PPC_FSL_BOOK3E | 49 | #ifdef CONFIG_PPC_FSL_BOOK3E |
48 | int index, ncams; | 50 | int index, ncams; |
@@ -51,12 +53,14 @@ void book3e_hugetlb_preload(struct mm_struct *mm, unsigned long ea, pte_t pte) | |||
51 | if (unlikely(is_kernel_addr(ea))) | 53 | if (unlikely(is_kernel_addr(ea))) |
52 | return; | 54 | return; |
53 | 55 | ||
56 | mm = vma->vm_mm; | ||
57 | |||
54 | #ifdef CONFIG_PPC_MM_SLICES | 58 | #ifdef CONFIG_PPC_MM_SLICES |
55 | psize = get_slice_psize(mm, ea); | 59 | psize = get_slice_psize(mm, ea); |
56 | tsize = mmu_get_tsize(psize); | 60 | tsize = mmu_get_tsize(psize); |
57 | shift = mmu_psize_defs[psize].shift; | 61 | shift = mmu_psize_defs[psize].shift; |
58 | #else | 62 | #else |
59 | psize = vma_mmu_pagesize(find_vma(mm, ea)); | 63 | psize = vma_mmu_pagesize(vma); |
60 | shift = __ilog2(psize); | 64 | shift = __ilog2(psize); |
61 | tsize = shift - 10; | 65 | tsize = shift - 10; |
62 | #endif | 66 | #endif |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 22563b9664c3..83d819f30864 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -553,7 +553,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
553 | #if (defined(CONFIG_PPC_BOOK3E_64) || defined(CONFIG_PPC_FSL_BOOK3E)) \ | 553 | #if (defined(CONFIG_PPC_BOOK3E_64) || defined(CONFIG_PPC_FSL_BOOK3E)) \ |
554 | && defined(CONFIG_HUGETLB_PAGE) | 554 | && defined(CONFIG_HUGETLB_PAGE) |
555 | if (is_vm_hugetlb_page(vma)) | 555 | if (is_vm_hugetlb_page(vma)) |
556 | book3e_hugetlb_preload(vma->vm_mm, address, *ptep); | 556 | book3e_hugetlb_preload(vma, address, *ptep); |
557 | #endif | 557 | #endif |
558 | } | 558 | } |
559 | 559 | ||