.. | .. |
---|
9 | 9 | #ifndef _ASM_S390_HUGETLB_H |
---|
10 | 10 | #define _ASM_S390_HUGETLB_H |
---|
11 | 11 | |
---|
| 12 | +#include <linux/pgtable.h> |
---|
12 | 13 | #include <asm/page.h> |
---|
13 | | -#include <asm/pgtable.h> |
---|
14 | 14 | |
---|
15 | | - |
---|
16 | | -#define is_hugepage_only_range(mm, addr, len) 0 |
---|
17 | 15 | #define hugetlb_free_pgd_range free_pgd_range |
---|
18 | 16 | #define hugepages_supported() (MACHINE_HAS_EDAT1) |
---|
19 | 17 | |
---|
.. | .. |
---|
30 | 28 | static inline int prepare_hugepage_range(struct file *file, |
---|
31 | 29 | unsigned long addr, unsigned long len) |
---|
32 | 30 | { |
---|
33 | | - if (len & ~HPAGE_MASK) |
---|
| 31 | + struct hstate *h = hstate_file(file); |
---|
| 32 | + |
---|
| 33 | + if (len & ~huge_page_mask(h)) |
---|
34 | 34 | return -EINVAL; |
---|
35 | | - if (addr & ~HPAGE_MASK) |
---|
| 35 | + if (addr & ~huge_page_mask(h)) |
---|
36 | 36 | return -EINVAL; |
---|
37 | 37 | return 0; |
---|
38 | 38 | } |
---|
.. | .. |
---|
41 | 41 | { |
---|
42 | 42 | clear_bit(PG_arch_1, &page->flags); |
---|
43 | 43 | } |
---|
| 44 | +#define arch_clear_hugepage_flags arch_clear_hugepage_flags |
---|
44 | 45 | |
---|
45 | 46 | static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr, |
---|
46 | 47 | pte_t *ptep, unsigned long sz) |
---|
.. | .. |
---|
116 | 117 | return pte_modify(pte, newprot); |
---|
117 | 118 | } |
---|
118 | 119 | |
---|
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 | + |
---|
122 | 125 | #endif /* _ASM_S390_HUGETLB_H */ |
---|