hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/arch/s390/include/asm/hugetlb.h
....@@ -9,11 +9,9 @@
99 #ifndef _ASM_S390_HUGETLB_H
1010 #define _ASM_S390_HUGETLB_H
1111
12
+#include <linux/pgtable.h>
1213 #include <asm/page.h>
13
-#include <asm/pgtable.h>
1414
15
-
16
-#define is_hugepage_only_range(mm, addr, len) 0
1715 #define hugetlb_free_pgd_range free_pgd_range
1816 #define hugepages_supported() (MACHINE_HAS_EDAT1)
1917
....@@ -30,9 +28,11 @@
3028 static inline int prepare_hugepage_range(struct file *file,
3129 unsigned long addr, unsigned long len)
3230 {
33
- if (len & ~HPAGE_MASK)
31
+ struct hstate *h = hstate_file(file);
32
+
33
+ if (len & ~huge_page_mask(h))
3434 return -EINVAL;
35
- if (addr & ~HPAGE_MASK)
35
+ if (addr & ~huge_page_mask(h))
3636 return -EINVAL;
3737 return 0;
3838 }
....@@ -41,6 +41,7 @@
4141 {
4242 clear_bit(PG_arch_1, &page->flags);
4343 }
44
+#define arch_clear_hugepage_flags arch_clear_hugepage_flags
4445
4546 static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr,
4647 pte_t *ptep, unsigned long sz)
....@@ -116,7 +117,9 @@
116117 return pte_modify(pte, newprot);
117118 }
118119
119
-#ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE
120
-static inline bool gigantic_page_supported(void) { return true; }
121
-#endif
120
+static inline bool gigantic_page_runtime_supported(void)
121
+{
122
+ return true;
123
+}
124
+
122125 #endif /* _ASM_S390_HUGETLB_H */