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, 17 Dec 2008
 13:30:03 -0800
Received: from dalesmta2-1.messageone.com ([129.41.169.249]) by
 mail.onstor.com with Microsoft SMTPSVC(6.0.3790.3959);	 Wed, 17 Dec 2008
 13:30:02 -0800
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])	by
 dalesmta2-1.messageone.com (8.13.8/8.13.8) with ESMTP id mBHLU0pJ025973	for
 <andy.sharp@onstor.com>; Wed, 17 Dec 2008 15:30:01 -0600
Received: from localhost.localdomain ([127.0.0.1]:61655 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S24207989AbYLQV3f
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Wed, 17 Dec 2008 21:29:35 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 17 Dec 2008 21:29:18
 +0000 (GMT)
Received: from mail3.caviumnetworks.com ([12.108.191.235]:50633 "EHLO
	mail3.caviumnetworks.com") by ftp.linux-mips.org with ESMTP	id
 S24207982AbYLQV2v (ORCPT <rfc822;linux-mips@linux-mips.org>);	Wed, 17 Dec
 2008 21:28:51 +0000
Received: from exch4.caveonetworks.com (Not Verified[192.168.16.23]) by
 mail3.caviumnetworks.com with MailMarshal (v6,2,2,3503)	id <B49496f0d0003>;
 Wed, 17 Dec 2008 16:28:45 -0500
Received: from exch4.caveonetworks.com ([192.168.16.23]) by
 exch4.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.3959);	 Wed, 17 Dec
 2008 13:28:42 -0800
Received: from dd1.caveonetworks.com ([64.169.86.201]) by
 exch4.caveonetworks.com over TLS secured channel with Microsoft
 SMTPSVC(6.0.3790.3959);	 Wed, 17 Dec 2008 13:28:42 -0800
Received: from dd1.caveonetworks.com (localhost.localdomain [127.0.0.1])	by
 dd1.caveonetworks.com (8.14.2/8.14.2) with ESMTP id mBHLSeWY024909;	Wed, 17
 Dec 2008 13:28:40 -0800
Received: (from ddaney@localhost)	by dd1.caveonetworks.com
 (8.14.2/8.14.2/Submit) id mBHLSdKk024907;	Wed, 17 Dec 2008 13:28:39 -0800
From: David Daney <ddaney@caviumnetworks.com>
To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
CC: David Daney <ddaney@caviumnetworks.com>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Wed, 17 Dec 2008 13:28:39 -0800
Subject: [PATCH] MIPS: Fix buggy __arch_swab64
Thread-Topic: [PATCH] MIPS: Fix buggy __arch_swab64
Thread-Index: Aclgjp+e1uKFrgK3TpyBxLK5EsNB2g==
Message-ID: <1229549319-24884-1-git-send-email-ddaney@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: 17 Dec 2008 21:28:42.0508 (UTC)
 FILETIME=[6F4364C0:01C9608E]
errors-to: linux-mips-bounce@linux-mips.org
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: RKDphm78W2kJKrXsagBGxw==
x-messageone-virus-version: vendor=fsecure
 engine=4.65.7400:2.4.4,1.2.40,4.0.164
 definitions=2008-12-17_15:2008-12-17,2008-12-17,2008-12-17 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-0812170113
x-messageone-spam-score: 0
x-messageone-spam-bar:
x-list: linux-mips
x-archive-position: 21613
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

The implementation of __arch_swab64 is incorrect.  The drotr should
not be there, so I removed it.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/include/asm/byteorder.h |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/byteorder.h b/arch/mips/include/asm/byte=
order.h
index 2988d29..33790b9 100644
--- a/arch/mips/include/asm/byteorder.h
+++ b/arch/mips/include/asm/byteorder.h
@@ -50,9 +50,8 @@ static inline __attribute_const__ __u32 __arch_swab32(__u=
32 x)
 static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
 {
 	__asm__(
-	"	dsbh	%0, %1			\n"
-	"	dshd	%0, %0			\n"
-	"	drotr	%0, %0, 32		\n"
+	"	dsbh	%0, %1\n"
+	"	dshd	%0, %0"
 	: "=3Dr" (x)
 	: "r" (x));
=20
--=20
1.5.6.5


