Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258920
b: refs/heads/master
c: ee8f248
h: refs/heads/master
v: v3
  • Loading branch information
Becky Bruce authored and Linus Torvalds committed Jul 26, 2011
1 parent c71623c commit 3d9ea7a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 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: 2b37c35e6552b0d04d5db9728bc7af22d53f731a
refs/heads/master: ee8f248d266ec6966c0ce6b7dec24de43dcc1b58
3 changes: 3 additions & 0 deletions trunk/include/linux/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ struct hstate {
struct huge_bootmem_page {
struct list_head list;
struct hstate *hstate;
#ifdef CONFIG_HIGHMEM
phys_addr_t phys;
#endif
};

struct page *alloc_huge_page_node(struct hstate *h, int nid);
Expand Down
10 changes: 9 additions & 1 deletion trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,16 @@ static void __init gather_bootmem_prealloc(void)
struct huge_bootmem_page *m;

list_for_each_entry(m, &huge_boot_pages, list) {
struct page *page = virt_to_page(m);
struct hstate *h = m->hstate;
struct page *page;

#ifdef CONFIG_HIGHMEM
page = pfn_to_page(m->phys >> PAGE_SHIFT);
free_bootmem_late((unsigned long)m,
sizeof(struct huge_bootmem_page));
#else
page = virt_to_page(m);
#endif
__ClearPageReserved(page);
WARN_ON(page_count(page) != 1);
prep_compound_huge_page(page, h->order);
Expand Down

0 comments on commit 3d9ea7a

Please sign in to comment.