Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22490
b: refs/heads/master
c: 9da61ae
h: refs/heads/master
v: v3
  • Loading branch information
David Gibson authored and Linus Torvalds committed Mar 22, 2006
1 parent 79489ed commit e97b039
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27a85ef1b81300cfff06b4c8037e9914dfb09acc
refs/heads/master: 9da61aef0fd5b17dd4bf4baf33db12c470def774
1 change: 1 addition & 0 deletions trunk/include/asm-ia64/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@

# define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
# define ARCH_HAS_HUGEPAGE_ONLY_RANGE
# define ARCH_HAS_HUGETLB_FREE_PGD_RANGE
#endif /* CONFIG_HUGETLB_PAGE */

#ifdef __ASSEMBLY__
Expand Down
5 changes: 0 additions & 5 deletions trunk/include/asm-powerpc/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,6 @@ extern pgd_t swapper_pg_dir[];

extern void paging_init(void);

#ifdef CONFIG_HUGETLB_PAGE
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \
free_pgd_range(tlb, addr, end, floor, ceiling)
#endif

/*
* This gets called at the end of handling a page fault, when
* the kernel has put a new PTE into the page table for the process.
Expand Down
9 changes: 5 additions & 4 deletions trunk/include/linux/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ void hugetlb_change_protection(struct vm_area_struct *vma,

#ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE
#define is_hugepage_only_range(mm, addr, len) 0
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \
do { } while (0)
#endif

#ifndef ARCH_HAS_HUGETLB_FREE_PGD_RANGE
#define hugetlb_free_pgd_range free_pgd_range
#endif

#ifndef ARCH_HAS_PREPARE_HUGEPAGE_RANGE
Expand Down Expand Up @@ -93,8 +95,7 @@ static inline unsigned long hugetlb_total_pages(void)
#define prepare_hugepage_range(addr, len) (-EINVAL)
#define pmd_huge(x) 0
#define is_hugepage_only_range(mm, addr, len) 0
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \
do { } while (0)
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
#define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; })

#define hugetlb_change_protection(vma, address, end, newprot)
Expand Down
5 changes: 2 additions & 3 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,16 +277,15 @@ void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *vma,
anon_vma_unlink(vma);
unlink_file_vma(vma);

if (is_hugepage_only_range(vma->vm_mm, addr, HPAGE_SIZE)) {
if (is_vm_hugetlb_page(vma)) {
hugetlb_free_pgd_range(tlb, addr, vma->vm_end,
floor, next? next->vm_start: ceiling);
} else {
/*
* Optimization: gather nearby vmas into one call down
*/
while (next && next->vm_start <= vma->vm_end + PMD_SIZE
&& !is_hugepage_only_range(vma->vm_mm, next->vm_start,
HPAGE_SIZE)) {
&& !is_vm_hugetlb_page(vma)) {
vma = next;
next = vma->vm_next;
anon_vma_unlink(vma);
Expand Down

0 comments on commit e97b039

Please sign in to comment.