diff options
author | Gerald Schaefer <gerald.schaefer@de.ibm.com> | 2013-04-29 18:07:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:54:33 -0400 |
commit | 106c992a5ebef28193cf5958e49ceff5e4aebb04 (patch) | |
tree | 86f6a69dce858449e9f02d43b65cd2c2743c57dd /include/asm-generic/hugetlb.h | |
parent | 146732ce104ddfed3d4d82722c0b336074016b92 (diff) |
mm/hugetlb: add more arch-defined huge_pte functions
Commit abf09bed3cce ("s390/mm: implement software dirty bits")
introduced another difference in the pte layout vs. the pmd layout on
s390, thoroughly breaking the s390 support for hugetlbfs. This requires
replacing some more pte_xxx functions in mm/hugetlbfs.c with a
huge_pte_xxx version.
This patch introduces those huge_pte_xxx functions and their generic
implementation in asm-generic/hugetlb.h, which will now be included on
all architectures supporting hugetlbfs apart from s390. This change
will be a no-op for those architectures.
[akpm@linux-foundation.org: fix warning]
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Hillf Danton <dhillf@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.cz> [for !s390 parts]
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic/hugetlb.h')
-rw-r--r-- | include/asm-generic/hugetlb.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/asm-generic/hugetlb.h b/include/asm-generic/hugetlb.h new file mode 100644 index 000000000000..d06079c774a0 --- /dev/null +++ b/include/asm-generic/hugetlb.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _ASM_GENERIC_HUGETLB_H | ||
2 | #define _ASM_GENERIC_HUGETLB_H | ||
3 | |||
4 | static inline pte_t mk_huge_pte(struct page *page, pgprot_t pgprot) | ||
5 | { | ||
6 | return mk_pte(page, pgprot); | ||
7 | } | ||
8 | |||
9 | static inline int huge_pte_write(pte_t pte) | ||
10 | { | ||
11 | return pte_write(pte); | ||
12 | } | ||
13 | |||
14 | static inline int huge_pte_dirty(pte_t pte) | ||
15 | { | ||
16 | return pte_dirty(pte); | ||
17 | } | ||
18 | |||
19 | static inline pte_t huge_pte_mkwrite(pte_t pte) | ||
20 | { | ||
21 | return pte_mkwrite(pte); | ||
22 | } | ||
23 | |||
24 | static inline pte_t huge_pte_mkdirty(pte_t pte) | ||
25 | { | ||
26 | return pte_mkdirty(pte); | ||
27 | } | ||
28 | |||
29 | static inline pte_t huge_pte_modify(pte_t pte, pgprot_t newprot) | ||
30 | { | ||
31 | return pte_modify(pte, newprot); | ||
32 | } | ||
33 | |||
34 | static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr, | ||
35 | pte_t *ptep) | ||
36 | { | ||
37 | pte_clear(mm, addr, ptep); | ||
38 | } | ||
39 | |||
40 | #endif /* _ASM_GENERIC_HUGETLB_H */ | ||