diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/mm/hugetlbpage.c | 12 | ||||
-rw-r--r-- | arch/ia64/mm/hugetlbpage.c | 5 | ||||
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 15 | ||||
-rw-r--r-- | arch/sh/mm/hugetlbpage.c | 12 | ||||
-rw-r--r-- | arch/sh64/mm/hugetlbpage.c | 12 | ||||
-rw-r--r-- | arch/sparc64/mm/hugetlbpage.c | 12 |
6 files changed, 3 insertions, 65 deletions
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index d524127c9afc..a7d891585411 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c | |||
@@ -48,18 +48,6 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
48 | return (pte_t *) pmd; | 48 | return (pte_t *) pmd; |
49 | } | 49 | } |
50 | 50 | ||
51 | /* | ||
52 | * This function checks for proper alignment of input addr and len parameters. | ||
53 | */ | ||
54 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
55 | { | ||
56 | if (len & ~HPAGE_MASK) | ||
57 | return -EINVAL; | ||
58 | if (addr & ~HPAGE_MASK) | ||
59 | return -EINVAL; | ||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | #if 0 /* This is just for testing */ | 51 | #if 0 /* This is just for testing */ |
64 | struct page * | 52 | struct page * |
65 | follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) | 53 | follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) |
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index 2d13889d0a99..9dbc7dadd165 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -68,9 +68,10 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr) | |||
68 | #define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; } | 68 | #define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; } |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * This function checks for proper alignment of input addr and len parameters. | 71 | * Don't actually need to do any preparation, but need to make sure |
72 | * the address is in the right region. | ||
72 | */ | 73 | */ |
73 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | 74 | int prepare_hugepage_range(unsigned long addr, unsigned long len) |
74 | { | 75 | { |
75 | if (len & ~HPAGE_MASK) | 76 | if (len & ~HPAGE_MASK) |
76 | return -EINVAL; | 77 | return -EINVAL; |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index b51bb28c054b..7370f9f33e29 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -133,21 +133,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
133 | return __pte(old); | 133 | return __pte(old); |
134 | } | 134 | } |
135 | 135 | ||
136 | /* | ||
137 | * This function checks for proper alignment of input addr and len parameters. | ||
138 | */ | ||
139 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
140 | { | ||
141 | if (len & ~HPAGE_MASK) | ||
142 | return -EINVAL; | ||
143 | if (addr & ~HPAGE_MASK) | ||
144 | return -EINVAL; | ||
145 | if (! (within_hugepage_low_range(addr, len) | ||
146 | || within_hugepage_high_range(addr, len)) ) | ||
147 | return -EINVAL; | ||
148 | return 0; | ||
149 | } | ||
150 | |||
151 | struct slb_flush_info { | 136 | struct slb_flush_info { |
152 | struct mm_struct *mm; | 137 | struct mm_struct *mm; |
153 | u16 newareas; | 138 | u16 newareas; |
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 6b7a7688c98e..a3568fd51508 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
@@ -84,18 +84,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
84 | return entry; | 84 | return entry; |
85 | } | 85 | } |
86 | 86 | ||
87 | /* | ||
88 | * This function checks for proper alignment of input addr and len parameters. | ||
89 | */ | ||
90 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
91 | { | ||
92 | if (len & ~HPAGE_MASK) | ||
93 | return -EINVAL; | ||
94 | if (addr & ~HPAGE_MASK) | ||
95 | return -EINVAL; | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | struct page *follow_huge_addr(struct mm_struct *mm, | 87 | struct page *follow_huge_addr(struct mm_struct *mm, |
100 | unsigned long address, int write) | 88 | unsigned long address, int write) |
101 | { | 89 | { |
diff --git a/arch/sh64/mm/hugetlbpage.c b/arch/sh64/mm/hugetlbpage.c index ed6a505b3ee2..3d89f2a6c785 100644 --- a/arch/sh64/mm/hugetlbpage.c +++ b/arch/sh64/mm/hugetlbpage.c | |||
@@ -84,18 +84,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
84 | return entry; | 84 | return entry; |
85 | } | 85 | } |
86 | 86 | ||
87 | /* | ||
88 | * This function checks for proper alignment of input addr and len parameters. | ||
89 | */ | ||
90 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
91 | { | ||
92 | if (len & ~HPAGE_MASK) | ||
93 | return -EINVAL; | ||
94 | if (addr & ~HPAGE_MASK) | ||
95 | return -EINVAL; | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | struct page *follow_huge_addr(struct mm_struct *mm, | 87 | struct page *follow_huge_addr(struct mm_struct *mm, |
100 | unsigned long address, int write) | 88 | unsigned long address, int write) |
101 | { | 89 | { |
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index a7a24869d045..280dc7958a13 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c | |||
@@ -263,18 +263,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
263 | return entry; | 263 | return entry; |
264 | } | 264 | } |
265 | 265 | ||
266 | /* | ||
267 | * This function checks for proper alignment of input addr and len parameters. | ||
268 | */ | ||
269 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
270 | { | ||
271 | if (len & ~HPAGE_MASK) | ||
272 | return -EINVAL; | ||
273 | if (addr & ~HPAGE_MASK) | ||
274 | return -EINVAL; | ||
275 | return 0; | ||
276 | } | ||
277 | |||
278 | struct page *follow_huge_addr(struct mm_struct *mm, | 266 | struct page *follow_huge_addr(struct mm_struct *mm, |
279 | unsigned long address, int write) | 267 | unsigned long address, int write) |
280 | { | 268 | { |