diff options
Diffstat (limited to 'arch/powerpc/mm/hugetlbpage.c')
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 426c269e552e..6bc9dbad7dea 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -287,15 +287,15 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas) | |||
287 | 287 | ||
288 | int prepare_hugepage_range(unsigned long addr, unsigned long len) | 288 | int prepare_hugepage_range(unsigned long addr, unsigned long len) |
289 | { | 289 | { |
290 | int err; | 290 | int err = 0; |
291 | 291 | ||
292 | if ( (addr+len) < addr ) | 292 | if ( (addr+len) < addr ) |
293 | return -EINVAL; | 293 | return -EINVAL; |
294 | 294 | ||
295 | if ((addr + len) < 0x100000000UL) | 295 | if (addr < 0x100000000UL) |
296 | err = open_low_hpage_areas(current->mm, | 296 | err = open_low_hpage_areas(current->mm, |
297 | LOW_ESID_MASK(addr, len)); | 297 | LOW_ESID_MASK(addr, len)); |
298 | else | 298 | if ((addr + len) > 0x100000000UL) |
299 | err = open_high_hpage_areas(current->mm, | 299 | err = open_high_hpage_areas(current->mm, |
300 | HTLB_AREA_MASK(addr, len)); | 300 | HTLB_AREA_MASK(addr, len)); |
301 | if (err) { | 301 | if (err) { |
@@ -754,9 +754,7 @@ repeat: | |||
754 | } | 754 | } |
755 | 755 | ||
756 | /* | 756 | /* |
757 | * No need to use ldarx/stdcx here because all who | 757 | * No need to use ldarx/stdcx here |
758 | * might be updating the pte will hold the | ||
759 | * page_table_lock | ||
760 | */ | 758 | */ |
761 | *ptep = __pte(new_pte & ~_PAGE_BUSY); | 759 | *ptep = __pte(new_pte & ~_PAGE_BUSY); |
762 | 760 | ||