hugetlb.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef _ASM_SH_HUGETLB_H
  2. #define _ASM_SH_HUGETLB_H
  3. #include <asm/page.h>
  4. static inline int is_hugepage_only_range(struct mm_struct *mm,
  5. unsigned long addr,
  6. unsigned long len) {
  7. return 0;
  8. }
  9. /*
  10. * If the arch doesn't supply something else, assume that hugepage
  11. * size aligned regions are ok without further preparation.
  12. */
  13. static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
  14. {
  15. if (len & ~HPAGE_MASK)
  16. return -EINVAL;
  17. if (addr & ~HPAGE_MASK)
  18. return -EINVAL;
  19. return 0;
  20. }
  21. static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) {
  22. }
  23. static inline void hugetlb_free_pgd_range(struct mmu_gather **tlb,
  24. unsigned long addr, unsigned long end,
  25. unsigned long floor,
  26. unsigned long ceiling)
  27. {
  28. free_pgd_range(tlb, addr, end, floor, ceiling);
  29. }
  30. static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
  31. pte_t *ptep, pte_t pte)
  32. {
  33. set_pte_at(mm, addr, ptep, pte);
  34. }
  35. static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
  36. unsigned long addr, pte_t *ptep)
  37. {
  38. return ptep_get_and_clear(mm, addr, ptep);
  39. }
  40. static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
  41. unsigned long addr, pte_t *ptep)
  42. {
  43. }
  44. #endif /* _ASM_SH_HUGETLB_H */