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 1458eb2 commit a179a4bCopy full SHA for a179a4b
arch/riscv/mm/hugetlbpage.c
@@ -125,6 +125,26 @@ pte_t *huge_pte_offset(struct mm_struct *mm,
125
return pte;
126
}
127
128
+unsigned long hugetlb_mask_last_page(struct hstate *h)
129
+{
130
+ unsigned long hp_size = huge_page_size(h);
131
+
132
+ switch (hp_size) {
133
+#ifndef __PAGETABLE_PMD_FOLDED
134
+ case PUD_SIZE:
135
+ return P4D_SIZE - PUD_SIZE;
136
+#endif
137
+ case PMD_SIZE:
138
+ return PUD_SIZE - PMD_SIZE;
139
+ case napot_cont_size(NAPOT_CONT64KB_ORDER):
140
+ return PMD_SIZE - napot_cont_size(NAPOT_CONT64KB_ORDER);
141
+ default:
142
+ break;
143
+ }
144
145
+ return 0UL;
146
+}
147
148
static pte_t get_clear_contig(struct mm_struct *mm,
149
unsigned long addr,
150
pte_t *ptep,
0 commit comments