linux-mips
[Top] [All Lists]

[PATCH] MIPS: Fix buggy __arch_swab64

To: linux-mips@linux-mips.org
Subject: [PATCH] MIPS: Fix buggy __arch_swab64
From: David Daney <ddaney@caviumnetworks.com>
Date: Wed, 17 Dec 2008 13:28:39 -0800
Cc: David Daney <ddaney@caviumnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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/byteorder.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(__u32 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"
        : "=r" (x)
        : "r" (x));
 
-- 
1.5.6.5


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] MIPS: Fix buggy __arch_swab64, David Daney <=