Received: from mail.onstor.com (66.201.51.107) by exch1.onstor.net
 (10.0.0.225) with Microsoft SMTP Server id 8.1.311.2; Wed, 10 Dec 2008
 18:16:06 -0800
Received: from ausesmta2-1.messageone.com ([64.20.241.45]) by mail.onstor.com
 with Microsoft SMTPSVC(6.0.3790.3959);	 Wed, 10 Dec 2008 18:16:06 -0800
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])	by
 ausesmta2-1.messageone.com (8.13.8/8.13.8) with ESMTP id mBB2G5br009618	for
 <andy.sharp@onstor.com>; Wed, 10 Dec 2008 20:16:05 -0600
Received: from localhost.localdomain ([127.0.0.1]:43685 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S24207757AbYLKCPm
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Thu, 11 Dec 2008 02:15:42 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Dec 2008 02:15:26
 +0000 (GMT)
Received: from mail3.caviumnetworks.com ([12.108.191.235]:31315 "EHLO
	mail3.caviumnetworks.com") by ftp.linux-mips.org with ESMTP	id
 S24207755AbYLKCPR (ORCPT <rfc822;linux-mips@linux-mips.org>);	Thu, 11 Dec
 2008 02:15:17 +0000
Received: from exch4.caveonetworks.com (Not Verified[192.168.16.23]) by
 mail3.caviumnetworks.com with MailMarshal (v6,2,2,3503)	id <B494077ac0000>;
 Wed, 10 Dec 2008 21:15:08 -0500
Received: from exch4.caveonetworks.com ([192.168.16.23]) by
 exch4.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.3959);	 Wed, 10 Dec
 2008 18:14:45 -0800
Received: from dd1.caveonetworks.com ([64.169.86.201]) by
 exch4.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.3959);	 Wed, 10 Dec
 2008 18:14:45 -0800
From: David Daney <ddaney@caviumnetworks.com>
To: linux-mips <linux-mips@linux-mips.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Wed, 10 Dec 2008 18:14:45 -0800
Subject: [Patch] MIPS: Add missing calls to plat_unmap_dma_mem.
Thread-Topic: [Patch] MIPS: Add missing calls to plat_unmap_dma_mem.
Thread-Index: AclbNmzhI9lHI/JsRz+WLHCvW05SNA==
Message-ID: <49407795.9010208@caviumnetworks.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 0b
X-MS-Exchange-Organization-AuthSource: exch1.onstor.net
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-originalarrivaltime: 11 Dec 2008 02:14:45.0772 (UTC)
 FILETIME=[3C7964C0:01C95B36]
user-agent: Thunderbird 2.0.0.18 (X11/20081119)
errors-to: linux-mips-bounce@linux-mips.org
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: Wda37ZNW6Eo+SvWl+4RDfA==
x-messageone-virus-version: vendor=fsecure
 engine=4.65.7400:2.4.4,1.2.40,4.0.164
 definitions=2008-12-11_02:2008-12-08,2008-12-11,2008-12-10 signatures=0
x-messageone-virus-scanned: Clean
x-messageone-envelope-sender: linux-mips-bounce@linux-mips.org
x-messageone-spam-details: rule=m773emszm_notspam policy=m773emszm score=0
 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam
 adjust=0 reason=mlx engine=3.1.0-0810130000 definitions=main-0812100182
x-messageone-spam-score: 0
x-messageone-spam-bar:
x-list: linux-mips
x-archive-position: 21581
x-ecartis-version: Ecartis v1.0.0
x-original-sender: ddaney@caviumnetworks.com
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

It appears that dma_free_noncoherent() and dma_free_coherent() are
missing calls to plat_unmap_dma_mem().  This patch adds them.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
This is split out from my OCTEON processor support patch at Ralf's
request.

 arch/mips/mm/dma-default.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index 5b98d0e..e6708b3 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -111,6 +111,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);
 void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
 	dma_addr_t dma_handle)
 {
+	plat_unmap_dma_mem(dma_handle);
 	free_pages((unsigned long) vaddr, get_order(size));
 }
=20
@@ -121,6 +122,8 @@ void dma_free_coherent(struct device *dev, size_t size,=
 void *vaddr,
 {
 	unsigned long addr =3D (unsigned long) vaddr;
=20
+	plat_unmap_dma_mem(dma_handle);
+
 	if (!plat_device_is_coherent(dev))
 		addr =3D CAC_ADDR(addr);
=20

