aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mempolicy.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2014-01-21 18:49:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-21 19:19:44 -0500
commitd80be7c75136fb58ed7264ac8a49dd917ace77a1 (patch)
tree55a517f837e62b7ff53617dcfa52397d9be5c67e /include/linux/mempolicy.h
parente8569dd299dbc7bac878325c0bdc7aa449eae479 (diff)
mm, mempolicy: remove unneeded functions for UMA configs
Mempolicies only exist for CONFIG_NUMA configurations. Therefore, a certain class of functions are unneeded in configurations where CONFIG_NUMA is disabled such as functions that duplicate existing mempolicies, lookup existing policies, set certain mempolicy traits, or test mempolicies for certain attributes. Remove the unneeded functions so that any future callers get a compile- time error and protect their code with CONFIG_NUMA as required. Signed-off-by: David Rientjes <rientjes@google.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mempolicy.h')
-rw-r--r--include/linux/mempolicy.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 9fe426b30a41..5f1ea756aace 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -211,20 +211,8 @@ static inline void mpol_get(struct mempolicy *pol)
211{ 211{
212} 212}
213 213
214static inline struct mempolicy *mpol_dup(struct mempolicy *old)
215{
216 return NULL;
217}
218
219struct shared_policy {}; 214struct shared_policy {};
220 215
221static inline int mpol_set_shared_policy(struct shared_policy *info,
222 struct vm_area_struct *vma,
223 struct mempolicy *new)
224{
225 return -EINVAL;
226}
227
228static inline void mpol_shared_policy_init(struct shared_policy *sp, 216static inline void mpol_shared_policy_init(struct shared_policy *sp,
229 struct mempolicy *mpol) 217 struct mempolicy *mpol)
230{ 218{
@@ -234,12 +222,6 @@ static inline void mpol_free_shared_policy(struct shared_policy *p)
234{ 222{
235} 223}
236 224
237static inline struct mempolicy *
238mpol_shared_policy_lookup(struct shared_policy *sp, unsigned long idx)
239{
240 return NULL;
241}
242
243#define vma_policy(vma) NULL 225#define vma_policy(vma) NULL
244 226
245static inline int 227static inline int
@@ -266,10 +248,6 @@ static inline void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new)
266{ 248{
267} 249}
268 250
269static inline void mpol_fix_fork_child_flag(struct task_struct *p)
270{
271}
272
273static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, 251static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma,
274 unsigned long addr, gfp_t gfp_flags, 252 unsigned long addr, gfp_t gfp_flags,
275 struct mempolicy **mpol, nodemask_t **nodemask) 253 struct mempolicy **mpol, nodemask_t **nodemask)
@@ -284,12 +262,6 @@ static inline bool init_nodemask_of_mempolicy(nodemask_t *m)
284 return false; 262 return false;
285} 263}
286 264
287static inline bool mempolicy_nodemask_intersects(struct task_struct *tsk,
288 const nodemask_t *mask)
289{
290 return false;
291}
292
293static inline int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from, 265static inline int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
294 const nodemask_t *to, int flags) 266 const nodemask_t *to, int flags)
295{ 267{
@@ -307,10 +279,6 @@ static inline int mpol_parse_str(char *str, struct mempolicy **mpol)
307} 279}
308#endif 280#endif
309 281
310static inline void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
311{
312}
313
314static inline int mpol_misplaced(struct page *page, struct vm_area_struct *vma, 282static inline int mpol_misplaced(struct page *page, struct vm_area_struct *vma,
315 unsigned long address) 283 unsigned long address)
316{ 284{