aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c19
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)
996static void destroy_compound_gigantic_page(struct page *page, 996static 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
1012static void free_gigantic_page(struct page *page, unsigned order) 1012static 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
1056static struct page *alloc_gigantic_page(int nid, unsigned order) 1056static 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
1091static void prep_new_huge_page(struct hstate *h, struct page *page, int nid); 1091static void prep_new_huge_page(struct hstate *h, struct page *page, int nid);
1092static void prep_compound_gigantic_page(struct page *page, unsigned long order); 1092static void prep_compound_gigantic_page(struct page *page, unsigned int order);
1093 1093
1094static struct page *alloc_fresh_gigantic_page_node(struct hstate *h, int nid) 1094static 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,
1122static inline bool gigantic_page_supported(void) { return true; } 1122static inline bool gigantic_page_supported(void) { return true; }
1123#else 1123#else
1124static inline bool gigantic_page_supported(void) { return false; } 1124static inline bool gigantic_page_supported(void) { return false; }
1125static inline void free_gigantic_page(struct page *page, unsigned order) { } 1125static inline void free_gigantic_page(struct page *page, unsigned int order) { }
1126static inline void destroy_compound_gigantic_page(struct page *page, 1126static inline void destroy_compound_gigantic_page(struct page *page,
1127 unsigned long order) { } 1127 unsigned int order) { }
1128static inline int alloc_fresh_gigantic_page(struct hstate *h, 1128static 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
1253static void prep_compound_gigantic_page(struct page *page, unsigned long order) 1253static 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
1971static void __init prep_compound_huge_page(struct page *page, int order) 1971static 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)
2679module_init(hugetlb_init); 2680module_init(hugetlb_init);
2680 2681
2681/* Should be called on processing a hugepagesz=... option */ 2682/* Should be called on processing a hugepagesz=... option */
2682void __init hugetlb_add_hstate(unsigned order) 2683void __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;