linux-mips
[Top] [All Lists]

Re: [PATCH 3/3] MIPS: DMA: Add plat_extra_sync_for_cpu()

To: Kevin Cernekee <cernekee@gmail.com>
Subject: Re: [PATCH 3/3] MIPS: DMA: Add plat_extra_sync_for_cpu()
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Thu, 09 Sep 2010 13:34:31 +0400
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
In-reply-to: <99a0868bdbcfa8785a92b4af4f6d9b99@localhost>
References: <064bb0722da5d8c271c2bd9fe0a521cc@localhost> <99a0868bdbcfa8785a92b4af4f6d9b99@localhost>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3
Hello.

On 09-09-2010 3:02, Kevin Cernekee wrote:

On noncoherent processors with a readahead cache, an extra platform-
specific invalidation is required during the dma_sync_*_for_cpu()
operations to keep drivers from seeing stale prefetched data.

Signed-off-by: Kevin Cernekee<cernekee@gmail.com>
[...]
diff --git a/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h 
b/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
index 17d5794..8192683 100644
--- a/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
+++ b/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
@@ -52,6 +52,19 @@ static inline void plat_extra_sync_for_device(struct device 
*dev)
        mb();
  }

+static inline void plat_extra_sync_for_cpu(struct device *dev,
+       dma_addr_t dma_handle, unsigned long offset, size_t size,
+       enum dma_data_direction direction)
+{
+       return;

   Why not just empty function bodies?

WBR, Sergei

<Prev in Thread] Current Thread [Next in Thread>