From patchwork Tue Nov 6 22:38:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [11/16] mm: use vm_unmapped_area() on arm architecture Date: Tue, 06 Nov 2012 12:38:35 -0000 From: Andrew Morton X-Patchwork-Id: 197570 Message-Id: <20121106143835.3e321da4.akpm@linux-foundation.org> To: Michel Lespinasse Cc: Rik van Riel , Hugh Dickins , linux-kernel@vger.kernel.org, Russell King , Ralf Baechle , Paul Mundt , "David S. Miller" , Chris Metcalf , x86@kernel.org, William Irwin , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org On Mon, 5 Nov 2012 14:47:08 -0800 Michel Lespinasse wrote: > Update the arm arch_get_unmapped_area[_topdown] functions to make > use of vm_unmapped_area() instead of implementing a brute force search. Again, --- a/arch/arm/mm/mmap.c~mm-use-vm_unmapped_area-on-arm-architecture-fix +++ a/arch/arm/mm/mmap.c @@ -11,18 +11,6 @@ #include #include -static inline unsigned long COLOUR_ALIGN_DOWN(unsigned long addr, - unsigned long pgoff) -{ - unsigned long base = addr & ~(SHMLBA-1); - unsigned long off = (pgoff << PAGE_SHIFT) & (SHMLBA-1); - - if (base + off <= addr) - return base + off; - - return base - off; -} - #define COLOUR_ALIGN(addr,pgoff) \ ((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \ (((pgoff)<