Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753278AbbETM5j (ORCPT ); Wed, 20 May 2015 08:57:39 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:34106 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349AbbETM5i (ORCPT ); Wed, 20 May 2015 08:57:38 -0400 MIME-Version: 1.0 In-Reply-To: <20150519223444.GO2067@n2100.arm.linux.org.uk> References: <20150519163436.GZ21251@e104818-lin.cambridge.arm.com> <2882347.Nj1Dq9Wlqh@wuerfel> <20150519223444.GO2067@n2100.arm.linux.org.uk> Date: Wed, 20 May 2015 14:57:36 +0200 Message-ID: Subject: Re: [RFC] arm: DMA-API contiguous cacheable memory From: Lorenzo Nava To: Russell King - ARM Linux Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Catalin Marinas , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1552 Lines: 36 On Wed, May 20, 2015 at 12:34 AM, Russell King - ARM Linux wrote: > On Wed, May 20, 2015 at 12:14:48AM +0200, Arnd Bergmann wrote: >> With that memory, you should be able to use the normal streaming >> API (dma_sync_single_for_*). > > Wrong, as I've pointed out previously. The only memory which you're > allowed to sync is with memory which has been mapped with a dma_map_*() > function. > > -- > FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up > according to speedtest.net. Russell, so probably currently is impossible to allocate a contiguous cachable DMA memory. You can't use CMA, and the only functions which allow you to use it are not compatible with sync functions. Do you think the problem is the CMA design, the DMA API design, or there is no problem at all and this is not something useful? Anyway it's not completely clear to me which is the difference between: - allocating memory and use sync function on memory mapped with dma_map_*() - allocating memory with dma_alloc_*() (with cacheable attributes) and use the sync functions on it It looks that the second just make alloc + map in a single step instead of splitting the operation in two steps. I'm sure I'm losing something, can you please help me understand that? Thanks. Lorenzo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/