mm: use vm_unmapped_area() on x86_64 architecture
Update the x86_64 arch_get_unmapped_area[_topdown] functions to make use of vm_unmapped_area() instead of implementing a brute force search. Signed-off-by: Michel Lespinasse <walken@google.com> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
db4fbfb952
commit
f99024729e
@@ -354,12 +354,10 @@ static inline int mmap_is_ia32(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The first two values are special, do not change. See align_addr() */
|
||||
/* Do not change the values. See get_align_mask() */
|
||||
enum align_flags {
|
||||
ALIGN_VA_32 = BIT(0),
|
||||
ALIGN_VA_64 = BIT(1),
|
||||
ALIGN_VDSO = BIT(2),
|
||||
ALIGN_TOPDOWN = BIT(3),
|
||||
};
|
||||
|
||||
struct va_alignment {
|
||||
@@ -368,5 +366,5 @@ struct va_alignment {
|
||||
} ____cacheline_aligned;
|
||||
|
||||
extern struct va_alignment va_align;
|
||||
extern unsigned long align_addr(unsigned long, struct file *, enum align_flags);
|
||||
extern unsigned long align_vdso_addr(unsigned long);
|
||||
#endif /* _ASM_X86_ELF_H */
|
||||
|
Reference in New Issue
Block a user