Received: from milmhbs1.lsil.com (147.145.21.209) by coscas01.lsi.com
 (172.21.36.60) with Microsoft SMTP Server id 8.1.393.1; Thu, 18 Feb 2010
 12:48:57 -0700
Received: from mail1.lsil.com (mail1.lsil.com [147.145.40.21])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id o1IJmvJQ013857	for
 <andy.sharp@lsi.com>; Thu, 18 Feb 2010 11:48:57 -0800
Received: from psmtp.com (na3sys009amx163.postini.com [74.125.149.89])	by
 mail1.lsil.com (8.12.11/8.12.11) with SMTP id o1IJmswu025405	for
 <andy.sharp@lsi.com>; Thu, 18 Feb 2010 11:48:55 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx163.postini.com
 ([74.125.148.14]) with SMTP;	Thu, 18 Feb 2010 11:48:55 PST
Received: from localhost.localdomain ([127.0.0.1]:51187 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1492444Ab0BRTst (ORCPT
        <rfc822;andy.sharp@lsi.com>); Thu, 18 Feb 2010 20:48:49 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 18 Feb 2010 20:48:31
 +0100 (CET)
Received: from smtp2.caviumnetworks.com ([209.113.159.134]:2688 "EHLO
        smtp2.caviumnetworks.com" rhost-flags-OK-OK-OK-OK)        by
 eddie.linux-mips.org with ESMTP id S1492443Ab0BRTs1 (ORCPT
        <rfc822;linux-mips@linux-mips.org>); Thu, 18 Feb 2010 20:48:27 +0100
Received: from maexch1.caveonetworks.com (Not Verified[192.168.14.20]) by
 smtp2.caviumnetworks.com with MailMarshal (v6,5,4,7535)        id
 <B4b7d98210000>; Thu, 18 Feb 2010 14:42:25 -0500
Received: from caexch01.caveonetworks.com ([192.168.16.9]) by
 maexch1.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.3959);         Thu,
 18 Feb 2010 14:48:26 -0500
Received: from dd1.caveonetworks.com ([12.108.191.236]) by
 caexch01.caveonetworks.com over TLS secured channel with Microsoft
 SMTPSVC(6.0.3790.3959);         Thu, 18 Feb 2010 11:48:24 -0800
Received: from dd1.caveonetworks.com (localhost.localdomain [127.0.0.1])
        by dd1.caveonetworks.com (8.14.3/8.14.2) with ESMTP id o1IJmM3o000990;
        Thu, 18 Feb 2010 11:48:22 -0800
Received: (from ddaney@localhost)        by dd1.caveonetworks.com
 (8.14.3/8.14.3/Submit) id o1IJmMil000989;        Thu, 18 Feb 2010 11:48:22
 -0800
From: David Daney <ddaney@caviumnetworks.com>
To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	"ralf@linux-mips.org" <ralf@linux-mips.org>
CC: David Daney <ddaney@caviumnetworks.com>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Thu, 18 Feb 2010 12:48:20 -0700
Subject: [PATCH 2/2] MIPS: Octeon: Replace spinlock with raw_spinlocks in
 dma-octeon.c.
Thread-Topic: [PATCH 2/2] MIPS: Octeon: Replace spinlock with raw_spinlocks
 in dma-octeon.c.
Thread-Index: Acqw02jbUm0Vh1UuQfWec8q9H8hhtw==
Message-ID: <1266522500-955-1-git-send-email-ddaney@caviumnetworks.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: coscas01.lsi.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-originalarrivaltime: 18 Feb 2010 19:48:24.0376 (UTC)
 FILETIME=[54FA5380:01CAB0D3]
x-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
x-pstn-addresses: from <ddaney@caviumnetworks.com> [22/1] 
x-pstn-neptune: 0/0/0.00/0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/cavium-octeon/dma-octeon.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/mips/cavium-octeon/dma-octeon.c b/arch/mips/cavium-octeon=
/dma-octeon.c
index 4b92bfc..be531ec 100644
--- a/arch/mips/cavium-octeon/dma-octeon.c
+++ b/arch/mips/cavium-octeon/dma-octeon.c
@@ -41,7 +41,7 @@ struct bar1_index_state {
 };
=20
 #ifdef CONFIG_PCI
-static DEFINE_SPINLOCK(bar1_lock);
+static DEFINE_RAW_SPINLOCK(bar1_lock);
 static struct bar1_index_state bar1_state[32];
 #endif
=20
@@ -198,7 +198,7 @@ dma_addr_t octeon_map_dma_mem(struct device *dev, void =
*ptr, size_t size)
 		start_index =3D 31;
=20
 	/* Only one processor can access the Bar register at once */
-	spin_lock_irqsave(&bar1_lock, flags);
+	raw_spin_lock_irqsave(&bar1_lock, flags);
=20
 	/* Look through Bar1 for existing mapping that will work */
 	for (index =3D start_index; index >=3D 0; index--) {
@@ -250,7 +250,7 @@ dma_addr_t octeon_map_dma_mem(struct device *dev, void =
*ptr, size_t size)
 	       (unsigned long long) physical);
=20
 done_unlock:
-	spin_unlock_irqrestore(&bar1_lock, flags);
+	raw_spin_unlock_irqrestore(&bar1_lock, flags);
 done:
 	pr_debug("dma_map_single 0x%llx->0x%llx\n", physical, result);
 	return result;
@@ -324,14 +324,14 @@ void octeon_unmap_dma_mem(struct device *dev, dma_add=
r_t dma_addr)
 		      "Attempt to unmap an invalid address (0x%llx)\n",
 		      dma_addr);
=20
-	spin_lock_irqsave(&bar1_lock, flags);
+	raw_spin_lock_irqsave(&bar1_lock, flags);
 	bar1_state[index].ref_count--;
 	if (bar1_state[index].ref_count =3D=3D 0)
 		octeon_npi_write32(CVMX_NPI_PCI_BAR1_INDEXX(index), 0);
 	else if (unlikely(bar1_state[index].ref_count < 0))
 		panic("dma_unmap_single: Bar1[%u] reference count < 0\n",
 		      (int) index);
-	spin_unlock_irqrestore(&bar1_lock, flags);
+	raw_spin_unlock_irqrestore(&bar1_lock, flags);
 done:
 	pr_debug("dma_unmap_single 0x%llx\n", dma_addr);
 	return;
--=20
1.6.6


