diff options
author | Andi Kleen <ak@suse.de> | 2008-07-24 00:27:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:17 -0400 |
commit | a5516438959d90b071ff0a484ce4f3f523dc3152 (patch) | |
tree | e356ba9364c76b93c176b4d4a262b7aca3ee8f91 /include/asm-powerpc | |
parent | b7ba30c679ed1eb7ed3ed8f281f6493282042bd4 (diff) |
hugetlb: modular state for hugetlb page size
The goal of this patchset is to support multiple hugetlb page sizes. This
is achieved by introducing a new struct hstate structure, which
encapsulates the important hugetlb state and constants (eg. huge page
size, number of huge pages currently allocated, etc).
The hstate structure is then passed around the code which requires these
fields, they will do the right thing regardless of the exact hstate they
are operating on.
This patch adds the hstate structure, with a single global instance of it
(default_hstate), and does the basic work of converting hugetlb to use the
hstate.
Future patches will add more hstate structures to allow for different
hugetlbfs mounts to have different page sizes.
[akpm@linux-foundation.org: coding-style fixes]
Acked-by: Adam Litke <agl@us.ibm.com>
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/hugetlb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-powerpc/hugetlb.h b/include/asm-powerpc/hugetlb.h index 0a37aa5ecaa5..ca37c4af27b1 100644 --- a/include/asm-powerpc/hugetlb.h +++ b/include/asm-powerpc/hugetlb.h | |||
@@ -21,7 +21,8 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
21 | * If the arch doesn't supply something else, assume that hugepage | 21 | * If the arch doesn't supply something else, assume that hugepage |
22 | * size aligned regions are ok without further preparation. | 22 | * size aligned regions are ok without further preparation. |
23 | */ | 23 | */ |
24 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | 24 | static inline int prepare_hugepage_range(struct file *file, |
25 | unsigned long addr, unsigned long len) | ||
25 | { | 26 | { |
26 | if (len & ~HPAGE_MASK) | 27 | if (len & ~HPAGE_MASK) |
27 | return -EINVAL; | 28 | return -EINVAL; |