Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308854
b: refs/heads/master
c: 955c1cd
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed May 29, 2012
1 parent 699b7f4 commit 247b470
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2099597401c7710c00b0d7c32b24a44a193836e1
refs/heads/master: 955c1cd7401565671b064e499115344ec8067dfd
33 changes: 15 additions & 18 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4300,41 +4300,38 @@ static inline void setup_usemap(struct pglist_data *pgdat,

#ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE

/* Return a sensible default order for the pageblock size. */
static inline int pageblock_default_order(void)
{
if (HPAGE_SHIFT > PAGE_SHIFT)
return HUGETLB_PAGE_ORDER;

return MAX_ORDER-1;
}

/* Initialise the number of pages represented by NR_PAGEBLOCK_BITS */
static inline void __init set_pageblock_order(unsigned int order)
static inline void __init set_pageblock_order(void)
{
unsigned int order;

/* Check that pageblock_nr_pages has not already been setup */
if (pageblock_order)
return;

if (HPAGE_SHIFT > PAGE_SHIFT)
order = HUGETLB_PAGE_ORDER;
else
order = MAX_ORDER - 1;

/*
* Assume the largest contiguous order of interest is a huge page.
* This value may be variable depending on boot parameters on IA64
* This value may be variable depending on boot parameters on IA64 and
* powerpc.
*/
pageblock_order = order;
}
#else /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */

/*
* When CONFIG_HUGETLB_PAGE_SIZE_VARIABLE is not set, set_pageblock_order()
* and pageblock_default_order() are unused as pageblock_order is set
* at compile-time. See include/linux/pageblock-flags.h for the values of
* pageblock_order based on the kernel config
* is unused as pageblock_order is set at compile-time. See
* include/linux/pageblock-flags.h for the values of pageblock_order based on
* the kernel config
*/
static inline int pageblock_default_order(unsigned int order)
static inline void set_pageblock_order(void)
{
return MAX_ORDER-1;
}
#define set_pageblock_order(x) do {} while (0)

#endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */

Expand Down Expand Up @@ -4422,7 +4419,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
if (!size)
continue;

set_pageblock_order(pageblock_default_order());
set_pageblock_order();
setup_usemap(pgdat, zone, size);
ret = init_currently_empty_zone(zone, zone_start_pfn,
size, MEMMAP_EARLY);
Expand Down

0 comments on commit 247b470

Please sign in to comment.