Skip to content

Commit

Permalink
mm/hugetlb: remove gigantic page support for HIGHMEM
Browse files Browse the repository at this point in the history
This reverts ee8f248 ("hugetlb: add phys addr to struct
huge_bootmem_page").

At one time powerpc used this field and supporting code.  However that
was removed with commit 79cc38d ("powerpc/mm/hugetlb: Add support
for reserving gigantic huge pages via kernel command line").

There are no users of this field and supporting code, so remove it.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Mike Kravetz <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: "Aneesh Kumar K . V" <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Cannon Matthews <[email protected]>
Cc: Becky Bruce <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mjkravetz authored and torvalds committed Aug 17, 2018
1 parent 9bfe5de commit 40d18eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
3 changes: 0 additions & 3 deletions include/linux/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,6 @@ 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(struct vm_area_struct *vma,
Expand Down
9 changes: 1 addition & 8 deletions mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2139,16 +2139,9 @@ 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);
memblock_free_late(__pa(m),
sizeof(struct huge_bootmem_page));
#else
page = virt_to_page(m);
#endif
WARN_ON(page_count(page) != 1);
prep_compound_huge_page(page, h->order);
WARN_ON(PageReserved(page));
Expand Down

0 comments on commit 40d18eb

Please sign in to comment.