diff mbox

[1/5] mm: add coherence API for DMA to vmalloc/vmap areas

Message ID 1252506878.3918.32.camel@mulgrave.site (mailing list archive)
State Superseded
Headers show

Commit Message

James Bottomley Sept. 9, 2009, 2:34 p.m. UTC
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

Comments

Paul Mundt Sept. 10, 2009, 12:24 a.m. UTC | #1
On Wed, Sep 09, 2009 at 09:34:38AM -0500, James Bottomley wrote:
> 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?
> 
Yes, I was planning on just wiring it up later, but this looks correct.
--
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
James Bottomley Sept. 10, 2009, 12:30 a.m. UTC | #2
On Thu, 2009-09-10 at 09:24 +0900, Paul Mundt wrote:
> On Wed, Sep 09, 2009 at 09:34:38AM -0500, James Bottomley wrote:
> > 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?
> > 
> Yes, I was planning on just wiring it up later, but this looks correct.

Great, thanks!

Give me an ack and I'll take care of submitting it ... although it would
be nice to test it out with the xfs problem case.

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 mbox

Patch

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,