[PATCH v5 02/10] swiotlb: make swiotlb_bounce() __weak

Albert Herranz albert_herranz at yahoo.es
Sat Mar 20 05:32:18 EST 2010


This patch converts swiotlb_bounce() into a weak function making it
overloadable by platform support code.

This will be used later to support the Nintendo Wii video game console,
which is a NOT_COHERENT_CACHE platform and requires explicit cache handling
when dealing with the swiotlb bounce buffers.

Signed-off-by: Albert Herranz <albert_herranz at yahoo.es>
---
 lib/swiotlb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index ab1622a..9ce5cd2 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -328,7 +328,7 @@ EXPORT_SYMBOL_GPL(is_swiotlb_buffer);
 /*
  * Bounce: copy the swiotlb buffer back to the original dma location
  */
-void swiotlb_bounce(phys_addr_t phys, char *dma_addr, size_t size,
+void __weak swiotlb_bounce(phys_addr_t phys, char *dma_addr, size_t size,
 			   enum dma_data_direction dir)
 {
 	unsigned long pfn = PFN_DOWN(phys);
-- 
1.6.3.3



More information about the Linuxppc-dev mailing list