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-v32 | |
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-v32')
-rw-r--r-- | arch/cris/include/arch-v32/arch/byteorder.h | 20 | ||||
-rw-r--r-- | arch/cris/include/arch-v32/arch/swab.h | 24 |
2 files changed, 24 insertions, 20 deletions
diff --git a/arch/cris/include/arch-v32/arch/byteorder.h b/arch/cris/include/arch-v32/arch/byteorder.h deleted file mode 100644 index 6ef8fb4a35f2..000000000000 --- a/arch/cris/include/arch-v32/arch/byteorder.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef _ASM_CRIS_ARCH_BYTEORDER_H | ||
2 | #define _ASM_CRIS_ARCH_BYTEORDER_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | |||
6 | static inline __const__ __u32 | ||
7 | ___arch__swab32(__u32 x) | ||
8 | { | ||
9 | __asm__ __volatile__ ("swapwb %0" : "=r" (x) : "0" (x)); | ||
10 | return (x); | ||
11 | } | ||
12 | |||
13 | static inline __const__ __u16 | ||
14 | ___arch__swab16(__u16 x) | ||
15 | { | ||
16 | __asm__ __volatile__ ("swapb %0" : "=r" (x) : "0" (x)); | ||
17 | return (x); | ||
18 | } | ||
19 | |||
20 | #endif /* _ASM_CRIS_ARCH_BYTEORDER_H */ | ||
diff --git a/arch/cris/include/arch-v32/arch/swab.h b/arch/cris/include/arch-v32/arch/swab.h new file mode 100644 index 000000000000..9a4ea5e209c2 --- /dev/null +++ b/arch/cris/include/arch-v32/arch/swab.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #ifndef _ASM_CRIS_ARCH_SWAB_H | ||
2 | #define _ASM_CRIS_ARCH_SWAB_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | |||
6 | #define __SWAB_64_THRU_32__ | ||
7 | |||
8 | static inline __const__ __u32 | ||
9 | __arch_swab32(__u32 x) | ||
10 | { | ||
11 | __asm__ __volatile__ ("swapwb %0" : "=r" (x) : "0" (x)); | ||
12 | return (x); | ||
13 | } | ||
14 | #define __arch_swab32 __arch_swab32 | ||
15 | |||
16 | static inline __const__ __u16 | ||
17 | __arch_swab16(__u16 x) | ||
18 | { | ||
19 | __asm__ __volatile__ ("swapb %0" : "=r" (x) : "0" (x)); | ||
20 | return (x); | ||
21 | } | ||
22 | #define __arch_swab16 __arch_swab16 | ||
23 | |||
24 | #endif /* _ASM_CRIS_ARCH_SWAB_H */ | ||