From patchwork Fri Mar 19 18:32:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Albert Herranz X-Patchwork-Id: 48170 X-Patchwork-Delegate: grant.likely@secretlab.ca Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 88BFAB7DA1 for ; Sat, 20 Mar 2010 05:33:33 +1100 (EST) Received: from smtp133.mail.ukl.yahoo.com (smtp133.mail.ukl.yahoo.com [77.238.184.64]) by ozlabs.org (Postfix) with SMTP id D488CB7C67 for ; Sat, 20 Mar 2010 05:32:53 +1100 (EST) Received: (qmail 43448 invoked from network); 19 Mar 2010 18:32:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.es; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=Y2HVgxK2VJeUziewg99moRrTHi2XEl+v9erDHTpBFf8PTiBExT/oIE0Xx8Vczhk9A0A1ePva+91/pZoH9/oDuESRN7vBrzZ5omJpC/y2KTvgbNj3FDXhQXvhxptUyq2c9nV9z115hznoiOsro36JWJ1aXNYJOjazxKKM3Z2LBsE= ; Received: from 37.Red-81-34-164.dynamicIP.rima-tde.net (albert_herranz@81.34.164.37 with login) by smtp133.mail.ukl.yahoo.com with SMTP; 19 Mar 2010 18:32:51 +0000 GMT X-Yahoo-SMTP: czee06uswBAtfIYshc.kP27UlfEXaxwWNSjJ X-YMail-OSG: yuQSEugVM1mwqQPTbLMJo0KH_ruuamHCubiZXZOkIJwLSqAXo_4iK6Xn9FgDm6b5VlzCIpkJD9FKoXSbNU.XANX3hCucAqypCQVJ_1DIiMseyarjTb_jO.MhURgCm5d_niIJoB92r3j8mRLkToyVXJxx3L6AjU.ftjh88CtSIrdOZt.7l3vCy2hMDMjoTTwzYuNUFwznz6CdrJM9V5Wr22Cz09.kA91mAjuCZTQGzg28D0FfRnToDe_hImI.r0JXj29Qjv4BTMrvwPeEfURprK09dtfK7LQq X-Yahoo-Newman-Property: ymail-3 From: Albert Herranz To: linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, iommu@lists.linux-foundation.org Subject: [PATCH v5 02/10] swiotlb: make swiotlb_bounce() __weak Date: Fri, 19 Mar 2010 19:32:18 +0100 Message-Id: <1269023546-25534-3-git-send-email-albert_herranz@yahoo.es> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1269023546-25534-1-git-send-email-albert_herranz@yahoo.es> References: <1269023546-25534-1-git-send-email-albert_herranz@yahoo.es> Cc: Albert Herranz , konrad.wilk@oracle.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org 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 --- 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);