From patchwork Wed Dec 23 21:22:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 69617 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBNLOK0U028384 for ; Wed, 23 Dec 2009 21:24:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757265AbZLWVXO (ORCPT ); Wed, 23 Dec 2009 16:23:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756394AbZLWVW7 (ORCPT ); Wed, 23 Dec 2009 16:22:59 -0500 Received: from cantor2.suse.de ([195.135.220.15]:58592 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757185AbZLWVWz (ORCPT ); Wed, 23 Dec 2009 16:22:55 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id D43E88891E; Wed, 23 Dec 2009 22:22:54 +0100 (CET) From: James Bottomley To: linux-arch@vger.kernel.org Cc: linux-parisc@vger.kernel.org, Christoph Hellwig , Russell King , Paul Mundt , James Bottomley Subject: [PATCHv2 3/5] arm: add mm API for DMA to vmalloc/vmap areas Date: Wed, 23 Dec 2009 15:22:23 -0600 Message-Id: <1261603345-2494-4-git-send-email-James.Bottomley@suse.de> X-Mailer: git-send-email 1.6.5 In-Reply-To: <1261603345-2494-3-git-send-email-James.Bottomley@suse.de> References: <1261603345-2494-1-git-send-email-James.Bottomley@suse.de> <1261603345-2494-2-git-send-email-James.Bottomley@suse.de> <1261603345-2494-3-git-send-email-James.Bottomley@suse.de> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index 730aefc..4ae503c 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h @@ -432,6 +432,16 @@ static inline void __flush_icache_all(void) : "r" (0)); #endif } +static inline void flush_kernel_vmap_range(void *addr, int size) +{ + if ((cache_is_vivt() || cache_is_vipt_aliasing())) + __cpuc_flush_dcache_area(addr, (size_t)size); +} +static inline void invalidate_kernel_vmap_range(void *addr, int size) +{ + if ((cache_is_vivt() || cache_is_vipt_aliasing())) + __cpuc_flush_dcache_area(addr, (size_t)size); +} #define ARCH_HAS_FLUSH_ANON_PAGE static inline void flush_anon_page(struct vm_area_struct *vma,