History

hugetlbfs: move hugepagesz= parsing to arch independent code

Now that architectures provide arch_hugetlb_valid_size(), parsing of "hugepagesz=" can be done in architecture independent code. Create a single routine to handle hugepagesz= parsing and remove all arch specific routines. We can also remove the interface hugetlb_bad_size() as this is no longer used outside arch independent code. This also provides consistent behavior of hugetlbfs command line options. The hugepagesz= option should only be specified once for a specific size, but some architectures allow multiple instances. This appears to be more of an oversight when code was added by some architectures to set up ALL huge pages sizes.

Mike Kravetz committed 6 years ago

Commit 359f2541 parent ae94da88 files · +17 −109Browse files

Showing the changes to include/linux (1 of 8 files). Show all

Unified · Split

include/linux/hugetlb.h+0−1
@@ -519,7 +519,6 @@ int huge_add_to_page_cache(struct page *page, struct address_space *mapping, · 518 unmodified lines
519int __init __alloc_bootmem_huge_page(struct hstate *h);519int __init __alloc_bootmem_huge_page(struct hstate *h);
520int __init alloc_bootmem_huge_page(struct hstate *h);520int __init alloc_bootmem_huge_page(struct hstate *h);
521 521
522void __init hugetlb_bad_size(void);
523void __init hugetlb_add_hstate(unsigned order);522void __init hugetlb_add_hstate(unsigned order);
524bool __init arch_hugetlb_valid_size(unsigned long size);523bool __init arch_hugetlb_valid_size(unsigned long size);
525struct hstate *size_to_hstate(unsigned long size);524struct hstate *size_to_hstate(unsigned long size);