dect
/
linux-2.6
Archived
13
0
Fork 0

MIPS: MIPS64R2: Fix buggy __arch_swab64

The way the code is written it was assuming dshd has the function of a
hypothetical dshw instruction ...

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
David Daney 2008-12-17 13:28:39 -08:00 committed by Ralf Baechle
parent 08d9d1c4d4
commit ed2b03ed3c
1 changed files with 2 additions and 3 deletions

View File

@ -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));