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, 28 Jan 2009
 10:32:25 -0800
Received: from ausesmta2-1.messageone.com ([64.20.241.45]) by mail.onstor.com
 with Microsoft SMTPSVC(6.0.3790.3959);	 Wed, 28 Jan 2009 10:32:24 -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 n0SIWMdV025647	for
 <andy.sharp@onstor.com>; Wed, 28 Jan 2009 12:32:22 -0600
Received: from localhost.localdomain ([127.0.0.1]:21674 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S21366448AbZA1Sbn
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Wed, 28 Jan 2009 18:31:43 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 28 Jan 2009 18:31:26
 +0000 (GMT)
Received: from h5.dl5rb.org.uk ([81.2.74.5]:20625 "EHLO h5.dl5rb.org.uk")	by
 ftp.linux-mips.org with ESMTP id S21366446AbZA1SbX (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 28 Jan 2009 18:31:23 +0000
Received: from h5.dl5rb.org.uk (localhost.localdomain [127.0.0.1])	by
 h5.dl5rb.org.uk (8.14.3/8.14.3) with ESMTP id n0SIUsn7001740;	Wed, 28 Jan
 2009 18:30:54 GMT
Received: (from ralf@localhost)	by h5.dl5rb.org.uk (8.14.3/8.14.3/Submit) id
 n0SIUlLn001737;	Wed, 28 Jan 2009 18:30:47 GMT
From: Ralf Baechle <ralf@linux-mips.org>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
CC: "ddaney@caviumnetworks.com" <ddaney@caviumnetworks.com>,
	"msundius@cisco.com" <msundius@cisco.com>, "linux-mips@linux-mips.org"
	<linux-mips@linux-mips.org>, "dvomlehn@cisco.com" <dvomlehn@cisco.com>,
	"msundius@sundius.com" <msundius@sundius.com>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Wed, 28 Jan 2009 10:30:47 -0800
Subject: Re: memcpy and prefetch
Thread-Topic: memcpy and prefetch
Thread-Index: AcmBdsR4fg7qfOYpRhud1qWrxEgBsw==
Message-ID: <20090128183047.GA1691@linux-mips.org>
References: <497F9214.1000609@cisco.com>
 <497F93C1.3090401@caviumnetworks.com> <20090128103753.GC2234@linux-mips.org>
 <20090129.002850.118974677.anemo@mba.ocn.ne.jp>
In-Reply-To: <20090129.002850.118974677.anemo@mba.ocn.ne.jp>
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: 28 Jan 2009 18:32:24.0972 (UTC)
 FILETIME=[C3E8FCC0:01C98176]
user-agent: Mutt/1.5.18 (2008-05-17)
errors-to: linux-mips-bounce@linux-mips.org
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: ol2zZXfMUfmQ2KI6QobMHA==
x-messageone-virus-version: vendor=fsecure
 engine=4.65.7400:2.4.4,1.2.40,4.0.164
 definitions=2009-01-28_09:2009-01-27,2009-01-28,2009-01-28 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-0901280110
x-messageone-spam-score: 0
x-messageone-spam-bar:
x-list: linux-mips
x-archive-position: 21861
x-ecartis-version: Ecartis v1.0.0
x-original-sender: ralf@linux-mips.org
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

On Thu, Jan 29, 2009 at 12:28:50AM +0900, Atsushi Nemoto wrote:

> #if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27)
> #undef CONFIG_CPU_HAS_PREFETCH
> #endif
> #ifdef CONFIG_MIPS_MALTA
> #undef CONFIG_CPU_HAS_PREFETCH
> #endif
>=20
> Are there any configuration which do not undef CONFIG_CPU_HAS_PREFETCH ? =
;-)

Yes, that's been a long standing one.  Fixed also.

  Ralf

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 52c80c2..71e8ebd 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -351,7 +351,7 @@ config SGI_IP27
 	select ARC64
 	select BOOT_ELF64
 	select DEFAULT_SGI_PARTITION
-	select DMA_IP27
+	select DMA_COHERENT
 	select SYS_HAS_EARLY_PRINTK
 	select HW_HAS_PCI
 	select NR_CPUS_DEFAULT_64
@@ -761,9 +761,6 @@ config CFE
 config DMA_COHERENT
 	bool
=20
-config DMA_IP27
-	bool
-
 config DMA_NONCOHERENT
 	bool
 	select DMA_NEED_PCI_MAP_STATE
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defc=
onfig
index 34ea319..f2baea3 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -53,7 +53,7 @@ CONFIG_GENERIC_TIME=3Dy
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=3Dy
 CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=3Dy
 CONFIG_ARC=3Dy
-CONFIG_DMA_IP27=3Dy
+CONFIG_DMA_COHERENT=3Dy
 CONFIG_EARLY_PRINTK=3Dy
 CONFIG_SYS_HAS_EARLY_PRINTK=3Dy
 # CONFIG_NO_IOPORT is not set
diff --git a/arch/mips/lib/memcpy-inatomic.S b/arch/mips/lib/memcpy-inatomi=
c.S
index 736d0fb..68853a0 100644
--- a/arch/mips/lib/memcpy-inatomic.S
+++ b/arch/mips/lib/memcpy-inatomic.S
@@ -21,7 +21,7 @@
  * end of memory on some systems.  It's also a seriously bad idea on non
  * dma-coherent systems.
  */
-#if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27)
+#ifdef CONFIG_DMA_NONCOHERENT
 #undef CONFIG_CPU_HAS_PREFETCH
 #endif
 #ifdef CONFIG_MIPS_MALTA
diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S
index c06cccf..56a1f85 100644
--- a/arch/mips/lib/memcpy.S
+++ b/arch/mips/lib/memcpy.S
@@ -21,7 +21,7 @@
  * end of memory on some systems.  It's also a seriously bad idea on non
  * dma-coherent systems.
  */
-#if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27)
+#ifdef CONFIG_DMA_NONCOHERENT
 #undef CONFIG_CPU_HAS_PREFETCH
 #endif
 #ifdef CONFIG_MIPS_MALTA

