diff options
author | Guan Xuetao <gxt@mprc.pku.edu.cn> | 2011-06-12 23:44:49 -0400 |
---|---|---|
committer | Guan Xuetao <gxt@mprc.pku.edu.cn> | 2011-11-15 04:13:14 -0500 |
commit | e13b91c1c47e7be178d2d7914452040ee82c0bd2 (patch) | |
tree | fa4cde596c571eff0db507887165b6a50cefe327 /arch | |
parent | 7f80850d3f9fd8fda23a317044aef3a6bafab06b (diff) |
unicore32: fix build error for find bitops
Remove the __uc32_ prefix in find bitops functions.
Move find_* macros behind asm-generic/bitops.h inclusion.
see commit <19de85ef574c3a2182e3ccad9581805052f14946>
bitops: add #ifndef for each of find bitops
also see commit <63e424c84429903c92a0f1e9654c31ccaf6694d0>
arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT}
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/unicore32/include/asm/bitops.h | 12 | ||||
-rw-r--r-- | arch/unicore32/kernel/ksyms.c | 4 | ||||
-rw-r--r-- | arch/unicore32/lib/findbit.S | 14 |
3 files changed, 16 insertions, 14 deletions
diff --git a/arch/unicore32/include/asm/bitops.h b/arch/unicore32/include/asm/bitops.h index 1628a6328994..401f597bc38c 100644 --- a/arch/unicore32/include/asm/bitops.h +++ b/arch/unicore32/include/asm/bitops.h | |||
@@ -13,12 +13,6 @@ | |||
13 | #ifndef __UNICORE_BITOPS_H__ | 13 | #ifndef __UNICORE_BITOPS_H__ |
14 | #define __UNICORE_BITOPS_H__ | 14 | #define __UNICORE_BITOPS_H__ |
15 | 15 | ||
16 | #define find_next_bit __uc32_find_next_bit | ||
17 | #define find_next_zero_bit __uc32_find_next_zero_bit | ||
18 | |||
19 | #define find_first_bit __uc32_find_first_bit | ||
20 | #define find_first_zero_bit __uc32_find_first_zero_bit | ||
21 | |||
22 | #define _ASM_GENERIC_BITOPS_FLS_H_ | 16 | #define _ASM_GENERIC_BITOPS_FLS_H_ |
23 | #define _ASM_GENERIC_BITOPS___FLS_H_ | 17 | #define _ASM_GENERIC_BITOPS___FLS_H_ |
24 | #define _ASM_GENERIC_BITOPS_FFS_H_ | 18 | #define _ASM_GENERIC_BITOPS_FFS_H_ |
@@ -44,4 +38,10 @@ static inline int fls(int x) | |||
44 | 38 | ||
45 | #include <asm-generic/bitops.h> | 39 | #include <asm-generic/bitops.h> |
46 | 40 | ||
41 | /* following definitions: to avoid using codes in lib/find_*.c */ | ||
42 | #define find_next_bit find_next_bit | ||
43 | #define find_next_zero_bit find_next_zero_bit | ||
44 | #define find_first_bit find_first_bit | ||
45 | #define find_first_zero_bit find_first_zero_bit | ||
46 | |||
47 | #endif /* __UNICORE_BITOPS_H__ */ | 47 | #endif /* __UNICORE_BITOPS_H__ */ |
diff --git a/arch/unicore32/kernel/ksyms.c b/arch/unicore32/kernel/ksyms.c index a8970809428a..d98bd812cae1 100644 --- a/arch/unicore32/kernel/ksyms.c +++ b/arch/unicore32/kernel/ksyms.c | |||
@@ -24,8 +24,8 @@ | |||
24 | 24 | ||
25 | #include "ksyms.h" | 25 | #include "ksyms.h" |
26 | 26 | ||
27 | EXPORT_SYMBOL(__uc32_find_next_zero_bit); | 27 | EXPORT_SYMBOL(find_next_zero_bit); |
28 | EXPORT_SYMBOL(__uc32_find_next_bit); | 28 | EXPORT_SYMBOL(find_next_bit); |
29 | 29 | ||
30 | EXPORT_SYMBOL(__backtrace); | 30 | EXPORT_SYMBOL(__backtrace); |
31 | 31 | ||
diff --git a/arch/unicore32/lib/findbit.S b/arch/unicore32/lib/findbit.S index c360ce905d8b..c77746247d36 100644 --- a/arch/unicore32/lib/findbit.S +++ b/arch/unicore32/lib/findbit.S | |||
@@ -17,7 +17,7 @@ | |||
17 | * Purpose : Find a 'zero' bit | 17 | * Purpose : Find a 'zero' bit |
18 | * Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit); | 18 | * Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit); |
19 | */ | 19 | */ |
20 | __uc32_find_first_zero_bit: | 20 | ENTRY(find_first_zero_bit) |
21 | cxor.a r1, #0 | 21 | cxor.a r1, #0 |
22 | beq 3f | 22 | beq 3f |
23 | mov r2, #0 | 23 | mov r2, #0 |
@@ -29,13 +29,14 @@ __uc32_find_first_zero_bit: | |||
29 | bub 1b | 29 | bub 1b |
30 | 3: mov r0, r1 @ no free bits | 30 | 3: mov r0, r1 @ no free bits |
31 | mov pc, lr | 31 | mov pc, lr |
32 | ENDPROC(find_first_zero_bit) | ||
32 | 33 | ||
33 | /* | 34 | /* |
34 | * Purpose : Find next 'zero' bit | 35 | * Purpose : Find next 'zero' bit |
35 | * Prototype: int find_next_zero_bit | 36 | * Prototype: int find_next_zero_bit |
36 | * (void *addr, unsigned int maxbit, int offset) | 37 | * (void *addr, unsigned int maxbit, int offset) |
37 | */ | 38 | */ |
38 | ENTRY(__uc32_find_next_zero_bit) | 39 | ENTRY(find_next_zero_bit) |
39 | cxor.a r1, #0 | 40 | cxor.a r1, #0 |
40 | beq 3b | 41 | beq 3b |
41 | and.a ip, r2, #7 | 42 | and.a ip, r2, #7 |
@@ -47,14 +48,14 @@ ENTRY(__uc32_find_next_zero_bit) | |||
47 | or r2, r2, #7 @ if zero, then no bits here | 48 | or r2, r2, #7 @ if zero, then no bits here |
48 | add r2, r2, #1 @ align bit pointer | 49 | add r2, r2, #1 @ align bit pointer |
49 | b 2b @ loop for next bit | 50 | b 2b @ loop for next bit |
50 | ENDPROC(__uc32_find_next_zero_bit) | 51 | ENDPROC(find_next_zero_bit) |
51 | 52 | ||
52 | /* | 53 | /* |
53 | * Purpose : Find a 'one' bit | 54 | * Purpose : Find a 'one' bit |
54 | * Prototype: int find_first_bit | 55 | * Prototype: int find_first_bit |
55 | * (const unsigned long *addr, unsigned int maxbit); | 56 | * (const unsigned long *addr, unsigned int maxbit); |
56 | */ | 57 | */ |
57 | __uc32_find_first_bit: | 58 | ENTRY(find_first_bit) |
58 | cxor.a r1, #0 | 59 | cxor.a r1, #0 |
59 | beq 3f | 60 | beq 3f |
60 | mov r2, #0 | 61 | mov r2, #0 |
@@ -66,13 +67,14 @@ __uc32_find_first_bit: | |||
66 | bub 1b | 67 | bub 1b |
67 | 3: mov r0, r1 @ no free bits | 68 | 3: mov r0, r1 @ no free bits |
68 | mov pc, lr | 69 | mov pc, lr |
70 | ENDPROC(find_first_bit) | ||
69 | 71 | ||
70 | /* | 72 | /* |
71 | * Purpose : Find next 'one' bit | 73 | * Purpose : Find next 'one' bit |
72 | * Prototype: int find_next_zero_bit | 74 | * Prototype: int find_next_zero_bit |
73 | * (void *addr, unsigned int maxbit, int offset) | 75 | * (void *addr, unsigned int maxbit, int offset) |
74 | */ | 76 | */ |
75 | ENTRY(__uc32_find_next_bit) | 77 | ENTRY(find_next_bit) |
76 | cxor.a r1, #0 | 78 | cxor.a r1, #0 |
77 | beq 3b | 79 | beq 3b |
78 | and.a ip, r2, #7 | 80 | and.a ip, r2, #7 |
@@ -83,7 +85,7 @@ ENTRY(__uc32_find_next_bit) | |||
83 | or r2, r2, #7 @ if zero, then no bits here | 85 | or r2, r2, #7 @ if zero, then no bits here |
84 | add r2, r2, #1 @ align bit pointer | 86 | add r2, r2, #1 @ align bit pointer |
85 | b 2b @ loop for next bit | 87 | b 2b @ loop for next bit |
86 | ENDPROC(__uc32_find_next_bit) | 88 | ENDPROC(find_next_bit) |
87 | 89 | ||
88 | /* | 90 | /* |
89 | * One or more bits in the LSB of r3 are assumed to be set. | 91 | * One or more bits in the LSB of r3 are assumed to be set. |