Skip to content

Commit 16d6926

Browse files
akpm00torvalds
authored andcommitted
uninline arch_pick_mmap_layout()
Fix this, on avr32: include/linux/utsname.h:35, from init/main.c:20: include/linux/sched.h: In function 'arch_pick_mmap_layout': include/linux/sched.h:2149: error: implicit declaration of function 'PAGE_ALIGN' Reported-by: Adrian Bunk <bunk@kernel.org> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0c7ad10 commit 16d6926

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

‎include/linux/sched.h‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,16 +2139,7 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
21392139

21402140
#endif /* CONFIG_SMP */
21412141

2142-
#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
21432142
extern void arch_pick_mmap_layout(struct mm_struct *mm);
2144-
#else
2145-
static inline void arch_pick_mmap_layout(struct mm_struct *mm)
2146-
{
2147-
mm->mmap_base = TASK_UNMAPPED_BASE;
2148-
mm->get_unmapped_area = arch_get_unmapped_area;
2149-
mm->unmap_area = arch_unmap_area;
2150-
}
2151-
#endif
21522143

21532144
#ifdef CONFIG_TRACING
21542145
extern void

‎mm/util.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <linux/mm.h>
12
#include <linux/slab.h>
23
#include <linux/string.h>
34
#include <linux/module.h>
@@ -136,3 +137,12 @@ char *strndup_user(const char __user *s, long n)
136137
return p;
137138
}
138139
EXPORT_SYMBOL(strndup_user);
140+
141+
#ifndef HAVE_ARCH_PICK_MMAP_LAYOUT
142+
void arch_pick_mmap_layout(struct mm_struct *mm)
143+
{
144+
mm->mmap_base = TASK_UNMAPPED_BASE;
145+
mm->get_unmapped_area = arch_get_unmapped_area;
146+
mm->unmap_area = arch_unmap_area;
147+
}
148+
#endif

0 commit comments

Comments
 (0)