From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 06 Nov 2012 23:39:37 +0100 (CET) Received: from mail.linuxfoundation.org ([140.211.169.12]:51479 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6826039Ab2KFWimZwr0Y (ORCPT ); Tue, 6 Nov 2012 23:38:42 +0100 Received: from akpm.mtv.corp.google.com (216-239-45-4.google.com [216.239.45.4]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E397126; Tue, 6 Nov 2012 22:38:35 +0000 (UTC) Date: Tue, 6 Nov 2012 14:38:35 -0800 From: Andrew Morton 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 Subject: Re: [PATCH 11/16] mm: use vm_unmapped_area() on arm architecture Message-Id: <20121106143835.3e321da4.akpm@linux-foundation.org> In-Reply-To: <1352155633-8648-12-git-send-email-walken@google.com> References: <1352155633-8648-1-git-send-email-walken@google.com> <1352155633-8648-12-git-send-email-walken@google.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 34912 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: akpm@linux-foundation.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Return-Path: 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)<