hugetlb.h 1.7 KB

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