hugetlb.h 1.7 KB

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