aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hugetlbpage.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/hugetlbpage.c')
-rw-r--r--arch/powerpc/mm/hugetlbpage.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 5615acc29527..89c836d54809 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -146,6 +146,11 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
146 return hugepte_offset(hpdp, addr); 146 return hugepte_offset(hpdp, addr);
147} 147}
148 148
149int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
150{
151 return 0;
152}
153
149static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp) 154static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp)
150{ 155{
151 pte_t *hugepte = hugepd_page(*hpdp); 156 pte_t *hugepte = hugepd_page(*hpdp);
@@ -480,9 +485,6 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
480 485
481 mm->context.high_htlb_areas |= newareas; 486 mm->context.high_htlb_areas |= newareas;
482 487
483 /* update the paca copy of the context struct */
484 get_paca()->context = mm->context;
485
486 /* the context change must make it to memory before the flush, 488 /* the context change must make it to memory before the flush,
487 * so that further SLB misses do the right thing. */ 489 * so that further SLB misses do the right thing. */
488 mb(); 490 mb();
@@ -494,11 +496,15 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
494 return 0; 496 return 0;
495} 497}
496 498
497int prepare_hugepage_range(unsigned long addr, unsigned long len) 499int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff)
498{ 500{
499 int err = 0; 501 int err = 0;
500 502
501 if ( (addr+len) < addr ) 503 if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
504 return -EINVAL;
505 if (len & ~HPAGE_MASK)
506 return -EINVAL;
507 if (addr & ~HPAGE_MASK)
502 return -EINVAL; 508 return -EINVAL;
503 509
504 if (addr < 0x100000000UL) 510 if (addr < 0x100000000UL)
@@ -1041,7 +1047,7 @@ repeat:
1041 return err; 1047 return err;
1042} 1048}
1043 1049
1044static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags) 1050static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags)
1045{ 1051{
1046 memset(addr, 0, kmem_cache_size(cache)); 1052 memset(addr, 0, kmem_cache_size(cache));
1047} 1053}