From patchwork Tue Nov 6 22:38:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 1707301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 9248ADFE75 for ; Tue, 6 Nov 2012 22:40:46 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVrnS-0006M5-Ll; Tue, 06 Nov 2012 22:39:02 +0000 Received: from mail.linuxfoundation.org ([140.211.169.12]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVrn2-0006Hj-QL for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2012 22:38:37 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121106_173837_030852_49EAA3EF X-CRM114-Status: GOOD ( 11.43 ) X-Spam-Score: 1.1 (+) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (1.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-mips@linux-mips.org, Rik van Riel , Russell King , William Irwin , linux-sh@vger.kernel.org, x86@kernel.org, Hugh Dickins , linux-kernel@vger.kernel.org, Ralf Baechle , linux-mm@kvack.org, Paul Mundt , Chris Metcalf , sparclinux@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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)<