diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2009-01-13 22:31:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-14 22:56:49 -0500 |
commit | aa0effbd1c0269ce7dd13be8dbf13e6b04f30ebd (patch) | |
tree | a58e482f511aa2c79a3ca9d3025ec9ffe55c405e /arch/cris/include/arch-v10 | |
parent | 5bf431fa32c52e7027c4af85c7afc82326fa6d43 (diff) |
cris: introduce asm/swab.h
Adjust the arch overrides to the new names as well.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/cris/include/arch-v10')
-rw-r--r-- | arch/cris/include/arch-v10/arch/swab.h (renamed from arch/cris/include/arch-v10/arch/byteorder.h) | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/cris/include/arch-v10/arch/byteorder.h b/arch/cris/include/arch-v10/arch/swab.h index 255b646b7fa8..e4e847d8a05e 100644 --- a/arch/cris/include/arch-v10/arch/byteorder.h +++ b/arch/cris/include/arch-v10/arch/swab.h | |||
@@ -1,26 +1,30 @@ | |||
1 | #ifndef _CRIS_ARCH_BYTEORDER_H | 1 | #ifndef _CRIS_ARCH_SWAB_H |
2 | #define _CRIS_ARCH_BYTEORDER_H | 2 | #define _CRIS_ARCH_SWAB_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
6 | 6 | ||
7 | #define __SWAB_64_THRU_32__ | ||
8 | |||
7 | /* we just define these two (as we can do the swap in a single | 9 | /* we just define these two (as we can do the swap in a single |
8 | * asm instruction in CRIS) and the arch-independent files will put | 10 | * asm instruction in CRIS) and the arch-independent files will put |
9 | * them together into ntohl etc. | 11 | * them together into ntohl etc. |
10 | */ | 12 | */ |
11 | 13 | ||
12 | static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) | 14 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) |
13 | { | 15 | { |
14 | __asm__ ("swapwb %0" : "=r" (x) : "0" (x)); | 16 | __asm__ ("swapwb %0" : "=r" (x) : "0" (x)); |
15 | 17 | ||
16 | return(x); | 18 | return(x); |
17 | } | 19 | } |
20 | #define __arch_swab32 __arch_swab32 | ||
18 | 21 | ||
19 | static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) | 22 | static inline __attribute_const__ __u16 __arch_swab16(__u16 x) |
20 | { | 23 | { |
21 | __asm__ ("swapb %0" : "=r" (x) : "0" (x)); | 24 | __asm__ ("swapb %0" : "=r" (x) : "0" (x)); |
22 | 25 | ||
23 | return(x); | 26 | return(x); |
24 | } | 27 | } |
28 | #define __arch_swab16 __arch_swab16 | ||
25 | 29 | ||
26 | #endif | 30 | #endif |