aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/arch-v10/kernel/entry.S2
-rw-r--r--arch/cris/arch-v32/kernel/entry.S2
-rw-r--r--arch/cris/include/arch-v10/arch/swab.h (renamed from arch/cris/include/arch-v10/arch/byteorder.h)16
-rw-r--r--arch/cris/include/arch-v32/arch/byteorder.h20
-rw-r--r--arch/cris/include/arch-v32/arch/swab.h24
-rw-r--r--arch/cris/include/asm/byteorder.h19
-rw-r--r--arch/cris/include/asm/swab.h8
7 files changed, 44 insertions, 47 deletions
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S
index ed171d389e65..72f5cd319b97 100644
--- a/arch/cris/arch-v10/kernel/entry.S
+++ b/arch/cris/arch-v10/kernel/entry.S
@@ -691,7 +691,7 @@ sys_call_table:
691 .long sys_uselib 691 .long sys_uselib
692 .long sys_swapon 692 .long sys_swapon
693 .long sys_reboot 693 .long sys_reboot
694 .long old_readdir 694 .long sys_old_readdir
695 .long old_mmap /* 90 */ 695 .long old_mmap /* 90 */
696 .long sys_munmap 696 .long sys_munmap
697 .long sys_truncate 697 .long sys_truncate
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S
index 7f6f93e6b70e..5e674c8f7c51 100644
--- a/arch/cris/arch-v32/kernel/entry.S
+++ b/arch/cris/arch-v32/kernel/entry.S
@@ -614,7 +614,7 @@ sys_call_table:
614 .long sys_uselib 614 .long sys_uselib
615 .long sys_swapon 615 .long sys_swapon
616 .long sys_reboot 616 .long sys_reboot
617 .long old_readdir 617 .long sys_old_readdir
618 .long old_mmap /* 90 */ 618 .long old_mmap /* 90 */
619 .long sys_munmap 619 .long sys_munmap
620 .long sys_truncate 620 .long sys_truncate
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
12static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) 14static 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
19static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) 22static 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
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
6static inline __const__ __u32
7___arch__swab32(__u32 x)
8{
9 __asm__ __volatile__ ("swapwb %0" : "=r" (x) : "0" (x));
10 return (x);
11}
12
13static 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
8static 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
16static 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 */
diff --git a/arch/cris/include/asm/byteorder.h b/arch/cris/include/asm/byteorder.h
index cc8e418cfd14..bcd189798e26 100644
--- a/arch/cris/include/asm/byteorder.h
+++ b/arch/cris/include/asm/byteorder.h
@@ -1,25 +1,6 @@
1#ifndef _CRIS_BYTEORDER_H 1#ifndef _CRIS_BYTEORDER_H
2#define _CRIS_BYTEORDER_H 2#define _CRIS_BYTEORDER_H
3 3
4#ifdef __GNUC__
5
6#ifdef __KERNEL__
7#include <arch/byteorder.h>
8
9/* defines are necessary because the other files detect the presence
10 * of a defined __arch_swab32, not an inline
11 */
12#define __arch__swab32(x) ___arch__swab32(x)
13#define __arch__swab16(x) ___arch__swab16(x)
14#endif /* __KERNEL__ */
15
16#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
17# define __BYTEORDER_HAS_U64__
18# define __SWAB_64_THRU_32__
19#endif
20
21#endif /* __GNUC__ */
22
23#include <linux/byteorder/little_endian.h> 4#include <linux/byteorder/little_endian.h>
24 5
25#endif 6#endif
diff --git a/arch/cris/include/asm/swab.h b/arch/cris/include/asm/swab.h
new file mode 100644
index 000000000000..80668e88419c
--- /dev/null
+++ b/arch/cris/include/asm/swab.h
@@ -0,0 +1,8 @@
1#ifndef _CRIS_SWAB_H
2#define _CRIS_SWAB_H
3
4#ifdef __KERNEL__
5#include <arch/swab.h>
6#endif /* __KERNEL__ */
7
8#endif /* _CRIS_SWAB_H */