Skip to content

Commit

Permalink
MIPS: MIPS64R2: Fix buggy __arch_swab64
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Daney authored and ralfbaechle committed Dec 22, 2008
1 parent 08d9d1c commit ed2b03e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/mips/include/asm/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit ed2b03e

Please sign in to comment.