From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx158.postini.com [74.125.245.158]) by kanga.kvack.org (Postfix) with SMTP id 11B6D6B002B for ; Tue, 16 Oct 2012 10:41:49 -0400 (EDT) Message-ID: <1350398501.2532.12.camel@dabdike> Subject: Re: dma_alloc_coherent fails in framebuffer From: James Bottomley Date: Tue, 16 Oct 2012 07:41:41 -0700 In-Reply-To: References: <1350192523.10946.4.camel@gitbox> <1350246895.11504.6.camel@gitbox> <20121015094547.GC29125@suse.de> <1350325704.31162.16.camel@gitbox> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Bob Liu Cc: Tony Prisk , Mel Gorman , linux-mm@kvack.org, Arm Kernel Mailing List , Arnd Bergmann On Tue, 2012-10-16 at 10:17 +0800, Bob Liu wrote: > I think you need to declare that memory using > dma_declare_coherent_memory() before > alloc_from_coherent. This isn't true. Almost every platform has a mechanism for manufacturing coherent memory (in the worst case, they just turn off the CPU cache on a page and hand it out). The purpose of dma_declare_coherent_memory() is to allow a per device declaration of preferred regions ... usually because they reside either on the fast path to the device or sometimes on the device itself. There are only a handful of devices which need it, so in the ordinary course of events, dma_alloc_coherent() is used without any memory declaration. James -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org