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.
Showing the changes to include/linux (1 of 8 files). Show all
Unified · Split
| @@ -519,7 +519,6 @@ int huge_add_to_page_cache(struct page *page, struct address_space *mapping, · 518 unmodified lines | ||
| 519 | 519 | int __init __alloc_bootmem_huge_page(struct hstate *h); |
| 520 | 520 | int __init alloc_bootmem_huge_page(struct hstate *h); |
| 521 | 521 | |
| 522 | −void __init hugetlb_bad_size(void); | |
| 523 | 522 | void __init hugetlb_add_hstate(unsigned order); |
| 524 | 523 | bool __init arch_hugetlb_valid_size(unsigned long size); |
| 525 | 524 | struct hstate *size_to_hstate(unsigned long size); |