diff options
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 4eb0f0964883..7ce07d681265 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -994,7 +994,7 @@ static int hstate_next_node_to_free(struct hstate *h, nodemask_t *nodes_allowed) | |||
994 | 994 | ||
995 | #if defined(CONFIG_CMA) && defined(CONFIG_X86_64) | 995 | #if defined(CONFIG_CMA) && defined(CONFIG_X86_64) |
996 | static void destroy_compound_gigantic_page(struct page *page, | 996 | static void destroy_compound_gigantic_page(struct page *page, |
997 | unsigned long order) | 997 | unsigned int order) |
998 | { | 998 | { |
999 | int i; | 999 | int i; |
1000 | int nr_pages = 1 << order; | 1000 | int nr_pages = 1 << order; |
@@ -1009,7 +1009,7 @@ static void destroy_compound_gigantic_page(struct page *page, | |||
1009 | __ClearPageHead(page); | 1009 | __ClearPageHead(page); |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | static void free_gigantic_page(struct page *page, unsigned order) | 1012 | static void free_gigantic_page(struct page *page, unsigned int order) |
1013 | { | 1013 | { |
1014 | free_contig_range(page_to_pfn(page), 1 << order); | 1014 | free_contig_range(page_to_pfn(page), 1 << order); |
1015 | } | 1015 | } |
@@ -1053,7 +1053,7 @@ static bool zone_spans_last_pfn(const struct zone *zone, | |||
1053 | return zone_spans_pfn(zone, last_pfn); | 1053 | return zone_spans_pfn(zone, last_pfn); |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | static struct page *alloc_gigantic_page(int nid, unsigned order) | 1056 | static struct page *alloc_gigantic_page(int nid, unsigned int order) |
1057 | { | 1057 | { |
1058 | unsigned long nr_pages = 1 << order; | 1058 | unsigned long nr_pages = 1 << order; |
1059 | unsigned long ret, pfn, flags; | 1059 | unsigned long ret, pfn, flags; |
@@ -1089,7 +1089,7 @@ static struct page *alloc_gigantic_page(int nid, unsigned order) | |||
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | static void prep_new_huge_page(struct hstate *h, struct page *page, int nid); | 1091 | static void prep_new_huge_page(struct hstate *h, struct page *page, int nid); |
1092 | static void prep_compound_gigantic_page(struct page *page, unsigned long order); | 1092 | static void prep_compound_gigantic_page(struct page *page, unsigned int order); |
1093 | 1093 | ||
1094 | static struct page *alloc_fresh_gigantic_page_node(struct hstate *h, int nid) | 1094 | static struct page *alloc_fresh_gigantic_page_node(struct hstate *h, int nid) |
1095 | { | 1095 | { |
@@ -1122,9 +1122,9 @@ static int alloc_fresh_gigantic_page(struct hstate *h, | |||
1122 | static inline bool gigantic_page_supported(void) { return true; } | 1122 | static inline bool gigantic_page_supported(void) { return true; } |
1123 | #else | 1123 | #else |
1124 | static inline bool gigantic_page_supported(void) { return false; } | 1124 | static inline bool gigantic_page_supported(void) { return false; } |
1125 | static inline void free_gigantic_page(struct page *page, unsigned order) { } | 1125 | static inline void free_gigantic_page(struct page *page, unsigned int order) { } |
1126 | static inline void destroy_compound_gigantic_page(struct page *page, | 1126 | static inline void destroy_compound_gigantic_page(struct page *page, |
1127 | unsigned long order) { } | 1127 | unsigned int order) { } |
1128 | static inline int alloc_fresh_gigantic_page(struct hstate *h, | 1128 | static inline int alloc_fresh_gigantic_page(struct hstate *h, |
1129 | nodemask_t *nodes_allowed) { return 0; } | 1129 | nodemask_t *nodes_allowed) { return 0; } |
1130 | #endif | 1130 | #endif |
@@ -1250,7 +1250,7 @@ static void prep_new_huge_page(struct hstate *h, struct page *page, int nid) | |||
1250 | put_page(page); /* free it into the hugepage allocator */ | 1250 | put_page(page); /* free it into the hugepage allocator */ |
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | static void prep_compound_gigantic_page(struct page *page, unsigned long order) | 1253 | static void prep_compound_gigantic_page(struct page *page, unsigned int order) |
1254 | { | 1254 | { |
1255 | int i; | 1255 | int i; |
1256 | int nr_pages = 1 << order; | 1256 | int nr_pages = 1 << order; |
@@ -1968,7 +1968,8 @@ found: | |||
1968 | return 1; | 1968 | return 1; |
1969 | } | 1969 | } |
1970 | 1970 | ||
1971 | static void __init prep_compound_huge_page(struct page *page, int order) | 1971 | static void __init prep_compound_huge_page(struct page *page, |
1972 | unsigned int order) | ||
1972 | { | 1973 | { |
1973 | if (unlikely(order > (MAX_ORDER - 1))) | 1974 | if (unlikely(order > (MAX_ORDER - 1))) |
1974 | prep_compound_gigantic_page(page, order); | 1975 | prep_compound_gigantic_page(page, order); |
@@ -2679,7 +2680,7 @@ static int __init hugetlb_init(void) | |||
2679 | module_init(hugetlb_init); | 2680 | module_init(hugetlb_init); |
2680 | 2681 | ||
2681 | /* Should be called on processing a hugepagesz=... option */ | 2682 | /* Should be called on processing a hugepagesz=... option */ |
2682 | void __init hugetlb_add_hstate(unsigned order) | 2683 | void __init hugetlb_add_hstate(unsigned int order) |
2683 | { | 2684 | { |
2684 | struct hstate *h; | 2685 | struct hstate *h; |
2685 | unsigned long i; | 2686 | unsigned long i; |