Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172376
b: refs/heads/master
c: 40f5b07
h: refs/heads/master
v: v3
  • Loading branch information
Rabin Vincent authored and Russell King committed Oct 25, 2009
1 parent 4f4540b commit 6875969
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a8cf81ffe0284660fe405e7189f47f1b032f5261
refs/heads/master: 40f5b07832ce29e66f42b61a2e9a1fd94783c136
19 changes: 19 additions & 0 deletions trunk/arch/arm/include/asm/swab.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@
# define __SWAB_64_THRU_32__
#endif

#if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6

static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
{
__asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x));
return x;
}
#define __arch_swab16 __arch_swab16

static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
{
__asm__ ("rev %0, %1" : "=r" (x) : "r" (x));
return x;
}
#define __arch_swab32 __arch_swab32

#else

static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
{
__u32 t;
Expand All @@ -48,3 +66,4 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)

#endif

#endif

0 comments on commit 6875969

Please sign in to comment.