From patchwork Wed Sep 9 14:34:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 46393 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n89EZ0DM025455 for ; Wed, 9 Sep 2009 14:35:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752484AbZIIOej (ORCPT ); Wed, 9 Sep 2009 10:34:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753294AbZIIOej (ORCPT ); Wed, 9 Sep 2009 10:34:39 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:59315 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752484AbZIIOei (ORCPT ); Wed, 9 Sep 2009 10:34:38 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id BB2978EE105; Wed, 9 Sep 2009 07:34:41 -0700 (PDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c4p4-kfIa4Ik; Wed, 9 Sep 2009 07:34:41 -0700 (PDT) Received: from [192.168.10.224] (newmulgrave.ext.hansenpartnership.com [192.168.10.224]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 107E88EE0E2; Wed, 9 Sep 2009 07:34:40 -0700 (PDT) Subject: Re: [PATCH 1/5] mm: add coherence API for DMA to vmalloc/vmap areas From: James Bottomley To: Paul Mundt Cc: Russell King , Parisc List , Linux Filesystem Mailing List , linux-arch@vger.kernel.org, Christoph Hellwig In-Reply-To: <20090909033532.GD23049@linux-sh.org> References: <1252434469.13003.3.camel@mulgrave.site> <20090908190031.GF6538@flint.arm.linux.org.uk> <1252437112.13003.39.camel@mulgrave.site> <20090908201619.GG6538@flint.arm.linux.org.uk> <1252442352.13003.132.camel@mulgrave.site> <20090908213910.GH6538@flint.arm.linux.org.uk> <1252466070.13003.365.camel@mulgrave.site> <1252466226.13003.367.camel@mulgrave.site> <1252466601.13003.374.camel@mulgrave.site> <20090909033532.GD23049@linux-sh.org> Date: Wed, 09 Sep 2009 09:34:38 -0500 Message-Id: <1252506878.3918.32.camel@mulgrave.site> Mime-Version: 1.0 X-Mailer: Evolution 2.24.1.1 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org On Wed, 2009-09-09 at 12:35 +0900, Paul Mundt wrote: > And here I thought it was a new gcc construct along the lines of > inline-if-so-inclined.. :-) Actually, I missed the fact that sh also sets ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE, so you'll need implementations of these functions too. Does this look right? James --- -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sh/include/asm/cacheflush.h b/arch/sh/include/asm/cacheflush.h index 4c5462d..db06611 100644 --- a/arch/sh/include/asm/cacheflush.h +++ b/arch/sh/include/asm/cacheflush.h @@ -48,6 +48,14 @@ static inline void flush_kernel_dcache_page(struct page *page) { flush_dcache_page(page); } +static inline void flush_kernel_dcache_addr(void *addr) +{ + __flush_invalidate_region(addr, PAGE_SIZE); +} +static inline void invalidate_kernel_dcache_addr(void *addr) +{ + __flush_invalidate_region(addr, PAGE_SIZE); +} #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF) extern void copy_to_user_page(struct vm_area_struct *vma,