Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754763Ab1DDPVt (ORCPT ); Mon, 4 Apr 2011 11:21:49 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:42025 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754269Ab1DDPVs (ORCPT ); Mon, 4 Apr 2011 11:21:48 -0400 MIME-Version: 1.0 X-Originating-IP: [87.194.181.195] Date: Mon, 4 Apr 2011 16:21:47 +0100 Message-ID: Subject: [PATCH] tile,mn10300: add device parameter to dma_cache_sync() From: James Hogan To: David Howells , Koichi Yasutake , Chris Metcalf , Andrew Morton , FUJITA Tomonori , James Hogan , Konrad Rzeszutek Wilk , Paul Mundt , Arnd Bergmann , linux-am33-list@redhat.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2582 Lines: 67 From: James Hogan Note: I'm not in a position to compile test this patch, but I don't foresee any problems. Since v2.6.20 "Pass struct dev pointer to dma_cache_sync()" (d3fa72e4556ec1f04e46a0d561d9e785ecaa173d), dma_cache_sync() takes a struct dev pointer, but these appear to be missing from the tile and mn10300 implementations, so add them. Signed-off-by: James Hogan --- arch/mn10300/include/asm/dma-mapping.h | 2 +- arch/tile/include/asm/dma-mapping.h | 3 ++- arch/tile/kernel/pci-dma.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mn10300/include/asm/dma-mapping.h b/arch/mn10300/include/asm/dma-mapping.h index c1be439..6876e2b 100644 --- a/arch/mn10300/include/asm/dma-mapping.h +++ b/arch/mn10300/include/asm/dma-mapping.h @@ -162,7 +162,7 @@ int dma_set_mask(struct device *dev, u64 mask) } static inline -void dma_cache_sync(void *vaddr, size_t size, +void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction direction) { mn10300_dcache_flush_inv(); diff --git a/arch/tile/include/asm/dma-mapping.h b/arch/tile/include/asm/dma-mapping.h index 15e1dce..eaa06d1 100644 --- a/arch/tile/include/asm/dma-mapping.h +++ b/arch/tile/include/asm/dma-mapping.h @@ -65,7 +65,8 @@ extern void dma_sync_single_range_for_cpu(struct device *, dma_addr_t, extern void dma_sync_single_range_for_device(struct device *, dma_addr_t, unsigned long offset, size_t, enum dma_data_direction); -extern void dma_cache_sync(void *vaddr, size_t, enum dma_data_direction); +extern void dma_cache_sync(struct device *dev, void *vaddr, size_t, + enum dma_data_direction); static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) diff --git a/arch/tile/kernel/pci-dma.c b/arch/tile/kernel/pci-dma.c index 5ad5e13..c6812d2 100644 --- a/arch/tile/kernel/pci-dma.c +++ b/arch/tile/kernel/pci-dma.c @@ -244,7 +244,7 @@ EXPORT_SYMBOL(dma_sync_single_range_for_device); * dma_alloc_noncoherent() returns non-cacheable memory, so there's no * need to do any flushing here. */ -void dma_cache_sync(void *vaddr, size_t size, +void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction direction) { } -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/