From patchwork Wed Dec 23 21:22:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 69620 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 nBNLOK0X028384 for ; Wed, 23 Dec 2009 21:24:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757264AbZLWVXY (ORCPT ); Wed, 23 Dec 2009 16:23:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757203AbZLWVXX (ORCPT ); Wed, 23 Dec 2009 16:23:23 -0500 Received: from cantor2.suse.de ([195.135.220.15]:58588 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757274AbZLWVWz (ORCPT ); Wed, 23 Dec 2009 16:22:55 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id ACF6387D82; Wed, 23 Dec 2009 22:22:52 +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 2/5] parisc: add mm API for DMA to vmalloc/vmap areas Date: Wed, 23 Dec 2009 15:22:22 -0600 Message-Id: <1261603345-2494-3-git-send-email-James.Bottomley@suse.de> X-Mailer: git-send-email 1.6.5 In-Reply-To: <1261603345-2494-2-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> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h index 7a73b61..4772777 100644 --- a/arch/parisc/include/asm/cacheflush.h +++ b/arch/parisc/include/asm/cacheflush.h @@ -38,6 +38,18 @@ void flush_cache_mm(struct mm_struct *mm); #define flush_kernel_dcache_range(start,size) \ flush_kernel_dcache_range_asm((start), (start)+(size)); +/* vmap range flushes and invalidates. Architecturally, we don't need + * the invalidate, because the CPU should refuse to speculate once an + * area has been flushed, so invalidate is left empty */ +static inline void flush_kernel_vmap_range(void *vaddr, int size) +{ + unsigned long start = (unsigned long)vaddr; + + flush_kernel_dcache_range_asm(start, start + size); +} +static inline void invalidate_kernel_vmap_range(void *vaddr, int size) +{ +} #define flush_cache_vmap(start, end) flush_cache_all() #define flush_cache_vunmap(start, end) flush_cache_all()