From patchwork Fri Feb 5 15:50:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 77363 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o15FpFb8010010 for ; Fri, 5 Feb 2010 15:51:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753991Ab0BEPvP (ORCPT ); Fri, 5 Feb 2010 10:51:15 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52421 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753907Ab0BEPvO (ORCPT ); Fri, 5 Feb 2010 10:51:14 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 6B9DA89E74; Fri, 5 Feb 2010 16:51:13 +0100 (CET) From: James Bottomley To: linux-arch@vger.kernel.org Cc: linux-parisc@vger.kernel.org, rmk@arm.linux.org.uk, lethal@linux-sh.org, torvalds@linux-foundation.org, hch@lst.de, James Bottomley Subject: [PATCHv3 3/5] arm: add mm API for DMA to vmalloc/vmap areas Date: Fri, 5 Feb 2010 09:50:55 -0600 Message-Id: <1265385057-2575-4-git-send-email-James.Bottomley@suse.de> X-Mailer: git-send-email 1.6.5 In-Reply-To: <1265385057-2575-3-git-send-email-James.Bottomley@suse.de> References: <1265385057-2575-1-git-send-email-James.Bottomley@suse.de> <1265385057-2575-2-git-send-email-James.Bottomley@suse.de> <1265385057-2575-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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 05 Feb 2010 15:51:15 +0000 (UTC) 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,