aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-frv
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-frv')
-rw-r--r--include/asm-frv/Kbuild1
-rw-r--r--include/asm-frv/atomic.h4
-rw-r--r--include/asm-frv/bitops.h13
-rw-r--r--include/asm-frv/byteorder.h8
-rw-r--r--include/asm-frv/mmu.h1
-rw-r--r--include/asm-frv/swab.h10
6 files changed, 25 insertions, 12 deletions
diff --git a/include/asm-frv/Kbuild b/include/asm-frv/Kbuild
index 0f8956def738..1f44e7c76995 100644
--- a/include/asm-frv/Kbuild
+++ b/include/asm-frv/Kbuild
@@ -3,3 +3,4 @@ include include/asm-generic/Kbuild.asm
3header-y += registers.h 3header-y += registers.h
4 4
5unifdef-y += termios.h 5unifdef-y += termios.h
6unifdef-y += swab.h
diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h
index 46d696b331e7..296c35cfb207 100644
--- a/include/asm-frv/atomic.h
+++ b/include/asm-frv/atomic.h
@@ -35,10 +35,6 @@
35#define smp_mb__before_atomic_inc() barrier() 35#define smp_mb__before_atomic_inc() barrier()
36#define smp_mb__after_atomic_inc() barrier() 36#define smp_mb__after_atomic_inc() barrier()
37 37
38typedef struct {
39 int counter;
40} atomic_t;
41
42#define ATOMIC_INIT(i) { (i) } 38#define ATOMIC_INIT(i) { (i) }
43#define atomic_read(v) ((v)->counter) 39#define atomic_read(v) ((v)->counter)
44#define atomic_set(v, i) (((v)->counter) = (i)) 40#define atomic_set(v, i) (((v)->counter) = (i))
diff --git a/include/asm-frv/bitops.h b/include/asm-frv/bitops.h
index 39456ba0ec17..287f6f697ce2 100644
--- a/include/asm-frv/bitops.h
+++ b/include/asm-frv/bitops.h
@@ -339,6 +339,19 @@ int __ffs(unsigned long x)
339 return 31 - bit; 339 return 31 - bit;
340} 340}
341 341
342/**
343 * __fls - find last (most-significant) set bit in a long word
344 * @word: the word to search
345 *
346 * Undefined if no set bit exists, so code should check against 0 first.
347 */
348static inline unsigned long __fls(unsigned long word)
349{
350 unsigned long bit;
351 asm("scan %1,gr0,%0" : "=r"(bit) : "r"(word));
352 return bit;
353}
354
342/* 355/*
343 * special slimline version of fls() for calculating ilog2_u32() 356 * special slimline version of fls() for calculating ilog2_u32()
344 * - note: no protection against n == 0 357 * - note: no protection against n == 0
diff --git a/include/asm-frv/byteorder.h b/include/asm-frv/byteorder.h
index 411bec3cc1fc..1187e51ecd13 100644
--- a/include/asm-frv/byteorder.h
+++ b/include/asm-frv/byteorder.h
@@ -1,13 +1,7 @@
1#ifndef _ASM_BYTEORDER_H 1#ifndef _ASM_BYTEORDER_H
2#define _ASM_BYTEORDER_H 2#define _ASM_BYTEORDER_H
3 3
4#include <asm/types.h> 4#include <asm/swab.h>
5
6#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
7# define __BYTEORDER_HAS_U64__
8# define __SWAB_64_THRU_32__
9#endif
10
11#include <linux/byteorder/big_endian.h> 5#include <linux/byteorder/big_endian.h>
12 6
13#endif /* _ASM_BYTEORDER_H */ 7#endif /* _ASM_BYTEORDER_H */
diff --git a/include/asm-frv/mmu.h b/include/asm-frv/mmu.h
index 22c03714fb14..86ca0e86e7d2 100644
--- a/include/asm-frv/mmu.h
+++ b/include/asm-frv/mmu.h
@@ -22,7 +22,6 @@ typedef struct {
22 unsigned long dtlb_ptd_mapping; /* [DAMR5] PTD mapping for dtlb cached PGE */ 22 unsigned long dtlb_ptd_mapping; /* [DAMR5] PTD mapping for dtlb cached PGE */
23 23
24#else 24#else
25 struct vm_list_struct *vmlist;
26 unsigned long end_brk; 25 unsigned long end_brk;
27 26
28#endif 27#endif
diff --git a/include/asm-frv/swab.h b/include/asm-frv/swab.h
new file mode 100644
index 000000000000..afb3396ba5ed
--- /dev/null
+++ b/include/asm-frv/swab.h
@@ -0,0 +1,10 @@
1#ifndef _ASM_SWAB_H
2#define _ASM_SWAB_H
3
4#include <asm/types.h>
5
6#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
7# define __SWAB_64_THRU_32__
8#endif
9
10#endif /* _ASM_SWAB_H */