aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@de.ibm.com>2008-04-28 05:13:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:25 -0400
commit7f2e9525ba55b1c42ad6c4a5a59d7eb7bdd9be72 (patch)
tree10792496f50b4b0fed8a2c356a8819ae8f9ce47f /include
parent8fe627ec5b7c47b1654dff50536d9709863295a3 (diff)
hugetlbfs: common code update for s390
Huge ptes have a special type on s390 and cannot be handled with the standard pte functions in certain cases, e.g. because of a different location of the invalid bit. This patch adds some new architecture- specific functions to hugetlb common code, as a prerequisite for the s390 large page support. This won't affect other architectures in functionality, but I need to add some new dummy inline functions to the headers. Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-ia64/hugetlb.h37
-rw-r--r--include/asm-powerpc/hugetlb.h37
-rw-r--r--include/asm-sh/hugetlb.h37
-rw-r--r--include/asm-sparc64/hugetlb.h37
-rw-r--r--include/asm-x86/hugetlb.h37
5 files changed, 185 insertions, 0 deletions
diff --git a/include/asm-ia64/hugetlb.h b/include/asm-ia64/hugetlb.h
index 5f5434374972..f28a9701f1cf 100644
--- a/include/asm-ia64/hugetlb.h
+++ b/include/asm-ia64/hugetlb.h
@@ -39,4 +39,41 @@ static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
39{ 39{
40} 40}
41 41
42static inline int huge_pte_none(pte_t pte)
43{
44 return pte_none(pte);
45}
46
47static inline pte_t huge_pte_wrprotect(pte_t pte)
48{
49 return pte_wrprotect(pte);
50}
51
52static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
53 unsigned long addr, pte_t *ptep)
54{
55 ptep_set_wrprotect(mm, addr, ptep);
56}
57
58static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
59 unsigned long addr, pte_t *ptep,
60 pte_t pte, int dirty)
61{
62 return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
63}
64
65static inline pte_t huge_ptep_get(pte_t *ptep)
66{
67 return *ptep;
68}
69
70static inline int arch_prepare_hugepage(struct page *page)
71{
72 return 0;
73}
74
75static inline void arch_release_hugepage(struct page *page)
76{
77}
78
42#endif /* _ASM_IA64_HUGETLB_H */ 79#endif /* _ASM_IA64_HUGETLB_H */
diff --git a/include/asm-powerpc/hugetlb.h b/include/asm-powerpc/hugetlb.h
index bead2ff78493..649c6c3b87b3 100644
--- a/include/asm-powerpc/hugetlb.h
+++ b/include/asm-powerpc/hugetlb.h
@@ -39,4 +39,41 @@ static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
39{ 39{
40} 40}
41 41
42static inline int huge_pte_none(pte_t pte)
43{
44 return pte_none(pte);
45}
46
47static inline pte_t huge_pte_wrprotect(pte_t pte)
48{
49 return pte_wrprotect(pte);
50}
51
52static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
53 unsigned long addr, pte_t *ptep)
54{
55 ptep_set_wrprotect(mm, addr, ptep);
56}
57
58static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
59 unsigned long addr, pte_t *ptep,
60 pte_t pte, int dirty)
61{
62 return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
63}
64
65static inline pte_t huge_ptep_get(pte_t *ptep)
66{
67 return *ptep;
68}
69
70static inline int arch_prepare_hugepage(struct page *page)
71{
72 return 0;
73}
74
75static inline void arch_release_hugepage(struct page *page)
76{
77}
78
42#endif /* _ASM_POWERPC_HUGETLB_H */ 79#endif /* _ASM_POWERPC_HUGETLB_H */
diff --git a/include/asm-sh/hugetlb.h b/include/asm-sh/hugetlb.h
index d1ed476467a1..02402303d89b 100644
--- a/include/asm-sh/hugetlb.h
+++ b/include/asm-sh/hugetlb.h
@@ -51,4 +51,41 @@ static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
51{ 51{
52} 52}
53 53
54static inline int huge_pte_none(pte_t pte)
55{
56 return pte_none(pte);
57}
58
59static inline pte_t huge_pte_wrprotect(pte_t pte)
60{
61 return pte_wrprotect(pte);
62}
63
64static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
65 unsigned long addr, pte_t *ptep)
66{
67 ptep_set_wrprotect(mm, addr, ptep);
68}
69
70static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
71 unsigned long addr, pte_t *ptep,
72 pte_t pte, int dirty)
73{
74 return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
75}
76
77static inline pte_t huge_ptep_get(pte_t *ptep)
78{
79 return *ptep;
80}
81
82static inline int arch_prepare_hugepage(struct page *page)
83{
84 return 0;
85}
86
87static inline void arch_release_hugepage(struct page *page)
88{
89}
90
54#endif /* _ASM_SH_HUGETLB_H */ 91#endif /* _ASM_SH_HUGETLB_H */
diff --git a/include/asm-sparc64/hugetlb.h b/include/asm-sparc64/hugetlb.h
index 0b9e44c85c5d..412af58926a0 100644
--- a/include/asm-sparc64/hugetlb.h
+++ b/include/asm-sparc64/hugetlb.h
@@ -44,4 +44,41 @@ static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
44{ 44{
45} 45}
46 46
47static inline int huge_pte_none(pte_t pte)
48{
49 return pte_none(pte);
50}
51
52static inline pte_t huge_pte_wrprotect(pte_t pte)
53{
54 return pte_wrprotect(pte);
55}
56
57static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
58 unsigned long addr, pte_t *ptep)
59{
60 ptep_set_wrprotect(mm, addr, ptep);
61}
62
63static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
64 unsigned long addr, pte_t *ptep,
65 pte_t pte, int dirty)
66{
67 return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
68}
69
70static inline pte_t huge_ptep_get(pte_t *ptep)
71{
72 return *ptep;
73}
74
75static inline int arch_prepare_hugepage(struct page *page)
76{
77 return 0;
78}
79
80static inline void arch_release_hugepage(struct page *page)
81{
82}
83
47#endif /* _ASM_SPARC64_HUGETLB_H */ 84#endif /* _ASM_SPARC64_HUGETLB_H */
diff --git a/include/asm-x86/hugetlb.h b/include/asm-x86/hugetlb.h
index f57236dfc8f4..14171a4924f6 100644
--- a/include/asm-x86/hugetlb.h
+++ b/include/asm-x86/hugetlb.h
@@ -51,4 +51,41 @@ static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
51{ 51{
52} 52}
53 53
54static inline int huge_pte_none(pte_t pte)
55{
56 return pte_none(pte);
57}
58
59static inline pte_t huge_pte_wrprotect(pte_t pte)
60{
61 return pte_wrprotect(pte);
62}
63
64static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
65 unsigned long addr, pte_t *ptep)
66{
67 ptep_set_wrprotect(mm, addr, ptep);
68}
69
70static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
71 unsigned long addr, pte_t *ptep,
72 pte_t pte, int dirty)
73{
74 return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
75}
76
77static inline pte_t huge_ptep_get(pte_t *ptep)
78{
79 return *ptep;
80}
81
82static inline int arch_prepare_hugepage(struct page *page)
83{
84 return 0;
85}
86
87static inline void arch_release_hugepage(struct page *page)
88{
89}
90
54#endif /* _ASM_X86_HUGETLB_H */ 91#endif /* _ASM_X86_HUGETLB_H */