From patchwork Fri Feb 5 15:50:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 77362 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 o15FpCK8009941 for ; Fri, 5 Feb 2010 15:51:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753586Ab0BEPvM (ORCPT ); Fri, 5 Feb 2010 10:51:12 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52415 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753598Ab0BEPvK (ORCPT ); Fri, 5 Feb 2010 10:51:10 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 1FFDF89FC6; Fri, 5 Feb 2010 16:51:10 +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 2/5] parisc: add mm API for DMA to vmalloc/vmap areas Date: Fri, 5 Feb 2010 09:50:54 -0600 Message-Id: <1265385057-2575-3-git-send-email-James.Bottomley@suse.de> X-Mailer: git-send-email 1.6.5 In-Reply-To: <1265385057-2575-2-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> 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:12 +0000 (UTC) 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()