We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0e33f5 commit 1e5823cCopy full SHA for 1e5823c
arch/arm64/mm/hugetlbpage.c
@@ -519,6 +519,18 @@ pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
519
520
static int __init hugetlbpage_init(void)
521
{
522
+ /*
523
+ * HugeTLB pages are supported on maximum four page table
524
+ * levels (PUD, CONT PMD, PMD, CONT PTE) for a given base
525
+ * page size, corresponding to hugetlb_add_hstate() calls
526
+ * here.
527
+ *
528
+ * HUGE_MAX_HSTATE should at least match maximum supported
529
+ * HugeTLB page sizes on the platform. Any new addition to
530
+ * supported HugeTLB page sizes will also require changing
531
+ * HUGE_MAX_HSTATE as well.
532
+ */
533
+ BUILD_BUG_ON(HUGE_MAX_HSTATE < 4);
534
if (pud_sect_supported())
535
hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT);
536
0 commit comments