git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
arch
/
ia64
/
mm
/
hugetlbpage.c
diff --git
a/arch/ia64/mm/hugetlbpage.c
b/arch/ia64/mm/hugetlbpage.c
index
8d50671
..
2d13889
100644
(file)
--- a/
arch/ia64/mm/hugetlbpage.c
+++ b/
arch/ia64/mm/hugetlbpage.c
@@
-68,10
+68,9
@@
huge_pte_offset (struct mm_struct *mm, unsigned long addr)
#define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; }
/*
#define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; }
/*
- * Don't actually need to do any preparation, but need to make sure
- * the address is in the right region.
+ * This function checks for proper alignment of input addr and len parameters.
*/
*/
-int
prepare
_hugepage_range(unsigned long addr, unsigned long len)
+int
is_aligned
_hugepage_range(unsigned long addr, unsigned long len)
{
if (len & ~HPAGE_MASK)
return -EINVAL;
{
if (len & ~HPAGE_MASK)
return -EINVAL;
@@
-113,7
+112,8
@@
void hugetlb_free_pgd_range(struct mmu_gather **tlb,
unsigned long floor, unsigned long ceiling)
{
/*
unsigned long floor, unsigned long ceiling)
{
/*
- * This is called to free hugetlb page tables.
+ * This is called only when is_hugepage_only_range(addr,),
+ * and it follows that is_hugepage_only_range(end,) also.
*
* The offset of these addresses from the base of the hugetlb
* region must be scaled down by HPAGE_SIZE/PAGE_SIZE so that
*
* The offset of these addresses from the base of the hugetlb
* region must be scaled down by HPAGE_SIZE/PAGE_SIZE so that
@@
-125,9
+125,9
@@
void hugetlb_free_pgd_range(struct mmu_gather **tlb,
addr = htlbpage_to_page(addr);
end = htlbpage_to_page(end);
addr = htlbpage_to_page(addr);
end = htlbpage_to_page(end);
- if (
REGION_NUMBER(floor) == RGN_HPAGE
)
+ if (
is_hugepage_only_range(tlb->mm, floor, HPAGE_SIZE)
)
floor = htlbpage_to_page(floor);
floor = htlbpage_to_page(floor);
- if (
REGION_NUMBER(ceiling) == RGN_HPAGE
)
+ if (
is_hugepage_only_range(tlb->mm, ceiling, HPAGE_SIZE)
)
ceiling = htlbpage_to_page(ceiling);
free_pgd_range(tlb, addr, end, floor, ceiling);
ceiling = htlbpage_to_page(ceiling);
free_pgd_range(tlb, addr, end, floor, ceiling);