hugetlb.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef _ASM_IA64_HUGETLB_H
  2. #define _ASM_IA64_HUGETLB_H
  3. #include <asm/page.h>
  4. #include <asm-generic/hugetlb.h>
  5. void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
  6. unsigned long end, unsigned long floor,
  7. unsigned long ceiling);
  8. int prepare_hugepage_range(struct file *file,
  9. unsigned long addr, unsigned long len);
  10. static inline int is_hugepage_only_range(struct mm_struct *mm,
  11. unsigned long addr,
  12. unsigned long len)
  13. {
  14. return (REGION_NUMBER(addr) == RGN_HPAGE ||
  15. REGION_NUMBER((addr)+(len)-1) == RGN_HPAGE);
  16. }
  17. static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
  18. pte_t *ptep, pte_t pte)
  19. {
  20. set_pte_at(mm, addr, ptep, pte);
  21. }
  22. static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
  23. unsigned long addr, pte_t *ptep)
  24. {
  25. return ptep_get_and_clear(mm, addr, ptep);
  26. }
  27. static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
  28. unsigned long addr, pte_t *ptep)
  29. {
  30. }
  31. static inline int huge_pte_none(pte_t pte)
  32. {
  33. return pte_none(pte);
  34. }
  35. static inline pte_t huge_pte_wrprotect(pte_t pte)
  36. {
  37. return pte_wrprotect(pte);
  38. }
  39. static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
  40. unsigned long addr, pte_t *ptep)
  41. {
  42. ptep_set_wrprotect(mm, addr, ptep);
  43. }
  44. static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
  45. unsigned long addr, pte_t *ptep,
  46. pte_t pte, int dirty)
  47. {
  48. return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
  49. }
  50. static inline pte_t huge_ptep_get(pte_t *ptep)
  51. {
  52. return *ptep;
  53. }
  54. static inline void arch_clear_hugepage_flags(struct page *page)
  55. {
  56. }
  57. #endif /* _ASM_IA64_HUGETLB_H */