diff options
author | Hugh Dickins <hugh.dickins@tiscali.co.uk> | 2009-12-16 03:56:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 09:56:12 -0500 |
commit | f42647acc4eab1befa9e290691ed7a40f9a7d3cc (patch) | |
tree | b2ced9ee524f8db99ca2ed64d181e0860a60ff94 /include/linux/ksm.h | |
parent | 8bea8672edfca7ec5f661cafb218f1205863b343 (diff) |
fix ksm.h breakage of nommu build
Commit 5ad6468801d28c4d4ac9f48ec19297817c915f6a "ksm: let shared pages
be swappable" breaks the build on m68knommu and I suspect on any nommu:
In file included from kernel/fork.c:52:
include/linux/ksm.h:129: warning: 'enum ttu_flags' declared inside parameter list
include/linux/ksm.h:129: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/ksm.h:129: error: parameter 2 ('flags') has incomplete type
make[1]: *** [kernel/fork.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Let's fix that with CONFIG_MMU around most of the !CONFIG_KSM declarations.
Reported-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Tested-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/ksm.h')
-rw-r--r-- | include/linux/ksm.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/ksm.h b/include/linux/ksm.h index bed5f16ba827..43bdab769fc3 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h | |||
@@ -94,12 +94,6 @@ void ksm_migrate_page(struct page *newpage, struct page *oldpage); | |||
94 | 94 | ||
95 | #else /* !CONFIG_KSM */ | 95 | #else /* !CONFIG_KSM */ |
96 | 96 | ||
97 | static inline int ksm_madvise(struct vm_area_struct *vma, unsigned long start, | ||
98 | unsigned long end, int advice, unsigned long *vm_flags) | ||
99 | { | ||
100 | return 0; | ||
101 | } | ||
102 | |||
103 | static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm) | 97 | static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm) |
104 | { | 98 | { |
105 | return 0; | 99 | return 0; |
@@ -114,6 +108,13 @@ static inline int PageKsm(struct page *page) | |||
114 | return 0; | 108 | return 0; |
115 | } | 109 | } |
116 | 110 | ||
111 | #ifdef CONFIG_MMU | ||
112 | static inline int ksm_madvise(struct vm_area_struct *vma, unsigned long start, | ||
113 | unsigned long end, int advice, unsigned long *vm_flags) | ||
114 | { | ||
115 | return 0; | ||
116 | } | ||
117 | |||
117 | static inline struct page *ksm_might_need_to_copy(struct page *page, | 118 | static inline struct page *ksm_might_need_to_copy(struct page *page, |
118 | struct vm_area_struct *vma, unsigned long address) | 119 | struct vm_area_struct *vma, unsigned long address) |
119 | { | 120 | { |
@@ -140,6 +141,7 @@ static inline int rmap_walk_ksm(struct page *page, int (*rmap_one)(struct page*, | |||
140 | static inline void ksm_migrate_page(struct page *newpage, struct page *oldpage) | 141 | static inline void ksm_migrate_page(struct page *newpage, struct page *oldpage) |
141 | { | 142 | { |
142 | } | 143 | } |
144 | #endif /* CONFIG_MMU */ | ||
143 | #endif /* !CONFIG_KSM */ | 145 | #endif /* !CONFIG_KSM */ |
144 | 146 | ||
145 | #endif /* __LINUX_KSM_H */ | 147 | #endif /* __LINUX_KSM_H */ |