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 e95a985 commit 1bcdb76Copy full SHA for 1bcdb76
arch/arm64/mm/hugetlbpage.c
@@ -368,6 +368,28 @@ pte_t *huge_pte_offset(struct mm_struct *mm,
368
return NULL;
369
}
370
371
+unsigned long hugetlb_mask_last_page(struct hstate *h)
372
+{
373
+ unsigned long hp_size = huge_page_size(h);
374
+
375
+ switch (hp_size) {
376
+#ifndef __PAGETABLE_PMD_FOLDED
377
+ case PUD_SIZE:
378
+ return PGDIR_SIZE - PUD_SIZE;
379
+#endif
380
+ case CONT_PMD_SIZE:
381
+ return PUD_SIZE - CONT_PMD_SIZE;
382
+ case PMD_SIZE:
383
+ return PUD_SIZE - PMD_SIZE;
384
+ case CONT_PTE_SIZE:
385
+ return PMD_SIZE - CONT_PTE_SIZE;
386
+ default:
387
+ break;
388
+ }
389
390
+ return 0UL;
391
+}
392
393
pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, vm_flags_t flags)
394
{
395
size_t pagesize = 1UL << shift;
0 commit comments