diff options
-rw-r--r-- | arch/ia64/include/asm/hugetlb.h | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/hugetlb.h | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/hugetlb.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/hugetlb.h | 1 | ||||
-rw-r--r-- | arch/sh/include/asm/hugetlb.h | 6 | ||||
-rw-r--r-- | arch/sparc/include/asm/hugetlb.h | 4 | ||||
-rw-r--r-- | arch/tile/include/asm/hugetlb.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/hugetlb.h | 4 | ||||
-rw-r--r-- | mm/hugetlb.c | 1 |
9 files changed, 32 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/hugetlb.h b/arch/ia64/include/asm/hugetlb.h index da55c63728e..94eaa5bd5d0 100644 --- a/arch/ia64/include/asm/hugetlb.h +++ b/arch/ia64/include/asm/hugetlb.h | |||
@@ -77,4 +77,8 @@ static inline void arch_release_hugepage(struct page *page) | |||
77 | { | 77 | { |
78 | } | 78 | } |
79 | 79 | ||
80 | static inline void arch_clear_hugepage_flags(struct page *page) | ||
81 | { | ||
82 | } | ||
83 | |||
80 | #endif /* _ASM_IA64_HUGETLB_H */ | 84 | #endif /* _ASM_IA64_HUGETLB_H */ |
diff --git a/arch/mips/include/asm/hugetlb.h b/arch/mips/include/asm/hugetlb.h index 58d36889f09..bd94946a18f 100644 --- a/arch/mips/include/asm/hugetlb.h +++ b/arch/mips/include/asm/hugetlb.h | |||
@@ -112,4 +112,8 @@ static inline void arch_release_hugepage(struct page *page) | |||
112 | { | 112 | { |
113 | } | 113 | } |
114 | 114 | ||
115 | static inline void arch_clear_hugepage_flags(struct page *page) | ||
116 | { | ||
117 | } | ||
118 | |||
115 | #endif /* __ASM_HUGETLB_H */ | 119 | #endif /* __ASM_HUGETLB_H */ |
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index dfdb95bc59a..62e11a32c4c 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h | |||
@@ -151,6 +151,10 @@ static inline void arch_release_hugepage(struct page *page) | |||
151 | { | 151 | { |
152 | } | 152 | } |
153 | 153 | ||
154 | static inline void arch_clear_hugepage_flags(struct page *page) | ||
155 | { | ||
156 | } | ||
157 | |||
154 | #else /* ! CONFIG_HUGETLB_PAGE */ | 158 | #else /* ! CONFIG_HUGETLB_PAGE */ |
155 | static inline void flush_hugetlb_page(struct vm_area_struct *vma, | 159 | static inline void flush_hugetlb_page(struct vm_area_struct *vma, |
156 | unsigned long vmaddr) | 160 | unsigned long vmaddr) |
diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h index 2d6e6e38056..fc322421b1c 100644 --- a/arch/s390/include/asm/hugetlb.h +++ b/arch/s390/include/asm/hugetlb.h | |||
@@ -33,6 +33,7 @@ static inline int prepare_hugepage_range(struct file *file, | |||
33 | } | 33 | } |
34 | 34 | ||
35 | #define hugetlb_prefault_arch_hook(mm) do { } while (0) | 35 | #define hugetlb_prefault_arch_hook(mm) do { } while (0) |
36 | #define arch_clear_hugepage_flags(page) do { } while (0) | ||
36 | 37 | ||
37 | int arch_prepare_hugepage(struct page *page); | 38 | int arch_prepare_hugepage(struct page *page); |
38 | void arch_release_hugepage(struct page *page); | 39 | void arch_release_hugepage(struct page *page); |
diff --git a/arch/sh/include/asm/hugetlb.h b/arch/sh/include/asm/hugetlb.h index 967068fb79a..b3808c7d67b 100644 --- a/arch/sh/include/asm/hugetlb.h +++ b/arch/sh/include/asm/hugetlb.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASM_SH_HUGETLB_H | 1 | #ifndef _ASM_SH_HUGETLB_H |
2 | #define _ASM_SH_HUGETLB_H | 2 | #define _ASM_SH_HUGETLB_H |
3 | 3 | ||
4 | #include <asm/cacheflush.h> | ||
4 | #include <asm/page.h> | 5 | #include <asm/page.h> |
5 | 6 | ||
6 | 7 | ||
@@ -89,4 +90,9 @@ static inline void arch_release_hugepage(struct page *page) | |||
89 | { | 90 | { |
90 | } | 91 | } |
91 | 92 | ||
93 | static inline void arch_clear_hugepage_flags(struct page *page) | ||
94 | { | ||
95 | clear_bit(PG_dcache_clean, &page->flags); | ||
96 | } | ||
97 | |||
92 | #endif /* _ASM_SH_HUGETLB_H */ | 98 | #endif /* _ASM_SH_HUGETLB_H */ |
diff --git a/arch/sparc/include/asm/hugetlb.h b/arch/sparc/include/asm/hugetlb.h index 177061064ee..e7927c9758a 100644 --- a/arch/sparc/include/asm/hugetlb.h +++ b/arch/sparc/include/asm/hugetlb.h | |||
@@ -82,4 +82,8 @@ static inline void arch_release_hugepage(struct page *page) | |||
82 | { | 82 | { |
83 | } | 83 | } |
84 | 84 | ||
85 | static inline void arch_clear_hugepage_flags(struct page *page) | ||
86 | { | ||
87 | } | ||
88 | |||
85 | #endif /* _ASM_SPARC64_HUGETLB_H */ | 89 | #endif /* _ASM_SPARC64_HUGETLB_H */ |
diff --git a/arch/tile/include/asm/hugetlb.h b/arch/tile/include/asm/hugetlb.h index b2042380a5a..0f885af2b62 100644 --- a/arch/tile/include/asm/hugetlb.h +++ b/arch/tile/include/asm/hugetlb.h | |||
@@ -106,6 +106,10 @@ static inline void arch_release_hugepage(struct page *page) | |||
106 | { | 106 | { |
107 | } | 107 | } |
108 | 108 | ||
109 | static inline void arch_clear_hugepage_flags(struct page *page) | ||
110 | { | ||
111 | } | ||
112 | |||
109 | #ifdef CONFIG_HUGETLB_SUPER_PAGES | 113 | #ifdef CONFIG_HUGETLB_SUPER_PAGES |
110 | static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma, | 114 | static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma, |
111 | struct page *page, int writable) | 115 | struct page *page, int writable) |
diff --git a/arch/x86/include/asm/hugetlb.h b/arch/x86/include/asm/hugetlb.h index 439a9acc132..bdd35dbd060 100644 --- a/arch/x86/include/asm/hugetlb.h +++ b/arch/x86/include/asm/hugetlb.h | |||
@@ -90,4 +90,8 @@ static inline void arch_release_hugepage(struct page *page) | |||
90 | { | 90 | { |
91 | } | 91 | } |
92 | 92 | ||
93 | static inline void arch_clear_hugepage_flags(struct page *page) | ||
94 | { | ||
95 | } | ||
96 | |||
93 | #endif /* _ASM_X86_HUGETLB_H */ | 97 | #endif /* _ASM_X86_HUGETLB_H */ |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index bc727122dd4..f1bb534254f 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -637,6 +637,7 @@ static void free_huge_page(struct page *page) | |||
637 | h->surplus_huge_pages--; | 637 | h->surplus_huge_pages--; |
638 | h->surplus_huge_pages_node[nid]--; | 638 | h->surplus_huge_pages_node[nid]--; |
639 | } else { | 639 | } else { |
640 | arch_clear_hugepage_flags(page); | ||
640 | enqueue_huge_page(h, page); | 641 | enqueue_huge_page(h, page); |
641 | } | 642 | } |
642 | spin_unlock(&hugetlb_lock); | 643 | spin_unlock(&hugetlb_lock); |