Linux Audio

Check our new training course

Loading...
v6.2
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef _ASM_SH_HUGETLB_H
 3#define _ASM_SH_HUGETLB_H
 4
 5#include <asm/cacheflush.h>
 6#include <asm/page.h>
 7
 
 
 
 
 
 
 8/*
 9 * If the arch doesn't supply something else, assume that hugepage
10 * size aligned regions are ok without further preparation.
11 */
12#define __HAVE_ARCH_PREPARE_HUGEPAGE_RANGE
13static inline int prepare_hugepage_range(struct file *file,
14			unsigned long addr, unsigned long len)
15{
16	if (len & ~HPAGE_MASK)
17		return -EINVAL;
18	if (addr & ~HPAGE_MASK)
19		return -EINVAL;
20	return 0;
21}
22
23#define __HAVE_ARCH_HUGE_PTEP_CLEAR_FLUSH
24static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
25					  unsigned long addr, pte_t *ptep)
26{
27	return *ptep;
28}
29
30static inline void arch_clear_hugepage_flags(struct page *page)
31{
32	clear_bit(PG_dcache_clean, &page->flags);
33}
34#define arch_clear_hugepage_flags arch_clear_hugepage_flags
35
36#include <asm-generic/hugetlb.h>
37
38#endif /* _ASM_SH_HUGETLB_H */
v5.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef _ASM_SH_HUGETLB_H
 3#define _ASM_SH_HUGETLB_H
 4
 5#include <asm/cacheflush.h>
 6#include <asm/page.h>
 7
 8static inline int is_hugepage_only_range(struct mm_struct *mm,
 9					 unsigned long addr,
10					 unsigned long len) {
11	return 0;
12}
13
14/*
15 * If the arch doesn't supply something else, assume that hugepage
16 * size aligned regions are ok without further preparation.
17 */
18#define __HAVE_ARCH_PREPARE_HUGEPAGE_RANGE
19static inline int prepare_hugepage_range(struct file *file,
20			unsigned long addr, unsigned long len)
21{
22	if (len & ~HPAGE_MASK)
23		return -EINVAL;
24	if (addr & ~HPAGE_MASK)
25		return -EINVAL;
26	return 0;
27}
28
29#define __HAVE_ARCH_HUGE_PTEP_CLEAR_FLUSH
30static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
31					 unsigned long addr, pte_t *ptep)
32{
 
33}
34
35static inline void arch_clear_hugepage_flags(struct page *page)
36{
37	clear_bit(PG_dcache_clean, &page->flags);
38}
 
39
40#include <asm-generic/hugetlb.h>
41
42#endif /* _ASM_SH_HUGETLB_H */