diff options
Diffstat (limited to 'arch/blackfin/include')
64 files changed, 459 insertions, 1787 deletions
diff --git a/arch/blackfin/include/asm/atomic.h b/arch/blackfin/include/asm/atomic.h index b1d92f13ef9..88f36d599fe 100644 --- a/arch/blackfin/include/asm/atomic.h +++ b/arch/blackfin/include/asm/atomic.h | |||
@@ -1,24 +1,21 @@ | |||
1 | #ifndef __ARCH_BLACKFIN_ATOMIC__ | 1 | #ifndef __ARCH_BLACKFIN_ATOMIC__ |
2 | #define __ARCH_BLACKFIN_ATOMIC__ | 2 | #define __ARCH_BLACKFIN_ATOMIC__ |
3 | 3 | ||
4 | #ifndef CONFIG_SMP | ||
5 | # include <asm-generic/atomic.h> | ||
6 | #else | ||
7 | |||
4 | #include <linux/types.h> | 8 | #include <linux/types.h> |
5 | #include <asm/system.h> /* local_irq_XXX() */ | 9 | #include <asm/system.h> /* local_irq_XXX() */ |
6 | 10 | ||
7 | /* | 11 | /* |
8 | * Atomic operations that C can't guarantee us. Useful for | 12 | * Atomic operations that C can't guarantee us. Useful for |
9 | * resource counting etc.. | 13 | * resource counting etc.. |
10 | * | ||
11 | * Generally we do not concern about SMP BFIN systems, so we don't have | ||
12 | * to deal with that. | ||
13 | * | ||
14 | * Tony Kou (tonyko@lineo.ca) Lineo Inc. 2001 | ||
15 | */ | 14 | */ |
16 | 15 | ||
17 | #define ATOMIC_INIT(i) { (i) } | 16 | #define ATOMIC_INIT(i) { (i) } |
18 | #define atomic_set(v, i) (((v)->counter) = i) | 17 | #define atomic_set(v, i) (((v)->counter) = i) |
19 | 18 | ||
20 | #ifdef CONFIG_SMP | ||
21 | |||
22 | #define atomic_read(v) __raw_uncached_fetch_asm(&(v)->counter) | 19 | #define atomic_read(v) __raw_uncached_fetch_asm(&(v)->counter) |
23 | 20 | ||
24 | asmlinkage int __raw_uncached_fetch_asm(const volatile int *ptr); | 21 | asmlinkage int __raw_uncached_fetch_asm(const volatile int *ptr); |
@@ -84,100 +81,6 @@ static inline int atomic_test_mask(int mask, atomic_t *v) | |||
84 | #define smp_mb__before_atomic_inc() barrier() | 81 | #define smp_mb__before_atomic_inc() barrier() |
85 | #define smp_mb__after_atomic_inc() barrier() | 82 | #define smp_mb__after_atomic_inc() barrier() |
86 | 83 | ||
87 | #else /* !CONFIG_SMP */ | ||
88 | |||
89 | #define atomic_read(v) ((v)->counter) | ||
90 | |||
91 | static inline void atomic_add(int i, atomic_t *v) | ||
92 | { | ||
93 | unsigned long flags; | ||
94 | |||
95 | local_irq_save_hw(flags); | ||
96 | v->counter += i; | ||
97 | local_irq_restore_hw(flags); | ||
98 | } | ||
99 | |||
100 | static inline void atomic_sub(int i, atomic_t *v) | ||
101 | { | ||
102 | unsigned long flags; | ||
103 | |||
104 | local_irq_save_hw(flags); | ||
105 | v->counter -= i; | ||
106 | local_irq_restore_hw(flags); | ||
107 | |||
108 | } | ||
109 | |||
110 | static inline int atomic_add_return(int i, atomic_t *v) | ||
111 | { | ||
112 | int __temp = 0; | ||
113 | unsigned long flags; | ||
114 | |||
115 | local_irq_save_hw(flags); | ||
116 | v->counter += i; | ||
117 | __temp = v->counter; | ||
118 | local_irq_restore_hw(flags); | ||
119 | |||
120 | |||
121 | return __temp; | ||
122 | } | ||
123 | |||
124 | static inline int atomic_sub_return(int i, atomic_t *v) | ||
125 | { | ||
126 | int __temp = 0; | ||
127 | unsigned long flags; | ||
128 | |||
129 | local_irq_save_hw(flags); | ||
130 | v->counter -= i; | ||
131 | __temp = v->counter; | ||
132 | local_irq_restore_hw(flags); | ||
133 | |||
134 | return __temp; | ||
135 | } | ||
136 | |||
137 | static inline void atomic_inc(volatile atomic_t *v) | ||
138 | { | ||
139 | unsigned long flags; | ||
140 | |||
141 | local_irq_save_hw(flags); | ||
142 | v->counter++; | ||
143 | local_irq_restore_hw(flags); | ||
144 | } | ||
145 | |||
146 | static inline void atomic_dec(volatile atomic_t *v) | ||
147 | { | ||
148 | unsigned long flags; | ||
149 | |||
150 | local_irq_save_hw(flags); | ||
151 | v->counter--; | ||
152 | local_irq_restore_hw(flags); | ||
153 | } | ||
154 | |||
155 | static inline void atomic_clear_mask(unsigned int mask, atomic_t *v) | ||
156 | { | ||
157 | unsigned long flags; | ||
158 | |||
159 | local_irq_save_hw(flags); | ||
160 | v->counter &= ~mask; | ||
161 | local_irq_restore_hw(flags); | ||
162 | } | ||
163 | |||
164 | static inline void atomic_set_mask(unsigned int mask, atomic_t *v) | ||
165 | { | ||
166 | unsigned long flags; | ||
167 | |||
168 | local_irq_save_hw(flags); | ||
169 | v->counter |= mask; | ||
170 | local_irq_restore_hw(flags); | ||
171 | } | ||
172 | |||
173 | /* Atomic operations are already serializing */ | ||
174 | #define smp_mb__before_atomic_dec() barrier() | ||
175 | #define smp_mb__after_atomic_dec() barrier() | ||
176 | #define smp_mb__before_atomic_inc() barrier() | ||
177 | #define smp_mb__after_atomic_inc() barrier() | ||
178 | |||
179 | #endif /* !CONFIG_SMP */ | ||
180 | |||
181 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | 84 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) |
182 | #define atomic_dec_return(v) atomic_sub_return(1,(v)) | 85 | #define atomic_dec_return(v) atomic_sub_return(1,(v)) |
183 | #define atomic_inc_return(v) atomic_add_return(1,(v)) | 86 | #define atomic_inc_return(v) atomic_add_return(1,(v)) |
@@ -210,4 +113,6 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v) | |||
210 | 113 | ||
211 | #include <asm-generic/atomic-long.h> | 114 | #include <asm-generic/atomic-long.h> |
212 | 115 | ||
213 | #endif /* __ARCH_BLACKFIN_ATOMIC __ */ | 116 | #endif |
117 | |||
118 | #endif | ||
diff --git a/arch/blackfin/include/asm/auxvec.h b/arch/blackfin/include/asm/auxvec.h index 215506cd87b..41fa68b7128 100644 --- a/arch/blackfin/include/asm/auxvec.h +++ b/arch/blackfin/include/asm/auxvec.h | |||
@@ -1,4 +1 @@ | |||
1 | #ifndef __ASMBFIN_AUXVEC_H | #include <asm-generic/auxvec.h> | |
2 | #define __ASMBFIN_AUXVEC_H | ||
3 | |||
4 | #endif | ||
diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h index 75fee2f7d9f..daffa71576d 100644 --- a/arch/blackfin/include/asm/bitops.h +++ b/arch/blackfin/include/asm/bitops.h | |||
@@ -1,26 +1,22 @@ | |||
1 | #ifndef _BLACKFIN_BITOPS_H | 1 | #ifndef _BLACKFIN_BITOPS_H |
2 | #define _BLACKFIN_BITOPS_H | 2 | #define _BLACKFIN_BITOPS_H |
3 | 3 | ||
4 | /* | 4 | #ifndef CONFIG_SMP |
5 | * Copyright 1992, Linus Torvalds. | 5 | # include <asm-generic/bitops.h> |
6 | */ | 6 | #else |
7 | |||
8 | #include <linux/compiler.h> | ||
9 | #include <asm/byteorder.h> /* swab32 */ | ||
10 | |||
11 | #ifdef __KERNEL__ | ||
12 | 7 | ||
13 | #ifndef _LINUX_BITOPS_H | 8 | #ifndef _LINUX_BITOPS_H |
14 | #error only <linux/bitops.h> can be included directly | 9 | #error only <linux/bitops.h> can be included directly |
15 | #endif | 10 | #endif |
16 | 11 | ||
12 | #include <linux/compiler.h> | ||
13 | #include <asm/byteorder.h> /* swab32 */ | ||
14 | |||
17 | #include <asm-generic/bitops/ffs.h> | 15 | #include <asm-generic/bitops/ffs.h> |
18 | #include <asm-generic/bitops/__ffs.h> | 16 | #include <asm-generic/bitops/__ffs.h> |
19 | #include <asm-generic/bitops/sched.h> | 17 | #include <asm-generic/bitops/sched.h> |
20 | #include <asm-generic/bitops/ffz.h> | 18 | #include <asm-generic/bitops/ffz.h> |
21 | 19 | ||
22 | #ifdef CONFIG_SMP | ||
23 | |||
24 | #include <linux/linkage.h> | 20 | #include <linux/linkage.h> |
25 | 21 | ||
26 | asmlinkage int __raw_bit_set_asm(volatile unsigned long *addr, int nr); | 22 | asmlinkage int __raw_bit_set_asm(volatile unsigned long *addr, int nr); |
@@ -79,189 +75,13 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) | |||
79 | return __raw_bit_test_toggle_asm(a, nr & 0x1f); | 75 | return __raw_bit_test_toggle_asm(a, nr & 0x1f); |
80 | } | 76 | } |
81 | 77 | ||
82 | #else /* !CONFIG_SMP */ | ||
83 | |||
84 | #include <asm/system.h> /* save_flags */ | ||
85 | |||
86 | static inline void set_bit(int nr, volatile unsigned long *addr) | ||
87 | { | ||
88 | int *a = (int *)addr; | ||
89 | int mask; | ||
90 | unsigned long flags; | ||
91 | a += nr >> 5; | ||
92 | mask = 1 << (nr & 0x1f); | ||
93 | local_irq_save_hw(flags); | ||
94 | *a |= mask; | ||
95 | local_irq_restore_hw(flags); | ||
96 | } | ||
97 | |||
98 | static inline void clear_bit(int nr, volatile unsigned long *addr) | ||
99 | { | ||
100 | int *a = (int *)addr; | ||
101 | int mask; | ||
102 | unsigned long flags; | ||
103 | a += nr >> 5; | ||
104 | mask = 1 << (nr & 0x1f); | ||
105 | local_irq_save_hw(flags); | ||
106 | *a &= ~mask; | ||
107 | local_irq_restore_hw(flags); | ||
108 | } | ||
109 | |||
110 | static inline void change_bit(int nr, volatile unsigned long *addr) | ||
111 | { | ||
112 | int mask; | ||
113 | unsigned long flags; | ||
114 | unsigned long *ADDR = (unsigned long *)addr; | ||
115 | |||
116 | ADDR += nr >> 5; | ||
117 | mask = 1 << (nr & 31); | ||
118 | local_irq_save_hw(flags); | ||
119 | *ADDR ^= mask; | ||
120 | local_irq_restore_hw(flags); | ||
121 | } | ||
122 | |||
123 | static inline int test_and_set_bit(int nr, volatile unsigned long *addr) | ||
124 | { | ||
125 | int mask, retval; | ||
126 | volatile unsigned int *a = (volatile unsigned int *)addr; | ||
127 | unsigned long flags; | ||
128 | |||
129 | a += nr >> 5; | ||
130 | mask = 1 << (nr & 0x1f); | ||
131 | local_irq_save_hw(flags); | ||
132 | retval = (mask & *a) != 0; | ||
133 | *a |= mask; | ||
134 | local_irq_restore_hw(flags); | ||
135 | |||
136 | return retval; | ||
137 | } | ||
138 | |||
139 | static inline int test_and_clear_bit(int nr, volatile unsigned long *addr) | ||
140 | { | ||
141 | int mask, retval; | ||
142 | volatile unsigned int *a = (volatile unsigned int *)addr; | ||
143 | unsigned long flags; | ||
144 | |||
145 | a += nr >> 5; | ||
146 | mask = 1 << (nr & 0x1f); | ||
147 | local_irq_save_hw(flags); | ||
148 | retval = (mask & *a) != 0; | ||
149 | *a &= ~mask; | ||
150 | local_irq_restore_hw(flags); | ||
151 | |||
152 | return retval; | ||
153 | } | ||
154 | |||
155 | static inline int test_and_change_bit(int nr, volatile unsigned long *addr) | ||
156 | { | ||
157 | int mask, retval; | ||
158 | volatile unsigned int *a = (volatile unsigned int *)addr; | ||
159 | unsigned long flags; | ||
160 | |||
161 | a += nr >> 5; | ||
162 | mask = 1 << (nr & 0x1f); | ||
163 | local_irq_save_hw(flags); | ||
164 | retval = (mask & *a) != 0; | ||
165 | *a ^= mask; | ||
166 | local_irq_restore_hw(flags); | ||
167 | return retval; | ||
168 | } | ||
169 | |||
170 | #endif /* CONFIG_SMP */ | ||
171 | |||
172 | /* | 78 | /* |
173 | * clear_bit() doesn't provide any barrier for the compiler. | 79 | * clear_bit() doesn't provide any barrier for the compiler. |
174 | */ | 80 | */ |
175 | #define smp_mb__before_clear_bit() barrier() | 81 | #define smp_mb__before_clear_bit() barrier() |
176 | #define smp_mb__after_clear_bit() barrier() | 82 | #define smp_mb__after_clear_bit() barrier() |
177 | 83 | ||
178 | static inline void __set_bit(int nr, volatile unsigned long *addr) | 84 | #include <asm-generic/bitops/non-atomic.h> |
179 | { | ||
180 | int *a = (int *)addr; | ||
181 | int mask; | ||
182 | |||
183 | a += nr >> 5; | ||
184 | mask = 1 << (nr & 0x1f); | ||
185 | *a |= mask; | ||
186 | } | ||
187 | |||
188 | static inline void __clear_bit(int nr, volatile unsigned long *addr) | ||
189 | { | ||
190 | int *a = (int *)addr; | ||
191 | int mask; | ||
192 | |||
193 | a += nr >> 5; | ||
194 | mask = 1 << (nr & 0x1f); | ||
195 | *a &= ~mask; | ||
196 | } | ||
197 | |||
198 | static inline void __change_bit(int nr, volatile unsigned long *addr) | ||
199 | { | ||
200 | int mask; | ||
201 | unsigned long *ADDR = (unsigned long *)addr; | ||
202 | |||
203 | ADDR += nr >> 5; | ||
204 | mask = 1 << (nr & 31); | ||
205 | *ADDR ^= mask; | ||
206 | } | ||
207 | |||
208 | static inline int __test_and_set_bit(int nr, volatile unsigned long *addr) | ||
209 | { | ||
210 | int mask, retval; | ||
211 | volatile unsigned int *a = (volatile unsigned int *)addr; | ||
212 | |||
213 | a += nr >> 5; | ||
214 | mask = 1 << (nr & 0x1f); | ||
215 | retval = (mask & *a) != 0; | ||
216 | *a |= mask; | ||
217 | return retval; | ||
218 | } | ||
219 | |||
220 | static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr) | ||
221 | { | ||
222 | int mask, retval; | ||
223 | volatile unsigned int *a = (volatile unsigned int *)addr; | ||
224 | |||
225 | a += nr >> 5; | ||
226 | mask = 1 << (nr & 0x1f); | ||
227 | retval = (mask & *a) != 0; | ||
228 | *a &= ~mask; | ||
229 | return retval; | ||
230 | } | ||
231 | |||
232 | static inline int __test_and_change_bit(int nr, | ||
233 | volatile unsigned long *addr) | ||
234 | { | ||
235 | int mask, retval; | ||
236 | volatile unsigned int *a = (volatile unsigned int *)addr; | ||
237 | |||
238 | a += nr >> 5; | ||
239 | mask = 1 << (nr & 0x1f); | ||
240 | retval = (mask & *a) != 0; | ||
241 | *a ^= mask; | ||
242 | return retval; | ||
243 | } | ||
244 | |||
245 | static inline int __test_bit(int nr, const void *addr) | ||
246 | { | ||
247 | int *a = (int *)addr; | ||
248 | int mask; | ||
249 | |||
250 | a += nr >> 5; | ||
251 | mask = 1 << (nr & 0x1f); | ||
252 | return ((mask & *a) != 0); | ||
253 | } | ||
254 | |||
255 | #ifndef CONFIG_SMP | ||
256 | /* | ||
257 | * This routine doesn't need irq save and restore ops in UP | ||
258 | * context. | ||
259 | */ | ||
260 | static inline int test_bit(int nr, const void *addr) | ||
261 | { | ||
262 | return __test_bit(nr, addr); | ||
263 | } | ||
264 | #endif | ||
265 | 85 | ||
266 | #include <asm-generic/bitops/find.h> | 86 | #include <asm-generic/bitops/find.h> |
267 | #include <asm-generic/bitops/hweight.h> | 87 | #include <asm-generic/bitops/hweight.h> |
@@ -272,10 +92,10 @@ static inline int test_bit(int nr, const void *addr) | |||
272 | 92 | ||
273 | #include <asm-generic/bitops/minix.h> | 93 | #include <asm-generic/bitops/minix.h> |
274 | 94 | ||
275 | #endif /* __KERNEL__ */ | ||
276 | |||
277 | #include <asm-generic/bitops/fls.h> | 95 | #include <asm-generic/bitops/fls.h> |
278 | #include <asm-generic/bitops/__fls.h> | 96 | #include <asm-generic/bitops/__fls.h> |
279 | #include <asm-generic/bitops/fls64.h> | 97 | #include <asm-generic/bitops/fls64.h> |
280 | 98 | ||
99 | #endif /* CONFIG_SMP */ | ||
100 | |||
281 | #endif /* _BLACKFIN_BITOPS_H */ | 101 | #endif /* _BLACKFIN_BITOPS_H */ |
diff --git a/arch/blackfin/include/asm/blackfin.h b/arch/blackfin/include/asm/blackfin.h index 8bb2cb13975..4d443958339 100644 --- a/arch/blackfin/include/asm/blackfin.h +++ b/arch/blackfin/include/asm/blackfin.h | |||
@@ -86,6 +86,7 @@ static inline void CSYNC(void) | |||
86 | 86 | ||
87 | #endif /* __ASSEMBLY__ */ | 87 | #endif /* __ASSEMBLY__ */ |
88 | 88 | ||
89 | #include <asm/mem_map.h> | ||
89 | #include <mach/blackfin.h> | 90 | #include <mach/blackfin.h> |
90 | #include <asm/bfin-global.h> | 91 | #include <asm/bfin-global.h> |
91 | 92 | ||
diff --git a/arch/blackfin/include/asm/bugs.h b/arch/blackfin/include/asm/bugs.h index 9093c9c1fb8..61791e1ad9f 100644 --- a/arch/blackfin/include/asm/bugs.h +++ b/arch/blackfin/include/asm/bugs.h | |||
@@ -1,16 +1 @@ | |||
1 | /* | #include <asm-generic/bugs.h> | |
2 | * include/asm-blackfin/bugs.h | ||
3 | * | ||
4 | * Copyright (C) 1994 Linus Torvalds | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * This is included by init/main.c to check for architecture-dependent bugs. | ||
9 | * | ||
10 | * Needs: | ||
11 | * void check_bugs(void); | ||
12 | */ | ||
13 | |||
14 | static void check_bugs(void) | ||
15 | { | ||
16 | } | ||
diff --git a/arch/blackfin/include/asm/cache.h b/arch/blackfin/include/asm/cache.h index 2ef669ed922..477050ad5c5 100644 --- a/arch/blackfin/include/asm/cache.h +++ b/arch/blackfin/include/asm/cache.h | |||
@@ -35,10 +35,10 @@ | |||
35 | 35 | ||
36 | #if defined(CONFIG_SMP) && \ | 36 | #if defined(CONFIG_SMP) && \ |
37 | !defined(CONFIG_BFIN_CACHE_COHERENT) | 37 | !defined(CONFIG_BFIN_CACHE_COHERENT) |
38 | # if defined(CONFIG_BFIN_ICACHE) | 38 | # if defined(CONFIG_BFIN_ICACHEABLE) || defined(CONFIG_BFIN_L2_ICACHEABLE) |
39 | # define __ARCH_SYNC_CORE_ICACHE | 39 | # define __ARCH_SYNC_CORE_ICACHE |
40 | # endif | 40 | # endif |
41 | # if defined(CONFIG_BFIN_DCACHE) | 41 | # if defined(CONFIG_BFIN_DCACHEABLE) || defined(CONFIG_BFIN_L2_DCACHEABLE) |
42 | # define __ARCH_SYNC_CORE_DCACHE | 42 | # define __ARCH_SYNC_CORE_DCACHE |
43 | # endif | 43 | # endif |
44 | #ifndef __ASSEMBLY__ | 44 | #ifndef __ASSEMBLY__ |
diff --git a/arch/blackfin/include/asm/cacheflush.h b/arch/blackfin/include/asm/cacheflush.h index 5c17dee53b5..7e55549e180 100644 --- a/arch/blackfin/include/asm/cacheflush.h +++ b/arch/blackfin/include/asm/cacheflush.h | |||
@@ -56,7 +56,7 @@ extern void blackfin_invalidate_entire_icache(void); | |||
56 | 56 | ||
57 | static inline void flush_icache_range(unsigned start, unsigned end) | 57 | static inline void flush_icache_range(unsigned start, unsigned end) |
58 | { | 58 | { |
59 | #if defined(CONFIG_BFIN_WB) | 59 | #if defined(CONFIG_BFIN_EXTMEM_WRITEBACK) || defined(CONFIG_BFIN_L2_WRITEBACK) |
60 | blackfin_dcache_flush_range(start, end); | 60 | blackfin_dcache_flush_range(start, end); |
61 | #endif | 61 | #endif |
62 | 62 | ||
@@ -87,9 +87,9 @@ do { memcpy(dst, src, len); \ | |||
87 | #else | 87 | #else |
88 | # define invalidate_dcache_range(start,end) do { } while (0) | 88 | # define invalidate_dcache_range(start,end) do { } while (0) |
89 | #endif | 89 | #endif |
90 | #if defined(CONFIG_BFIN_DCACHE) && defined(CONFIG_BFIN_WB) | 90 | #if defined(CONFIG_BFIN_EXTMEM_WRITEBACK) || defined(CONFIG_BFIN_L2_WRITEBACK) |
91 | # define flush_dcache_range(start,end) blackfin_dcache_flush_range((start), (end)) | 91 | # define flush_dcache_range(start,end) blackfin_dcache_flush_range((start), (end)) |
92 | # define flush_dcache_page(page) blackfin_dflush_page(page_address(page)) | 92 | # define flush_dcache_page(page) blackfin_dflush_page(page_address(page)) |
93 | #else | 93 | #else |
94 | # define flush_dcache_range(start,end) do { } while (0) | 94 | # define flush_dcache_range(start,end) do { } while (0) |
95 | # define flush_dcache_page(page) do { } while (0) | 95 | # define flush_dcache_page(page) do { } while (0) |
@@ -100,7 +100,7 @@ extern unsigned long reserved_mem_icache_on; | |||
100 | 100 | ||
101 | static inline int bfin_addr_dcacheable(unsigned long addr) | 101 | static inline int bfin_addr_dcacheable(unsigned long addr) |
102 | { | 102 | { |
103 | #ifdef CONFIG_BFIN_DCACHE | 103 | #ifdef CONFIG_BFIN_EXTMEM_DCACHEABLE |
104 | if (addr < (_ramend - DMA_UNCACHED_REGION)) | 104 | if (addr < (_ramend - DMA_UNCACHED_REGION)) |
105 | return 1; | 105 | return 1; |
106 | #endif | 106 | #endif |
@@ -109,7 +109,7 @@ static inline int bfin_addr_dcacheable(unsigned long addr) | |||
109 | addr >= _ramend && addr < physical_mem_end) | 109 | addr >= _ramend && addr < physical_mem_end) |
110 | return 1; | 110 | return 1; |
111 | 111 | ||
112 | #ifndef CONFIG_BFIN_L2_NOT_CACHED | 112 | #ifdef CONFIG_BFIN_L2_DCACHEABLE |
113 | if (addr >= L2_START && addr < L2_START + L2_LENGTH) | 113 | if (addr >= L2_START && addr < L2_START + L2_LENGTH) |
114 | return 1; | 114 | return 1; |
115 | #endif | 115 | #endif |
diff --git a/arch/blackfin/include/asm/cplb.h b/arch/blackfin/include/asm/cplb.h index a75a6a9f094..c5dacf8f8cf 100644 --- a/arch/blackfin/include/asm/cplb.h +++ b/arch/blackfin/include/asm/cplb.h | |||
@@ -37,8 +37,6 @@ | |||
37 | #define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK) | 37 | #define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK) |
38 | #define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID) | 38 | #define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID) |
39 | 39 | ||
40 | /*Use the menuconfig cache policy here - CONFIG_BFIN_WT/CONFIG_BFIN_WB*/ | ||
41 | |||
42 | #if ANOMALY_05000158 | 40 | #if ANOMALY_05000158 |
43 | #define ANOMALY_05000158_WORKAROUND 0x200 | 41 | #define ANOMALY_05000158_WORKAROUND 0x200 |
44 | #else | 42 | #else |
@@ -47,10 +45,12 @@ | |||
47 | 45 | ||
48 | #define CPLB_COMMON (CPLB_DIRTY | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND) | 46 | #define CPLB_COMMON (CPLB_DIRTY | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND) |
49 | 47 | ||
50 | #ifdef CONFIG_BFIN_WB /*Write Back Policy */ | 48 | #ifdef CONFIG_BFIN_EXTMEM_WRITEBACK |
51 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_COMMON) | 49 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_COMMON) |
52 | #else /*Write Through */ | 50 | #elif defined(CONFIG_BFIN_EXTMEM_WRITETHROUGH) |
53 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON) | 51 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON) |
52 | #else | ||
53 | #define SDRAM_DGENERIC (CPLB_COMMON) | ||
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #define SDRAM_DNON_CHBL (CPLB_COMMON) | 56 | #define SDRAM_DNON_CHBL (CPLB_COMMON) |
@@ -61,21 +61,23 @@ | |||
61 | 61 | ||
62 | #ifdef CONFIG_SMP | 62 | #ifdef CONFIG_SMP |
63 | #define L2_ATTR (INITIAL_T | I_CPLB | D_CPLB) | 63 | #define L2_ATTR (INITIAL_T | I_CPLB | D_CPLB) |
64 | #define L2_IMEMORY (CPLB_COMMON) | 64 | #define L2_IMEMORY (CPLB_COMMON | PAGE_SIZE_1MB) |
65 | #define L2_DMEMORY (CPLB_LOCK | CPLB_COMMON) | 65 | #define L2_DMEMORY (CPLB_LOCK | CPLB_COMMON | PAGE_SIZE_1MB) |
66 | 66 | ||
67 | #else | 67 | #else |
68 | #define L2_ATTR (INITIAL_T | SWITCH_T | I_CPLB | D_CPLB) | 68 | #define L2_ATTR (INITIAL_T | SWITCH_T | I_CPLB | D_CPLB) |
69 | #define L2_IMEMORY (SDRAM_IGENERIC) | 69 | # if defined(CONFIG_BFIN_L2_ICACHEABLE) |
70 | 70 | # define L2_IMEMORY (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | PAGE_SIZE_1MB) | |
71 | # if defined(CONFIG_BFIN_L2_WB) | 71 | # else |
72 | # define L2_DMEMORY (CPLB_L1_CHBL | CPLB_COMMON) | 72 | # define L2_IMEMORY ( CPLB_USER_RD | CPLB_VALID | PAGE_SIZE_1MB) |
73 | # elif defined(CONFIG_BFIN_L2_WT) | 73 | # endif |
74 | # define L2_DMEMORY (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON) | 74 | |
75 | # elif defined(CONFIG_BFIN_L2_NOT_CACHED) | 75 | # if defined(CONFIG_BFIN_L2_WRITEBACK) |
76 | # define L2_DMEMORY (CPLB_COMMON) | 76 | # define L2_DMEMORY (CPLB_L1_CHBL | CPLB_COMMON | PAGE_SIZE_1MB) |
77 | # elif defined(CONFIG_BFIN_L2_WRITETHROUGH) | ||
78 | # define L2_DMEMORY (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON | PAGE_SIZE_1MB) | ||
77 | # else | 79 | # else |
78 | # define L2_DMEMORY (0) | 80 | # define L2_DMEMORY (CPLB_COMMON | PAGE_SIZE_1MB) |
79 | # endif | 81 | # endif |
80 | #endif /* CONFIG_SMP */ | 82 | #endif /* CONFIG_SMP */ |
81 | 83 | ||
diff --git a/arch/blackfin/include/asm/cputime.h b/arch/blackfin/include/asm/cputime.h index 2b19705f988..6d68ad7e0ea 100644 --- a/arch/blackfin/include/asm/cputime.h +++ b/arch/blackfin/include/asm/cputime.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef __BLACKFIN_CPUTIME_H | ||
2 | #define __BLACKFIN_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | #include <asm-generic/cputime.h> | |
5 | |||
6 | #endif /* __BLACKFIN_CPUTIME_H */ | ||
diff --git a/arch/blackfin/include/asm/current.h b/arch/blackfin/include/asm/current.h index 31918d29122..4c51401b553 100644 --- a/arch/blackfin/include/asm/current.h +++ b/arch/blackfin/include/asm/current.h | |||
@@ -1,23 +1 @@ | |||
1 | #ifndef _BLACKFIN_CURRENT_H | #include <asm-generic/current.h> | |
2 | #define _BLACKFIN_CURRENT_H | ||
3 | /* | ||
4 | * current.h | ||
5 | * (C) Copyright 2000, Lineo, David McCullough <davidm@lineo.com> | ||
6 | * | ||
7 | * rather than dedicate a register (as the m68k source does), we | ||
8 | * just keep a global, we should probably just change it all to be | ||
9 | * current and lose _current_task. | ||
10 | */ | ||
11 | #include <linux/thread_info.h> | ||
12 | |||
13 | struct task_struct; | ||
14 | |||
15 | static inline struct task_struct *get_current(void) __attribute__ ((__const__)); | ||
16 | static inline struct task_struct *get_current(void) | ||
17 | { | ||
18 | return (current_thread_info()->task); | ||
19 | } | ||
20 | |||
21 | #define current (get_current()) | ||
22 | |||
23 | #endif /* _BLACKFIN_CURRENT_H */ | ||
diff --git a/arch/blackfin/include/asm/device.h b/arch/blackfin/include/asm/device.h index d8f9872b0e2..f0a4c256403 100644 --- a/arch/blackfin/include/asm/device.h +++ b/arch/blackfin/include/asm/device.h | |||
@@ -1,7 +1 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #include <asm-generic/device.h> | #include <asm-generic/device.h> | |
7 | |||
diff --git a/arch/blackfin/include/asm/dma-mapping.h b/arch/blackfin/include/asm/dma-mapping.h index d7d9148e433..ed6b1f3cccc 100644 --- a/arch/blackfin/include/asm/dma-mapping.h +++ b/arch/blackfin/include/asm/dma-mapping.h | |||
@@ -95,4 +95,17 @@ static inline void dma_sync_single_for_device(struct device *dev, | |||
95 | enum dma_data_direction dir) | 95 | enum dma_data_direction dir) |
96 | { | 96 | { |
97 | } | 97 | } |
98 | |||
99 | static inline void dma_sync_sg_for_cpu(struct device *dev, | ||
100 | struct scatterlist *sg, | ||
101 | int nents, enum dma_data_direction dir) | ||
102 | { | ||
103 | } | ||
104 | |||
105 | static inline void dma_sync_sg_for_device(struct device *dev, | ||
106 | struct scatterlist *sg, | ||
107 | int nents, enum dma_data_direction dir) | ||
108 | { | ||
109 | } | ||
110 | |||
98 | #endif /* _BLACKFIN_DMA_MAPPING_H */ | 111 | #endif /* _BLACKFIN_DMA_MAPPING_H */ |
diff --git a/arch/blackfin/include/asm/elf.h b/arch/blackfin/include/asm/elf.h index 230e1605d3f..5a87baf0659 100644 --- a/arch/blackfin/include/asm/elf.h +++ b/arch/blackfin/include/asm/elf.h | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | typedef unsigned long elf_greg_t; | 21 | typedef unsigned long elf_greg_t; |
22 | 22 | ||
23 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | 23 | #define ELF_NGREG 40 /* (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) */ |
24 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 24 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
25 | 25 | ||
26 | typedef struct user_bfinfp_struct elf_fpregset_t; | 26 | typedef struct user_bfinfp_struct elf_fpregset_t; |
diff --git a/arch/blackfin/include/asm/emergency-restart.h b/arch/blackfin/include/asm/emergency-restart.h index 27f6c785d10..3711bd9d50b 100644 --- a/arch/blackfin/include/asm/emergency-restart.h +++ b/arch/blackfin/include/asm/emergency-restart.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | #include <asm-generic/emergency-restart.h> | |
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/arch/blackfin/include/asm/errno.h b/arch/blackfin/include/asm/errno.h index 164e4f39bb5..4c82b503d92 100644 --- a/arch/blackfin/include/asm/errno.h +++ b/arch/blackfin/include/asm/errno.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _BFIN_ERRNO_H | #include <asm-generic/errno.h> | |
2 | #define _BFIN_ERRNO_H | ||
3 | |||
4 | #include<asm-generic/errno.h> | ||
5 | |||
6 | #endif /* _BFIN_ERRNO_H */ | ||
diff --git a/arch/blackfin/include/asm/fb.h b/arch/blackfin/include/asm/fb.h index c7df3803099..3a4988e8df4 100644 --- a/arch/blackfin/include/asm/fb.h +++ b/arch/blackfin/include/asm/fb.h | |||
@@ -1,12 +1 @@ | |||
1 | #ifndef _ASM_FB_H_ | #include <asm-generic/fb.h> | |
2 | #define _ASM_FB_H_ | ||
3 | #include <linux/fb.h> | ||
4 | |||
5 | #define fb_pgprotect(...) do {} while (0) | ||
6 | |||
7 | static inline int fb_is_primary_device(struct fb_info *info) | ||
8 | { | ||
9 | return 0; | ||
10 | } | ||
11 | |||
12 | #endif /* _ASM_FB_H_ */ | ||
diff --git a/arch/blackfin/include/asm/futex.h b/arch/blackfin/include/asm/futex.h index 6a332a9f099..0b745828f42 100644 --- a/arch/blackfin/include/asm/futex.h +++ b/arch/blackfin/include/asm/futex.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _ASM_FUTEX_H | ||
2 | #define _ASM_FUTEX_H | ||
3 | |||
4 | #include <asm-generic/futex.h> | #include <asm-generic/futex.h> | |
5 | |||
6 | #endif | ||
diff --git a/arch/blackfin/include/asm/hardirq.h b/arch/blackfin/include/asm/hardirq.h index 717181a1749..cbd52f86bb9 100644 --- a/arch/blackfin/include/asm/hardirq.h +++ b/arch/blackfin/include/asm/hardirq.h | |||
@@ -1,47 +1,11 @@ | |||
1 | #ifndef __BFIN_HARDIRQ_H | 1 | #ifndef __BFIN_HARDIRQ_H |
2 | #define __BFIN_HARDIRQ_H | 2 | #define __BFIN_HARDIRQ_H |
3 | 3 | ||
4 | #include <linux/cache.h> | ||
5 | #include <linux/threads.h> | ||
6 | #include <asm/irq.h> | ||
7 | |||
8 | typedef struct { | ||
9 | unsigned int __softirq_pending; | ||
10 | unsigned int __syscall_count; | ||
11 | struct task_struct *__ksoftirqd_task; | ||
12 | } ____cacheline_aligned irq_cpustat_t; | ||
13 | |||
14 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | ||
15 | |||
16 | /* | ||
17 | * We put the hardirq and softirq counter into the preemption | ||
18 | * counter. The bitmask has the following meaning: | ||
19 | * | ||
20 | * - bits 0-7 are the preemption count (max preemption depth: 256) | ||
21 | * - bits 8-15 are the softirq count (max # of softirqs: 256) | ||
22 | * - bits 16-23 are the hardirq count (max # of hardirqs: 256) | ||
23 | * | ||
24 | * - ( bit 26 is the PREEMPT_ACTIVE flag. ) | ||
25 | * | ||
26 | * PREEMPT_MASK: 0x000000ff | ||
27 | * HARDIRQ_MASK: 0x0000ff00 | ||
28 | * SOFTIRQ_MASK: 0x00ff0000 | ||
29 | */ | ||
30 | |||
31 | #if NR_IRQS > 256 | ||
32 | #define HARDIRQ_BITS 9 | ||
33 | #else | ||
34 | #define HARDIRQ_BITS 8 | ||
35 | #endif | ||
36 | |||
37 | #ifdef NR_IRQS | ||
38 | # if (1 << HARDIRQ_BITS) < NR_IRQS | ||
39 | # error HARDIRQ_BITS is too low! | ||
40 | # endif | ||
41 | #endif | ||
42 | |||
43 | #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 | 4 | #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 |
44 | 5 | ||
45 | extern void ack_bad_irq(unsigned int irq); | 6 | extern void ack_bad_irq(unsigned int irq); |
7 | #define ack_bad_irq ack_bad_irq | ||
8 | |||
9 | #include <asm-generic/hardirq.h> | ||
46 | 10 | ||
47 | #endif | 11 | #endif |
diff --git a/arch/blackfin/include/asm/hw_irq.h b/arch/blackfin/include/asm/hw_irq.h index 5b51eaec012..1f5ef7da004 100644 --- a/arch/blackfin/include/asm/hw_irq.h +++ b/arch/blackfin/include/asm/hw_irq.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef __ASM_BFIN_HW_IRQ_H | #include <asm-generic/hw_irq.h> | |
2 | #define __ASM_BFIN_HW_IRQ_H | ||
3 | |||
4 | /* Dummy include. */ | ||
5 | |||
6 | #endif | ||
diff --git a/arch/blackfin/include/asm/io.h b/arch/blackfin/include/asm/io.h index 3022b5c96b3..37053eca200 100644 --- a/arch/blackfin/include/asm/io.h +++ b/arch/blackfin/include/asm/io.h | |||
@@ -222,7 +222,6 @@ extern void blkfin_inv_cache_all(void); | |||
222 | #define ioport_unmap(addr) | 222 | #define ioport_unmap(addr) |
223 | 223 | ||
224 | /* Pages to physical address... */ | 224 | /* Pages to physical address... */ |
225 | #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) | ||
226 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) | 225 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) |
227 | 226 | ||
228 | #define phys_to_virt(vaddr) ((void *) (vaddr)) | 227 | #define phys_to_virt(vaddr) ((void *) (vaddr)) |
diff --git a/arch/blackfin/include/asm/ioctls.h b/arch/blackfin/include/asm/ioctls.h index 895e3173165..eca8d75b0a8 100644 --- a/arch/blackfin/include/asm/ioctls.h +++ b/arch/blackfin/include/asm/ioctls.h | |||
@@ -1,87 +1,7 @@ | |||
1 | #ifndef __ARCH_BFIN_IOCTLS_H__ | 1 | #ifndef __ARCH_BFIN_IOCTLS_H__ |
2 | #define __ARCH_BFIN_IOCTLS_H__ | 2 | #define __ARCH_BFIN_IOCTLS_H__ |
3 | 3 | ||
4 | #include <asm/ioctl.h> | ||
5 | |||
6 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | ||
7 | |||
8 | #define TCGETS 0x5401 | ||
9 | #define TCSETS 0x5402 | ||
10 | #define TCSETSW 0x5403 | ||
11 | #define TCSETSF 0x5404 | ||
12 | #define TCGETA 0x5405 | ||
13 | #define TCSETA 0x5406 | ||
14 | #define TCSETAW 0x5407 | ||
15 | #define TCSETAF 0x5408 | ||
16 | #define TCSBRK 0x5409 | ||
17 | #define TCXONC 0x540A | ||
18 | #define TCFLSH 0x540B | ||
19 | #define TIOCEXCL 0x540C | ||
20 | #define TIOCNXCL 0x540D | ||
21 | #define TIOCSCTTY 0x540E | ||
22 | #define TIOCGPGRP 0x540F | ||
23 | #define TIOCSPGRP 0x5410 | ||
24 | #define TIOCOUTQ 0x5411 | ||
25 | #define TIOCSTI 0x5412 | ||
26 | #define TIOCGWINSZ 0x5413 | ||
27 | #define TIOCSWINSZ 0x5414 | ||
28 | #define TIOCMGET 0x5415 | ||
29 | #define TIOCMBIS 0x5416 | ||
30 | #define TIOCMBIC 0x5417 | ||
31 | #define TIOCMSET 0x5418 | ||
32 | #define TIOCGSOFTCAR 0x5419 | ||
33 | #define TIOCSSOFTCAR 0x541A | ||
34 | #define FIONREAD 0x541B | ||
35 | #define TIOCINQ FIONREAD | ||
36 | #define TIOCLINUX 0x541C | ||
37 | #define TIOCCONS 0x541D | ||
38 | #define TIOCGSERIAL 0x541E | ||
39 | #define TIOCSSERIAL 0x541F | ||
40 | #define TIOCPKT 0x5420 | ||
41 | #define FIONBIO 0x5421 | ||
42 | #define TIOCNOTTY 0x5422 | ||
43 | #define TIOCSETD 0x5423 | ||
44 | #define TIOCGETD 0x5424 | ||
45 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
46 | #define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ | ||
47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | ||
48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | ||
49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | ||
50 | #define TCGETS2 _IOR('T', 0x2A, struct termios2) | ||
51 | #define TCSETS2 _IOW('T', 0x2B, struct termios2) | ||
52 | #define TCSETSW2 _IOW('T', 0x2C, struct termios2) | ||
53 | #define TCSETSF2 _IOW('T', 0x2D, struct termios2) | ||
54 | /* Get Pty Number (of pty-mux device) */ | ||
55 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) | ||
56 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ | ||
57 | |||
58 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | ||
59 | #define FIOCLEX 0x5451 | ||
60 | #define FIOASYNC 0x5452 | ||
61 | #define TIOCSERCONFIG 0x5453 | ||
62 | #define TIOCSERGWILD 0x5454 | ||
63 | #define TIOCSERSWILD 0x5455 | ||
64 | #define TIOCGLCKTRMIOS 0x5456 | ||
65 | #define TIOCSLCKTRMIOS 0x5457 | ||
66 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
67 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
68 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
69 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
70 | |||
71 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
72 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
73 | |||
74 | #define FIOQSIZE 0x545E | 4 | #define FIOQSIZE 0x545E |
5 | #include <asm-generic/ioctls.h> | ||
75 | 6 | ||
76 | /* Used for packet mode */ | 7 | #endif |
77 | #define TIOCPKT_DATA 0 | ||
78 | #define TIOCPKT_FLUSHREAD 1 | ||
79 | #define TIOCPKT_FLUSHWRITE 2 | ||
80 | #define TIOCPKT_STOP 4 | ||
81 | #define TIOCPKT_START 8 | ||
82 | #define TIOCPKT_NOSTOP 16 | ||
83 | #define TIOCPKT_DOSTOP 32 | ||
84 | |||
85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
86 | |||
87 | #endif /* __ARCH_BFIN_IOCTLS_H__ */ | ||
diff --git a/arch/blackfin/include/asm/ipcbuf.h b/arch/blackfin/include/asm/ipcbuf.h index 8f0899cdf4d..84c7e51cb6d 100644 --- a/arch/blackfin/include/asm/ipcbuf.h +++ b/arch/blackfin/include/asm/ipcbuf.h | |||
@@ -1,30 +1 @@ | |||
1 | /* Changes origined from m68k version. Lineo Inc. May 2001 */ | #include <asm-generic/ipcbuf.h> | |
2 | |||
3 | #ifndef __BFIN_IPCBUF_H__ | ||
4 | #define __BFIN_IPCBUF_H__ | ||
5 | |||
6 | /* | ||
7 | * The user_ipc_perm structure for m68k architecture. | ||
8 | * Note extra padding because this structure is passed back and forth | ||
9 | * between kernel and user space. | ||
10 | * | ||
11 | * Pad space is left for: | ||
12 | * - 32-bit mode_t and seq | ||
13 | * - 2 miscellaneous 32-bit values | ||
14 | */ | ||
15 | |||
16 | struct ipc64_perm { | ||
17 | __kernel_key_t key; | ||
18 | __kernel_uid32_t uid; | ||
19 | __kernel_gid32_t gid; | ||
20 | __kernel_uid32_t cuid; | ||
21 | __kernel_gid32_t cgid; | ||
22 | __kernel_mode_t mode; | ||
23 | unsigned short __pad1; | ||
24 | unsigned short seq; | ||
25 | unsigned short __pad2; | ||
26 | unsigned long __unused1; | ||
27 | unsigned long __unused2; | ||
28 | }; | ||
29 | |||
30 | #endif /* __BFIN_IPCBUF_H__ */ | ||
diff --git a/arch/blackfin/include/asm/ipipe.h b/arch/blackfin/include/asm/ipipe.h index bbe1c3726b6..87ba9ad399c 100644 --- a/arch/blackfin/include/asm/ipipe.h +++ b/arch/blackfin/include/asm/ipipe.h | |||
@@ -35,9 +35,9 @@ | |||
35 | #include <asm/atomic.h> | 35 | #include <asm/atomic.h> |
36 | #include <asm/traps.h> | 36 | #include <asm/traps.h> |
37 | 37 | ||
38 | #define IPIPE_ARCH_STRING "1.10-00" | 38 | #define IPIPE_ARCH_STRING "1.11-00" |
39 | #define IPIPE_MAJOR_NUMBER 1 | 39 | #define IPIPE_MAJOR_NUMBER 1 |
40 | #define IPIPE_MINOR_NUMBER 10 | 40 | #define IPIPE_MINOR_NUMBER 11 |
41 | #define IPIPE_PATCH_NUMBER 0 | 41 | #define IPIPE_PATCH_NUMBER 0 |
42 | 42 | ||
43 | #ifdef CONFIG_SMP | 43 | #ifdef CONFIG_SMP |
@@ -207,7 +207,7 @@ void ipipe_init_irq_threads(void); | |||
207 | 207 | ||
208 | int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc); | 208 | int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc); |
209 | 209 | ||
210 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 210 | #ifdef CONFIG_TICKSOURCE_CORETMR |
211 | #define IRQ_SYSTMR IRQ_CORETMR | 211 | #define IRQ_SYSTMR IRQ_CORETMR |
212 | #define IRQ_PRIOTMR IRQ_CORETMR | 212 | #define IRQ_PRIOTMR IRQ_CORETMR |
213 | #else | 213 | #else |
@@ -240,8 +240,13 @@ int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc); | |||
240 | #define ipipe_init_irq_threads() do { } while (0) | 240 | #define ipipe_init_irq_threads() do { } while (0) |
241 | #define ipipe_start_irq_thread(irq, desc) 0 | 241 | #define ipipe_start_irq_thread(irq, desc) 0 |
242 | 242 | ||
243 | #ifndef CONFIG_TICKSOURCE_GPTMR0 | ||
243 | #define IRQ_SYSTMR IRQ_CORETMR | 244 | #define IRQ_SYSTMR IRQ_CORETMR |
244 | #define IRQ_PRIOTMR IRQ_CORETMR | 245 | #define IRQ_PRIOTMR IRQ_CORETMR |
246 | #else | ||
247 | #define IRQ_SYSTMR IRQ_TIMER0 | ||
248 | #define IRQ_PRIOTMR CONFIG_IRQ_TIMER0 | ||
249 | #endif | ||
245 | 250 | ||
246 | #define __ipipe_root_tick_p(regs) 1 | 251 | #define __ipipe_root_tick_p(regs) 1 |
247 | 252 | ||
diff --git a/arch/blackfin/include/asm/ipipe_base.h b/arch/blackfin/include/asm/ipipe_base.h index 3e8acbd1a3b..490098f532a 100644 --- a/arch/blackfin/include/asm/ipipe_base.h +++ b/arch/blackfin/include/asm/ipipe_base.h | |||
@@ -51,23 +51,23 @@ | |||
51 | 51 | ||
52 | extern unsigned long __ipipe_root_status; /* Alias to ipipe_root_cpudom_var(status) */ | 52 | extern unsigned long __ipipe_root_status; /* Alias to ipipe_root_cpudom_var(status) */ |
53 | 53 | ||
54 | static inline void __ipipe_stall_root(void) | 54 | #define __ipipe_stall_root() \ |
55 | { | 55 | do { \ |
56 | volatile unsigned long *p = &__ipipe_root_status; | 56 | volatile unsigned long *p = &__ipipe_root_status; \ |
57 | set_bit(0, p); | 57 | set_bit(0, p); \ |
58 | } | 58 | } while (0) |
59 | 59 | ||
60 | static inline unsigned long __ipipe_test_and_stall_root(void) | 60 | #define __ipipe_test_and_stall_root() \ |
61 | { | 61 | ({ \ |
62 | volatile unsigned long *p = &__ipipe_root_status; | 62 | volatile unsigned long *p = &__ipipe_root_status; \ |
63 | return test_and_set_bit(0, p); | 63 | test_and_set_bit(0, p); \ |
64 | } | 64 | }) |
65 | 65 | ||
66 | static inline unsigned long __ipipe_test_root(void) | 66 | #define __ipipe_test_root() \ |
67 | { | 67 | ({ \ |
68 | const unsigned long *p = &__ipipe_root_status; | 68 | const unsigned long *p = &__ipipe_root_status; \ |
69 | return test_bit(0, p); | 69 | test_bit(0, p); \ |
70 | } | 70 | }) |
71 | 71 | ||
72 | #endif /* !__ASSEMBLY__ */ | 72 | #endif /* !__ASSEMBLY__ */ |
73 | 73 | ||
diff --git a/arch/blackfin/include/asm/irq.h b/arch/blackfin/include/asm/irq.h index 400bdd52ce8..42a15f5ce0d 100644 --- a/arch/blackfin/include/asm/irq.h +++ b/arch/blackfin/include/asm/irq.h | |||
@@ -22,13 +22,6 @@ | |||
22 | /* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h> */ | 22 | /* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h> */ |
23 | #include <mach/irq.h> | 23 | #include <mach/irq.h> |
24 | 24 | ||
25 | /* Xenomai IPIPE helpers */ | ||
26 | #define local_irq_restore_hw(x) local_irq_restore(x) | ||
27 | #define local_irq_save_hw(x) local_irq_save(x) | ||
28 | #define local_irq_enable_hw(x) local_irq_enable(x) | ||
29 | #define local_irq_disable_hw(x) local_irq_disable(x) | ||
30 | #define irqs_disabled_hw(x) irqs_disabled(x) | ||
31 | |||
32 | #if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE) | 25 | #if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE) |
33 | # define NOP_PAD_ANOMALY_05000244 "nop; nop;" | 26 | # define NOP_PAD_ANOMALY_05000244 "nop; nop;" |
34 | #else | 27 | #else |
@@ -45,9 +38,6 @@ | |||
45 | : "d" (bfin_irq_flags) \ | 38 | : "d" (bfin_irq_flags) \ |
46 | ) | 39 | ) |
47 | 40 | ||
48 | static inline int irq_canonicalize(int irq) | 41 | #include <asm-generic/irq.h> |
49 | { | ||
50 | return irq; | ||
51 | } | ||
52 | 42 | ||
53 | #endif /* _BFIN_IRQ_H_ */ | 43 | #endif /* _BFIN_IRQ_H_ */ |
diff --git a/arch/blackfin/include/asm/irqflags.h b/arch/blackfin/include/asm/irqflags.h index 139cba4651b..9b19a19d9ae 100644 --- a/arch/blackfin/include/asm/irqflags.h +++ b/arch/blackfin/include/asm/irqflags.h | |||
@@ -31,6 +31,150 @@ static inline unsigned long bfin_cli(void) | |||
31 | return flags; | 31 | return flags; |
32 | } | 32 | } |
33 | 33 | ||
34 | #ifdef CONFIG_IPIPE | ||
35 | |||
36 | #include <linux/ipipe_base.h> | ||
37 | #include <linux/ipipe_trace.h> | ||
38 | |||
39 | #ifdef CONFIG_DEBUG_HWERR | ||
40 | # define bfin_no_irqs 0x3f | ||
41 | #else | ||
42 | # define bfin_no_irqs 0x1f | ||
43 | #endif | ||
44 | |||
45 | #define raw_local_irq_disable() \ | ||
46 | do { \ | ||
47 | ipipe_check_context(ipipe_root_domain); \ | ||
48 | __ipipe_stall_root(); \ | ||
49 | barrier(); \ | ||
50 | } while (0) | ||
51 | |||
52 | static inline void raw_local_irq_enable(void) | ||
53 | { | ||
54 | barrier(); | ||
55 | ipipe_check_context(ipipe_root_domain); | ||
56 | __ipipe_unstall_root(); | ||
57 | } | ||
58 | |||
59 | #define raw_local_save_flags_ptr(x) \ | ||
60 | do { \ | ||
61 | *(x) = __ipipe_test_root() ? bfin_no_irqs : bfin_irq_flags; \ | ||
62 | } while (0) | ||
63 | |||
64 | #define raw_local_save_flags(x) raw_local_save_flags_ptr(&(x)) | ||
65 | |||
66 | #define raw_irqs_disabled_flags(x) ((x) == bfin_no_irqs) | ||
67 | |||
68 | #define raw_local_irq_save_ptr(x) \ | ||
69 | do { \ | ||
70 | *(x) = __ipipe_test_and_stall_root() ? bfin_no_irqs : bfin_irq_flags; \ | ||
71 | barrier(); \ | ||
72 | } while (0) | ||
73 | |||
74 | #define raw_local_irq_save(x) \ | ||
75 | do { \ | ||
76 | ipipe_check_context(ipipe_root_domain); \ | ||
77 | raw_local_irq_save_ptr(&(x)); \ | ||
78 | } while (0) | ||
79 | |||
80 | static inline unsigned long raw_mangle_irq_bits(int virt, unsigned long real) | ||
81 | { | ||
82 | /* | ||
83 | * Merge virtual and real interrupt mask bits into a single | ||
84 | * 32bit word. | ||
85 | */ | ||
86 | return (real & ~(1 << 31)) | ((virt != 0) << 31); | ||
87 | } | ||
88 | |||
89 | static inline int raw_demangle_irq_bits(unsigned long *x) | ||
90 | { | ||
91 | int virt = (*x & (1 << 31)) != 0; | ||
92 | *x &= ~(1L << 31); | ||
93 | return virt; | ||
94 | } | ||
95 | |||
96 | static inline void local_irq_disable_hw_notrace(void) | ||
97 | { | ||
98 | bfin_cli(); | ||
99 | } | ||
100 | |||
101 | static inline void local_irq_enable_hw_notrace(void) | ||
102 | { | ||
103 | bfin_sti(bfin_irq_flags); | ||
104 | } | ||
105 | |||
106 | #define local_save_flags_hw(flags) \ | ||
107 | do { \ | ||
108 | (flags) = bfin_read_IMASK(); \ | ||
109 | } while (0) | ||
110 | |||
111 | #define irqs_disabled_flags_hw(flags) (((flags) & ~0x3f) == 0) | ||
112 | |||
113 | #define irqs_disabled_hw() \ | ||
114 | ({ \ | ||
115 | unsigned long flags; \ | ||
116 | local_save_flags_hw(flags); \ | ||
117 | irqs_disabled_flags_hw(flags); \ | ||
118 | }) | ||
119 | |||
120 | static inline void local_irq_save_ptr_hw(unsigned long *flags) | ||
121 | { | ||
122 | *flags = bfin_cli(); | ||
123 | #ifdef CONFIG_DEBUG_HWERR | ||
124 | bfin_sti(0x3f); | ||
125 | #endif | ||
126 | } | ||
127 | |||
128 | #define local_irq_save_hw_notrace(flags) \ | ||
129 | do { \ | ||
130 | local_irq_save_ptr_hw(&(flags)); \ | ||
131 | } while (0) | ||
132 | |||
133 | static inline void local_irq_restore_hw_notrace(unsigned long flags) | ||
134 | { | ||
135 | if (!irqs_disabled_flags_hw(flags)) | ||
136 | local_irq_enable_hw_notrace(); | ||
137 | } | ||
138 | |||
139 | #ifdef CONFIG_IPIPE_TRACE_IRQSOFF | ||
140 | # define local_irq_disable_hw() \ | ||
141 | do { \ | ||
142 | if (!irqs_disabled_hw()) { \ | ||
143 | local_irq_disable_hw_notrace(); \ | ||
144 | ipipe_trace_begin(0x80000000); \ | ||
145 | } \ | ||
146 | } while (0) | ||
147 | # define local_irq_enable_hw() \ | ||
148 | do { \ | ||
149 | if (irqs_disabled_hw()) { \ | ||
150 | ipipe_trace_end(0x80000000); \ | ||
151 | local_irq_enable_hw_notrace(); \ | ||
152 | } \ | ||
153 | } while (0) | ||
154 | # define local_irq_save_hw(flags) \ | ||
155 | do { \ | ||
156 | local_save_flags_hw(flags); \ | ||
157 | if (!irqs_disabled_flags_hw(flags)) { \ | ||
158 | local_irq_disable_hw_notrace(); \ | ||
159 | ipipe_trace_begin(0x80000001); \ | ||
160 | } \ | ||
161 | } while (0) | ||
162 | # define local_irq_restore_hw(flags) \ | ||
163 | do { \ | ||
164 | if (!irqs_disabled_flags_hw(flags)) { \ | ||
165 | ipipe_trace_end(0x80000001); \ | ||
166 | local_irq_enable_hw_notrace(); \ | ||
167 | } \ | ||
168 | } while (0) | ||
169 | #else /* !CONFIG_IPIPE_TRACE_IRQSOFF */ | ||
170 | # define local_irq_disable_hw() local_irq_disable_hw_notrace() | ||
171 | # define local_irq_enable_hw() local_irq_enable_hw_notrace() | ||
172 | # define local_irq_save_hw(flags) local_irq_save_hw_notrace(flags) | ||
173 | # define local_irq_restore_hw(flags) local_irq_restore_hw_notrace(flags) | ||
174 | #endif /* !CONFIG_IPIPE_TRACE_IRQSOFF */ | ||
175 | |||
176 | #else /* CONFIG_IPIPE */ | ||
177 | |||
34 | static inline void raw_local_irq_disable(void) | 178 | static inline void raw_local_irq_disable(void) |
35 | { | 179 | { |
36 | bfin_cli(); | 180 | bfin_cli(); |
@@ -44,12 +188,6 @@ static inline void raw_local_irq_enable(void) | |||
44 | 188 | ||
45 | #define raw_irqs_disabled_flags(flags) (((flags) & ~0x3f) == 0) | 189 | #define raw_irqs_disabled_flags(flags) (((flags) & ~0x3f) == 0) |
46 | 190 | ||
47 | static inline void raw_local_irq_restore(unsigned long flags) | ||
48 | { | ||
49 | if (!raw_irqs_disabled_flags(flags)) | ||
50 | raw_local_irq_enable(); | ||
51 | } | ||
52 | |||
53 | static inline unsigned long __raw_local_irq_save(void) | 191 | static inline unsigned long __raw_local_irq_save(void) |
54 | { | 192 | { |
55 | unsigned long flags = bfin_cli(); | 193 | unsigned long flags = bfin_cli(); |
@@ -60,4 +198,18 @@ static inline unsigned long __raw_local_irq_save(void) | |||
60 | } | 198 | } |
61 | #define raw_local_irq_save(flags) do { (flags) = __raw_local_irq_save(); } while (0) | 199 | #define raw_local_irq_save(flags) do { (flags) = __raw_local_irq_save(); } while (0) |
62 | 200 | ||
201 | #define local_irq_save_hw(flags) raw_local_irq_save(flags) | ||
202 | #define local_irq_restore_hw(flags) raw_local_irq_restore(flags) | ||
203 | #define local_irq_enable_hw() raw_local_irq_enable() | ||
204 | #define local_irq_disable_hw() raw_local_irq_disable() | ||
205 | #define irqs_disabled_hw() irqs_disabled() | ||
206 | |||
207 | #endif /* !CONFIG_IPIPE */ | ||
208 | |||
209 | static inline void raw_local_irq_restore(unsigned long flags) | ||
210 | { | ||
211 | if (!raw_irqs_disabled_flags(flags)) | ||
212 | raw_local_irq_enable(); | ||
213 | } | ||
214 | |||
63 | #endif | 215 | #endif |
diff --git a/arch/blackfin/include/asm/kmap_types.h b/arch/blackfin/include/asm/kmap_types.h index 0a88622339e..3575c64af42 100644 --- a/arch/blackfin/include/asm/kmap_types.h +++ b/arch/blackfin/include/asm/kmap_types.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _ASM_KMAP_TYPES_H | ||
2 | #define _ASM_KMAP_TYPES_H | ||
3 | |||
4 | #include <asm-generic/kmap_types.h> | #include <asm-generic/kmap_types.h> | |
5 | |||
6 | #endif | ||
diff --git a/arch/blackfin/include/asm/local.h b/arch/blackfin/include/asm/local.h index 75afffbc642..c11c530f74d 100644 --- a/arch/blackfin/include/asm/local.h +++ b/arch/blackfin/include/asm/local.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef __BLACKFIN_LOCAL_H | ||
2 | #define __BLACKFIN_LOCAL_H | ||
3 | |||
4 | #include <asm-generic/local.h> | #include <asm-generic/local.h> | |
5 | |||
6 | #endif /* __BLACKFIN_LOCAL_H */ | ||
diff --git a/arch/blackfin/include/asm/mem_init.h b/arch/blackfin/include/asm/mem_init.h index 61f7487fbf1..4179e329b9c 100644 --- a/arch/blackfin/include/asm/mem_init.h +++ b/arch/blackfin/include/asm/mem_init.h | |||
@@ -59,7 +59,7 @@ | |||
59 | #define SDRAM_tRP TRP_1 | 59 | #define SDRAM_tRP TRP_1 |
60 | #define SDRAM_tRP_num 1 | 60 | #define SDRAM_tRP_num 1 |
61 | #define SDRAM_tRAS TRAS_4 | 61 | #define SDRAM_tRAS TRAS_4 |
62 | #define SDRAM_tRAS_num 3 | 62 | #define SDRAM_tRAS_num 4 |
63 | #define SDRAM_tRCD TRCD_1 | 63 | #define SDRAM_tRCD TRCD_1 |
64 | #define SDRAM_tWR TWR_2 | 64 | #define SDRAM_tWR TWR_2 |
65 | #endif | 65 | #endif |
@@ -89,6 +89,85 @@ | |||
89 | #endif | 89 | #endif |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | /* | ||
93 | * The BF526-EZ-Board changed SDRAM chips between revisions, | ||
94 | * so we use below timings to accommodate both. | ||
95 | */ | ||
96 | #if defined(CONFIG_MEM_MT48H32M16LFCJ_75) | ||
97 | #if (CONFIG_SCLK_HZ > 119402985) | ||
98 | #define SDRAM_tRP TRP_2 | ||
99 | #define SDRAM_tRP_num 2 | ||
100 | #define SDRAM_tRAS TRAS_8 | ||
101 | #define SDRAM_tRAS_num 8 | ||
102 | #define SDRAM_tRCD TRCD_2 | ||
103 | #define SDRAM_tWR TWR_2 | ||
104 | #endif | ||
105 | #if (CONFIG_SCLK_HZ > 104477612) && (CONFIG_SCLK_HZ <= 119402985) | ||
106 | #define SDRAM_tRP TRP_2 | ||
107 | #define SDRAM_tRP_num 2 | ||
108 | #define SDRAM_tRAS TRAS_7 | ||
109 | #define SDRAM_tRAS_num 7 | ||
110 | #define SDRAM_tRCD TRCD_2 | ||
111 | #define SDRAM_tWR TWR_2 | ||
112 | #endif | ||
113 | #if (CONFIG_SCLK_HZ > 89552239) && (CONFIG_SCLK_HZ <= 104477612) | ||
114 | #define SDRAM_tRP TRP_2 | ||
115 | #define SDRAM_tRP_num 2 | ||
116 | #define SDRAM_tRAS TRAS_6 | ||
117 | #define SDRAM_tRAS_num 6 | ||
118 | #define SDRAM_tRCD TRCD_2 | ||
119 | #define SDRAM_tWR TWR_2 | ||
120 | #endif | ||
121 | #if (CONFIG_SCLK_HZ > 74626866) && (CONFIG_SCLK_HZ <= 89552239) | ||
122 | #define SDRAM_tRP TRP_2 | ||
123 | #define SDRAM_tRP_num 2 | ||
124 | #define SDRAM_tRAS TRAS_5 | ||
125 | #define SDRAM_tRAS_num 5 | ||
126 | #define SDRAM_tRCD TRCD_2 | ||
127 | #define SDRAM_tWR TWR_2 | ||
128 | #endif | ||
129 | #if (CONFIG_SCLK_HZ > 66666667) && (CONFIG_SCLK_HZ <= 74626866) | ||
130 | #define SDRAM_tRP TRP_2 | ||
131 | #define SDRAM_tRP_num 2 | ||
132 | #define SDRAM_tRAS TRAS_4 | ||
133 | #define SDRAM_tRAS_num 4 | ||
134 | #define SDRAM_tRCD TRCD_2 | ||
135 | #define SDRAM_tWR TWR_2 | ||
136 | #endif | ||
137 | #if (CONFIG_SCLK_HZ > 59701493) && (CONFIG_SCLK_HZ <= 66666667) | ||
138 | #define SDRAM_tRP TRP_2 | ||
139 | #define SDRAM_tRP_num 2 | ||
140 | #define SDRAM_tRAS TRAS_4 | ||
141 | #define SDRAM_tRAS_num 4 | ||
142 | #define SDRAM_tRCD TRCD_1 | ||
143 | #define SDRAM_tWR TWR_2 | ||
144 | #endif | ||
145 | #if (CONFIG_SCLK_HZ > 44776119) && (CONFIG_SCLK_HZ <= 59701493) | ||
146 | #define SDRAM_tRP TRP_2 | ||
147 | #define SDRAM_tRP_num 2 | ||
148 | #define SDRAM_tRAS TRAS_3 | ||
149 | #define SDRAM_tRAS_num 3 | ||
150 | #define SDRAM_tRCD TRCD_1 | ||
151 | #define SDRAM_tWR TWR_2 | ||
152 | #endif | ||
153 | #if (CONFIG_SCLK_HZ > 29850746) && (CONFIG_SCLK_HZ <= 44776119) | ||
154 | #define SDRAM_tRP TRP_1 | ||
155 | #define SDRAM_tRP_num 1 | ||
156 | #define SDRAM_tRAS TRAS_3 | ||
157 | #define SDRAM_tRAS_num 3 | ||
158 | #define SDRAM_tRCD TRCD_1 | ||
159 | #define SDRAM_tWR TWR_2 | ||
160 | #endif | ||
161 | #if (CONFIG_SCLK_HZ <= 29850746) | ||
162 | #define SDRAM_tRP TRP_1 | ||
163 | #define SDRAM_tRP_num 1 | ||
164 | #define SDRAM_tRAS TRAS_2 | ||
165 | #define SDRAM_tRAS_num 2 | ||
166 | #define SDRAM_tRCD TRCD_1 | ||
167 | #define SDRAM_tWR TWR_2 | ||
168 | #endif | ||
169 | #endif | ||
170 | |||
92 | #if defined(CONFIG_MEM_MT48LC16M8A2TG_75) || \ | 171 | #if defined(CONFIG_MEM_MT48LC16M8A2TG_75) || \ |
93 | defined(CONFIG_MEM_MT48LC8M32B2B5_7) | 172 | defined(CONFIG_MEM_MT48LC8M32B2B5_7) |
94 | /*SDRAM INFORMATION: */ | 173 | /*SDRAM INFORMATION: */ |
@@ -109,6 +188,13 @@ | |||
109 | #define SDRAM_CL CL_3 | 188 | #define SDRAM_CL CL_3 |
110 | #endif | 189 | #endif |
111 | 190 | ||
191 | #if defined(CONFIG_MEM_MT48H32M16LFCJ_75) | ||
192 | /*SDRAM INFORMATION: */ | ||
193 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ | ||
194 | #define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */ | ||
195 | #define SDRAM_CL CL_2 | ||
196 | #endif | ||
197 | |||
112 | 198 | ||
113 | #ifdef CONFIG_BFIN_KERNEL_CLOCK_MEMINIT_CALC | 199 | #ifdef CONFIG_BFIN_KERNEL_CLOCK_MEMINIT_CALC |
114 | /* Equation from section 17 (p17-46) of BF533 HRM */ | 200 | /* Equation from section 17 (p17-46) of BF533 HRM */ |
diff --git a/arch/blackfin/include/asm/mem_map.h b/arch/blackfin/include/asm/mem_map.h index e92b31051bb..5e21627c9ba 100644 --- a/arch/blackfin/include/asm/mem_map.h +++ b/arch/blackfin/include/asm/mem_map.h | |||
@@ -1,87 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | * mem_map.h | 2 | * Common Blackfin memory map |
3 | * Common header file for blackfin family of processors. | ||
4 | * | 3 | * |
4 | * Copyright 2004-2009 Analog Devices Inc. | ||
5 | * Licensed under the GPL-2 or later. | ||
5 | */ | 6 | */ |
6 | 7 | ||
7 | #ifndef _MEM_MAP_H_ | 8 | #ifndef __BFIN_MEM_MAP_H__ |
8 | #define _MEM_MAP_H_ | 9 | #define __BFIN_MEM_MAP_H__ |
9 | 10 | ||
10 | #include <mach/mem_map.h> | 11 | #include <mach/mem_map.h> |
11 | 12 | ||
12 | #ifndef __ASSEMBLY__ | 13 | /* Every Blackfin so far has MMRs like this */ |
14 | #ifndef COREMMR_BASE | ||
15 | # define COREMMR_BASE 0xFFE00000 | ||
16 | #endif | ||
17 | #ifndef SYSMMR_BASE | ||
18 | # define SYSMMR_BASE 0xFFC00000 | ||
19 | #endif | ||
13 | 20 | ||
14 | #ifdef CONFIG_SMP | 21 | /* Every Blackfin so far has on-chip Scratch Pad SRAM like this */ |
15 | static inline ulong get_l1_scratch_start_cpu(int cpu) | 22 | #ifndef L1_SCRATCH_START |
16 | { | 23 | # define L1_SCRATCH_START 0xFFB00000 |
17 | return (cpu) ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START; | 24 | # define L1_SCRATCH_LENGTH 0x1000 |
18 | } | 25 | #endif |
19 | static inline ulong get_l1_code_start_cpu(int cpu) | ||
20 | { | ||
21 | return (cpu) ? COREB_L1_CODE_START : COREA_L1_CODE_START; | ||
22 | } | ||
23 | static inline ulong get_l1_data_a_start_cpu(int cpu) | ||
24 | { | ||
25 | return (cpu) ? COREB_L1_DATA_A_START : COREA_L1_DATA_A_START; | ||
26 | } | ||
27 | static inline ulong get_l1_data_b_start_cpu(int cpu) | ||
28 | { | ||
29 | return (cpu) ? COREB_L1_DATA_B_START : COREA_L1_DATA_B_START; | ||
30 | } | ||
31 | 26 | ||
32 | static inline ulong get_l1_scratch_start(void) | 27 | /* Most parts lack on-chip L2 SRAM */ |
33 | { | 28 | #ifndef L2_START |
34 | return get_l1_scratch_start_cpu(blackfin_core_id()); | 29 | # define L2_START 0 |
35 | } | 30 | # define L2_LENGTH 0 |
36 | static inline ulong get_l1_code_start(void) | 31 | #endif |
37 | { | 32 | |
38 | return get_l1_code_start_cpu(blackfin_core_id()); | 33 | /* Most parts lack on-chip L1 ROM */ |
39 | } | 34 | #ifndef L1_ROM_START |
40 | static inline ulong get_l1_data_a_start(void) | 35 | # define L1_ROM_START 0 |
41 | { | 36 | # define L1_ROM_LENGTH 0 |
42 | return get_l1_data_a_start_cpu(blackfin_core_id()); | 37 | #endif |
43 | } | 38 | |
44 | static inline ulong get_l1_data_b_start(void) | 39 | /* Allow wonky SMP ports to override this */ |
45 | { | 40 | #ifndef GET_PDA_SAFE |
46 | return get_l1_data_b_start_cpu(blackfin_core_id()); | 41 | # define GET_PDA_SAFE(preg) \ |
47 | } | 42 | preg.l = _cpu_pda; \ |
43 | preg.h = _cpu_pda; | ||
44 | # define GET_PDA(preg, dreg) GET_PDA_SAFE(preg) | ||
48 | 45 | ||
49 | #else /* !CONFIG_SMP */ | 46 | # ifndef __ASSEMBLY__ |
50 | 47 | ||
51 | static inline ulong get_l1_scratch_start_cpu(int cpu) | 48 | static inline unsigned long get_l1_scratch_start_cpu(int cpu) |
52 | { | 49 | { |
53 | return L1_SCRATCH_START; | 50 | return L1_SCRATCH_START; |
54 | } | 51 | } |
55 | static inline ulong get_l1_code_start_cpu(int cpu) | 52 | static inline unsigned long get_l1_code_start_cpu(int cpu) |
56 | { | 53 | { |
57 | return L1_CODE_START; | 54 | return L1_CODE_START; |
58 | } | 55 | } |
59 | static inline ulong get_l1_data_a_start_cpu(int cpu) | 56 | static inline unsigned long get_l1_data_a_start_cpu(int cpu) |
60 | { | 57 | { |
61 | return L1_DATA_A_START; | 58 | return L1_DATA_A_START; |
62 | } | 59 | } |
63 | static inline ulong get_l1_data_b_start_cpu(int cpu) | 60 | static inline unsigned long get_l1_data_b_start_cpu(int cpu) |
64 | { | 61 | { |
65 | return L1_DATA_B_START; | 62 | return L1_DATA_B_START; |
66 | } | 63 | } |
67 | static inline ulong get_l1_scratch_start(void) | 64 | static inline unsigned long get_l1_scratch_start(void) |
68 | { | 65 | { |
69 | return get_l1_scratch_start_cpu(0); | 66 | return get_l1_scratch_start_cpu(0); |
70 | } | 67 | } |
71 | static inline ulong get_l1_code_start(void) | 68 | static inline unsigned long get_l1_code_start(void) |
72 | { | 69 | { |
73 | return get_l1_code_start_cpu(0); | 70 | return get_l1_code_start_cpu(0); |
74 | } | 71 | } |
75 | static inline ulong get_l1_data_a_start(void) | 72 | static inline unsigned long get_l1_data_a_start(void) |
76 | { | 73 | { |
77 | return get_l1_data_a_start_cpu(0); | 74 | return get_l1_data_a_start_cpu(0); |
78 | } | 75 | } |
79 | static inline ulong get_l1_data_b_start(void) | 76 | static inline unsigned long get_l1_data_b_start(void) |
80 | { | 77 | { |
81 | return get_l1_data_b_start_cpu(0); | 78 | return get_l1_data_b_start_cpu(0); |
82 | } | 79 | } |
83 | 80 | ||
84 | #endif /* CONFIG_SMP */ | 81 | # endif /* __ASSEMBLY__ */ |
85 | #endif /* __ASSEMBLY__ */ | 82 | #endif /* !GET_PDA_SAFE */ |
86 | 83 | ||
87 | #endif /* _MEM_MAP_H_ */ | 84 | #endif |
diff --git a/arch/blackfin/include/asm/mman.h b/arch/blackfin/include/asm/mman.h index b58f5ad3f02..8eebf89f5ab 100644 --- a/arch/blackfin/include/asm/mman.h +++ b/arch/blackfin/include/asm/mman.h | |||
@@ -1,43 +1 @@ | |||
1 | #ifndef __BFIN_MMAN_H__ | #include <asm-generic/mman.h> | |
2 | #define __BFIN_MMAN_H__ | ||
3 | |||
4 | #define PROT_READ 0x1 /* page can be read */ | ||
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | |||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
20 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
21 | #define MAP_LOCKED 0x2000 /* pages are locked */ | ||
22 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | ||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
25 | |||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | ||
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | ||
32 | |||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | |||
39 | /* compatibility flags */ | ||
40 | #define MAP_ANON MAP_ANONYMOUS | ||
41 | #define MAP_FILE 0 | ||
42 | |||
43 | #endif /* __BFIN_MMAN_H__ */ | ||
diff --git a/arch/blackfin/include/asm/msgbuf.h b/arch/blackfin/include/asm/msgbuf.h index 6fcbe8cd801..809134c644a 100644 --- a/arch/blackfin/include/asm/msgbuf.h +++ b/arch/blackfin/include/asm/msgbuf.h | |||
@@ -1,31 +1 @@ | |||
1 | #ifndef _BFIN_MSGBUF_H | #include <asm-generic/msgbuf.h> | |
2 | #define _BFIN_MSGBUF_H | ||
3 | |||
4 | /* | ||
5 | * The msqid64_ds structure for bfin architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct msqid64_ds { | ||
15 | struct ipc64_perm msg_perm; | ||
16 | __kernel_time_t msg_stime; /* last msgsnd time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t msg_rtime; /* last msgrcv time */ | ||
19 | unsigned long __unused2; | ||
20 | __kernel_time_t msg_ctime; /* last change time */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long msg_cbytes; /* current number of bytes on queue */ | ||
23 | unsigned long msg_qnum; /* number of messages in queue */ | ||
24 | unsigned long msg_qbytes; /* max number of bytes on queue */ | ||
25 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | ||
26 | __kernel_pid_t msg_lrpid; /* last receive pid */ | ||
27 | unsigned long __unused4; | ||
28 | unsigned long __unused5; | ||
29 | }; | ||
30 | |||
31 | #endif /* _BFIN_MSGBUF_H */ | ||
diff --git a/arch/blackfin/include/asm/mutex.h b/arch/blackfin/include/asm/mutex.h index 5d399256bf0..5cc641c5083 100644 --- a/arch/blackfin/include/asm/mutex.h +++ b/arch/blackfin/include/asm/mutex.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define _ASM_MUTEX_H | 10 | #define _ASM_MUTEX_H |
11 | 11 | ||
12 | #ifndef CONFIG_SMP | 12 | #ifndef CONFIG_SMP |
13 | #include <asm-generic/mutex-dec.h> | 13 | #include <asm-generic/mutex.h> |
14 | #else | 14 | #else |
15 | 15 | ||
16 | static inline void | 16 | static inline void |
diff --git a/arch/blackfin/include/asm/page.h b/arch/blackfin/include/asm/page.h index 3ea2016a1d4..29dcf75c611 100644 --- a/arch/blackfin/include/asm/page.h +++ b/arch/blackfin/include/asm/page.h | |||
@@ -1,88 +1,7 @@ | |||
1 | #ifndef _BLACKFIN_PAGE_H | 1 | #ifndef _BLACKFIN_PAGE_H |
2 | #define _BLACKFIN_PAGE_H | 2 | #define _BLACKFIN_PAGE_H |
3 | 3 | ||
4 | /* PAGE_SHIFT determines the page size */ | 4 | #include <asm-generic/page.h> |
5 | #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT) | ||
5 | 6 | ||
6 | #define PAGE_SHIFT 12 | ||
7 | #ifdef __ASSEMBLY__ | ||
8 | #define PAGE_SIZE (1 << PAGE_SHIFT) | ||
9 | #else | ||
10 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | ||
11 | #endif | 7 | #endif |
12 | #define PAGE_MASK (~(PAGE_SIZE-1)) | ||
13 | |||
14 | #include <asm/setup.h> | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | |||
18 | #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) | ||
19 | #define free_user_page(page, addr) free_page(addr) | ||
20 | |||
21 | #define clear_page(page) memset((page), 0, PAGE_SIZE) | ||
22 | #define copy_page(to,from) memcpy((to), (from), PAGE_SIZE) | ||
23 | |||
24 | #define clear_user_page(page, vaddr,pg) clear_page(page) | ||
25 | #define copy_user_page(to, from, vaddr,pg) copy_page(to, from) | ||
26 | |||
27 | /* | ||
28 | * These are used to make use of C type-checking.. | ||
29 | */ | ||
30 | typedef struct { | ||
31 | unsigned long pte; | ||
32 | } pte_t; | ||
33 | typedef struct { | ||
34 | unsigned long pmd[16]; | ||
35 | } pmd_t; | ||
36 | typedef struct { | ||
37 | unsigned long pgd; | ||
38 | } pgd_t; | ||
39 | typedef struct { | ||
40 | unsigned long pgprot; | ||
41 | } pgprot_t; | ||
42 | typedef struct page *pgtable_t; | ||
43 | |||
44 | #define pte_val(x) ((x).pte) | ||
45 | #define pmd_val(x) ((&x)->pmd[0]) | ||
46 | #define pgd_val(x) ((x).pgd) | ||
47 | #define pgprot_val(x) ((x).pgprot) | ||
48 | |||
49 | #define __pte(x) ((pte_t) { (x) } ) | ||
50 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
51 | #define __pgd(x) ((pgd_t) { (x) } ) | ||
52 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
53 | |||
54 | extern unsigned long memory_start; | ||
55 | extern unsigned long memory_end; | ||
56 | |||
57 | #endif /* !__ASSEMBLY__ */ | ||
58 | |||
59 | #include <asm/page_offset.h> | ||
60 | #include <asm/io.h> | ||
61 | |||
62 | #define PAGE_OFFSET (PAGE_OFFSET_RAW) | ||
63 | |||
64 | #ifndef __ASSEMBLY__ | ||
65 | |||
66 | #define __pa(vaddr) virt_to_phys((void *)(vaddr)) | ||
67 | #define __va(paddr) phys_to_virt((unsigned long)(paddr)) | ||
68 | |||
69 | #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT) | ||
70 | |||
71 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) | ||
72 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) | ||
73 | #define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) | ||
74 | #define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) | ||
75 | #define VALID_PAGE(page) ((page - mem_map) < max_mapnr) | ||
76 | |||
77 | #define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn)) | ||
78 | #define page_to_pfn(page) virt_to_pfn(page_to_virt(page)) | ||
79 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | ||
80 | |||
81 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ | ||
82 | ((void *)(kaddr) < (void *)memory_end)) | ||
83 | |||
84 | #include <asm-generic/getorder.h> | ||
85 | |||
86 | #endif /* __ASSEMBLY__ */ | ||
87 | |||
88 | #endif /* _BLACKFIN_PAGE_H */ | ||
diff --git a/arch/blackfin/include/asm/param.h b/arch/blackfin/include/asm/param.h index 41564a6347f..965d4542797 100644 --- a/arch/blackfin/include/asm/param.h +++ b/arch/blackfin/include/asm/param.h | |||
@@ -1,22 +1 @@ | |||
1 | #ifndef _BLACKFIN_PARAM_H | #include <asm-generic/param.h> | |
2 | #define _BLACKFIN_PARAM_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | #define HZ CONFIG_HZ | ||
6 | #define USER_HZ 100 | ||
7 | #define CLOCKS_PER_SEC (USER_HZ) | ||
8 | #endif | ||
9 | |||
10 | #ifndef HZ | ||
11 | #define HZ 100 | ||
12 | #endif | ||
13 | |||
14 | #define EXEC_PAGESIZE 4096 | ||
15 | |||
16 | #ifndef NOGROUP | ||
17 | #define NOGROUP (-1) | ||
18 | #endif | ||
19 | |||
20 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
21 | |||
22 | #endif /* _BLACKFIN_PARAM_H */ | ||
diff --git a/arch/blackfin/include/asm/percpu.h b/arch/blackfin/include/asm/percpu.h index c94c7bc88c7..06a959d6723 100644 --- a/arch/blackfin/include/asm/percpu.h +++ b/arch/blackfin/include/asm/percpu.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef __ARCH_BLACKFIN_PERCPU__ | ||
2 | #define __ARCH_BLACKFIN_PERCPU__ | ||
3 | |||
4 | #include <asm-generic/percpu.h> | #include <asm-generic/percpu.h> | |
5 | |||
6 | #endif /* __ARCH_BLACKFIN_PERCPU__ */ | ||
diff --git a/arch/blackfin/include/asm/pgalloc.h b/arch/blackfin/include/asm/pgalloc.h index c686e0542fd..f261cb7dda0 100644 --- a/arch/blackfin/include/asm/pgalloc.h +++ b/arch/blackfin/include/asm/pgalloc.h | |||
@@ -1,8 +1 @@ | |||
1 | #ifndef _BLACKFIN_PGALLOC_H | #include <asm-generic/pgalloc.h> | |
2 | #define _BLACKFIN_PGALLOC_H | ||
3 | |||
4 | #include <asm/setup.h> | ||
5 | |||
6 | #define check_pgt_cache() do { } while (0) | ||
7 | |||
8 | #endif /* _BLACKFIN_PGALLOC_H */ | ||
diff --git a/arch/blackfin/include/asm/poll.h b/arch/blackfin/include/asm/poll.h index 94cc2636e0e..a0556671357 100644 --- a/arch/blackfin/include/asm/poll.h +++ b/arch/blackfin/include/asm/poll.h | |||
@@ -1,24 +1,9 @@ | |||
1 | #ifndef __BFIN_POLL_H | 1 | #ifndef __BFIN_POLL_H |
2 | #define __BFIN_POLL_H | 2 | #define __BFIN_POLL_H |
3 | 3 | ||
4 | #define POLLIN 1 | 4 | #define POLLWRNORM 4 /* POLLOUT */ |
5 | #define POLLPRI 2 | ||
6 | #define POLLOUT 4 | ||
7 | #define POLLERR 8 | ||
8 | #define POLLHUP 16 | ||
9 | #define POLLNVAL 32 | ||
10 | #define POLLRDNORM 64 | ||
11 | #define POLLWRNORM POLLOUT | ||
12 | #define POLLRDBAND 128 | ||
13 | #define POLLWRBAND 256 | 5 | #define POLLWRBAND 256 |
14 | #define POLLMSG 0x0400 | ||
15 | #define POLLREMOVE 0x1000 | ||
16 | #define POLLRDHUP 0x2000 | ||
17 | 6 | ||
18 | struct pollfd { | 7 | #include <asm-generic/poll.h> |
19 | int fd; | ||
20 | short events; | ||
21 | short revents; | ||
22 | }; | ||
23 | 8 | ||
24 | #endif /* __BFIN_POLL_H */ | 9 | #endif |
diff --git a/arch/blackfin/include/asm/posix_types.h b/arch/blackfin/include/asm/posix_types.h index 23aa1f8c1bd..80c9d64eb26 100644 --- a/arch/blackfin/include/asm/posix_types.h +++ b/arch/blackfin/include/asm/posix_types.h | |||
@@ -1,61 +1,27 @@ | |||
1 | #ifndef __ARCH_BFIN_POSIX_TYPES_H | 1 | #ifndef __ARCH_BFIN_POSIX_TYPES_H |
2 | #define __ARCH_BFIN_POSIX_TYPES_H | 2 | #define __ARCH_BFIN_POSIX_TYPES_H |
3 | 3 | ||
4 | /* | ||
5 | * This file is generally used by user-level software, so you need to | ||
6 | * be a little careful about namespace pollution etc. Also, we cannot | ||
7 | * assume GCC is being used. | ||
8 | */ | ||
9 | |||
10 | typedef unsigned long __kernel_ino_t; | ||
11 | typedef unsigned short __kernel_mode_t; | 4 | typedef unsigned short __kernel_mode_t; |
5 | #define __kernel_mode_t __kernel_mode_t | ||
6 | |||
12 | typedef unsigned short __kernel_nlink_t; | 7 | typedef unsigned short __kernel_nlink_t; |
13 | typedef long __kernel_off_t; | 8 | #define __kernel_nlink_t __kernel_nlink_t |
14 | typedef int __kernel_pid_t; | 9 | |
15 | typedef unsigned int __kernel_ipc_pid_t; | 10 | typedef unsigned int __kernel_ipc_pid_t; |
16 | typedef unsigned int __kernel_uid_t; | 11 | #define __kernel_ipc_pid_t __kernel_ipc_pid_t |
17 | typedef unsigned int __kernel_gid_t; | 12 | |
18 | typedef unsigned long __kernel_size_t; | 13 | typedef unsigned long __kernel_size_t; |
19 | typedef long __kernel_ssize_t; | 14 | typedef long __kernel_ssize_t; |
20 | typedef int __kernel_ptrdiff_t; | 15 | typedef int __kernel_ptrdiff_t; |
21 | typedef long __kernel_time_t; | 16 | #define __kernel_size_t __kernel_size_t |
22 | typedef long __kernel_suseconds_t; | ||
23 | typedef long __kernel_clock_t; | ||
24 | typedef int __kernel_timer_t; | ||
25 | typedef int __kernel_clockid_t; | ||
26 | typedef int __kernel_daddr_t; | ||
27 | typedef char *__kernel_caddr_t; | ||
28 | typedef unsigned short __kernel_uid16_t; | ||
29 | typedef unsigned short __kernel_gid16_t; | ||
30 | typedef unsigned int __kernel_uid32_t; | ||
31 | typedef unsigned int __kernel_gid32_t; | ||
32 | 17 | ||
33 | typedef unsigned short __kernel_old_uid_t; | 18 | typedef unsigned short __kernel_old_uid_t; |
34 | typedef unsigned short __kernel_old_gid_t; | 19 | typedef unsigned short __kernel_old_gid_t; |
35 | typedef unsigned short __kernel_old_dev_t; | 20 | #define __kernel_old_uid_t __kernel_old_uid_t |
36 | |||
37 | #ifdef __GNUC__ | ||
38 | typedef long long __kernel_loff_t; | ||
39 | #endif | ||
40 | 21 | ||
41 | typedef struct { | 22 | typedef unsigned short __kernel_old_dev_t; |
42 | int val[2]; | 23 | #define __kernel_old_dev_t __kernel_old_dev_t |
43 | } __kernel_fsid_t; | ||
44 | |||
45 | #if defined(__KERNEL__) | ||
46 | |||
47 | #undef __FD_SET | ||
48 | #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) | ||
49 | |||
50 | #undef __FD_CLR | ||
51 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | ||
52 | |||
53 | #undef __FD_ISSET | ||
54 | #define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) | ||
55 | |||
56 | #undef __FD_ZERO | ||
57 | #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) | ||
58 | 24 | ||
59 | #endif /* defined(__KERNEL__) */ | 25 | #include <asm-generic/posix_types.h> |
60 | 26 | ||
61 | #endif | 27 | #endif |
diff --git a/arch/blackfin/include/asm/processor.h b/arch/blackfin/include/asm/processor.h index 3040415523b..d0be99be830 100644 --- a/arch/blackfin/include/asm/processor.h +++ b/arch/blackfin/include/asm/processor.h | |||
@@ -7,9 +7,8 @@ | |||
7 | */ | 7 | */ |
8 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | 8 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) |
9 | 9 | ||
10 | #include <asm/ptrace.h> | ||
10 | #include <asm/blackfin.h> | 11 | #include <asm/blackfin.h> |
11 | #include <asm/segment.h> | ||
12 | #include <linux/compiler.h> | ||
13 | 12 | ||
14 | static inline unsigned long rdusp(void) | 13 | static inline unsigned long rdusp(void) |
15 | { | 14 | { |
@@ -59,36 +58,8 @@ struct thread_struct { | |||
59 | PS_S, 0, 0 \ | 58 | PS_S, 0, 0 \ |
60 | } | 59 | } |
61 | 60 | ||
62 | /* | 61 | extern void start_thread(struct pt_regs *regs, unsigned long new_ip, |
63 | * Do necessary setup to start up a newly executed thread. | 62 | unsigned long new_sp); |
64 | * | ||
65 | * pass the data segment into user programs if it exists, | ||
66 | * it can't hurt anything as far as I can tell | ||
67 | */ | ||
68 | #ifndef CONFIG_SMP | ||
69 | #define start_thread(_regs, _pc, _usp) \ | ||
70 | do { \ | ||
71 | set_fs(USER_DS); \ | ||
72 | (_regs)->pc = (_pc); \ | ||
73 | if (current->mm) \ | ||
74 | (_regs)->p5 = current->mm->start_data; \ | ||
75 | task_thread_info(current)->l1_task_info.stack_start \ | ||
76 | = (void *)current->mm->context.stack_start; \ | ||
77 | task_thread_info(current)->l1_task_info.lowest_sp = (void *)(_usp); \ | ||
78 | memcpy(L1_SCRATCH_TASK_INFO, &task_thread_info(current)->l1_task_info, \ | ||
79 | sizeof(*L1_SCRATCH_TASK_INFO)); \ | ||
80 | wrusp(_usp); \ | ||
81 | } while(0) | ||
82 | #else | ||
83 | #define start_thread(_regs, _pc, _usp) \ | ||
84 | do { \ | ||
85 | set_fs(USER_DS); \ | ||
86 | (_regs)->pc = (_pc); \ | ||
87 | if (current->mm) \ | ||
88 | (_regs)->p5 = current->mm->start_data; \ | ||
89 | wrusp(_usp); \ | ||
90 | } while (0) | ||
91 | #endif | ||
92 | 63 | ||
93 | /* Forward declaration, a strange C thing */ | 64 | /* Forward declaration, a strange C thing */ |
94 | struct task_struct; | 65 | struct task_struct; |
diff --git a/arch/blackfin/include/asm/resource.h b/arch/blackfin/include/asm/resource.h index 091355ab349..04bc4db8921 100644 --- a/arch/blackfin/include/asm/resource.h +++ b/arch/blackfin/include/asm/resource.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _BFIN_RESOURCE_H | ||
2 | #define _BFIN_RESOURCE_H | ||
3 | |||
4 | #include <asm-generic/resource.h> | #include <asm-generic/resource.h> | |
5 | |||
6 | #endif /* _BFIN_RESOURCE_H */ | ||
diff --git a/arch/blackfin/include/asm/sembuf.h b/arch/blackfin/include/asm/sembuf.h index 18deb5c7fa5..7673b83cfef 100644 --- a/arch/blackfin/include/asm/sembuf.h +++ b/arch/blackfin/include/asm/sembuf.h | |||
@@ -1,25 +1 @@ | |||
1 | #ifndef _BFIN_SEMBUF_H | #include <asm-generic/sembuf.h> | |
2 | #define _BFIN_SEMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The semid64_ds structure for bfin architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct semid64_ds { | ||
15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
16 | __kernel_time_t sem_otime; /* last semop time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t sem_ctime; /* last change time */ | ||
19 | unsigned long __unused2; | ||
20 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long __unused4; | ||
23 | }; | ||
24 | |||
25 | #endif /* _BFIN_SEMBUF_H */ | ||
diff --git a/arch/blackfin/include/asm/serial.h b/arch/blackfin/include/asm/serial.h index 3a47606c858..94a4a12e3bf 100644 --- a/arch/blackfin/include/asm/serial.h +++ b/arch/blackfin/include/asm/serial.h | |||
@@ -1,6 +1,2 @@ | |||
1 | /* | 1 | #include <asm-generic/serial.h> |
2 | * include/asm-blackfin/serial.h | ||
3 | */ | ||
4 | |||
5 | #define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH | 2 | #define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH |
6 | #define BASE_BAUD (1843200 / 16) | ||
diff --git a/arch/blackfin/include/asm/setup.h b/arch/blackfin/include/asm/setup.h index 01c8c6cbe6f..552df83f1a4 100644 --- a/arch/blackfin/include/asm/setup.h +++ b/arch/blackfin/include/asm/setup.h | |||
@@ -1,17 +1 @@ | |||
1 | /* | #include <asm-generic/setup.h> | |
2 | ** asm/setup.h -- Definition of the Linux/bfin setup information | ||
3 | ** | ||
4 | ** This file is subject to the terms and conditions of the GNU General Public | ||
5 | ** License. See the file COPYING in the main directory of this archive | ||
6 | ** for more details. | ||
7 | ** | ||
8 | ** Copyright Lineo, Inc 2001 Tony Kou | ||
9 | ** | ||
10 | */ | ||
11 | |||
12 | #ifndef _BFIN_SETUP_H | ||
13 | #define _BFIN_SETUP_H | ||
14 | |||
15 | #define COMMAND_LINE_SIZE 512 | ||
16 | |||
17 | #endif /* _BFIN_SETUP_H */ | ||
diff --git a/arch/blackfin/include/asm/shmbuf.h b/arch/blackfin/include/asm/shmbuf.h index 612436303e8..83c05fc2de3 100644 --- a/arch/blackfin/include/asm/shmbuf.h +++ b/arch/blackfin/include/asm/shmbuf.h | |||
@@ -1,42 +1 @@ | |||
1 | #ifndef _BFIN_SHMBUF_H | #include <asm-generic/shmbuf.h> | |
2 | #define _BFIN_SHMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The shmid64_ds structure for bfin architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct shmid64_ds { | ||
15 | struct ipc64_perm shm_perm; /* operation perms */ | ||
16 | size_t shm_segsz; /* size of segment (bytes) */ | ||
17 | __kernel_time_t shm_atime; /* last attach time */ | ||
18 | unsigned long __unused1; | ||
19 | __kernel_time_t shm_dtime; /* last detach time */ | ||
20 | unsigned long __unused2; | ||
21 | __kernel_time_t shm_ctime; /* last change time */ | ||
22 | unsigned long __unused3; | ||
23 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
24 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
25 | unsigned long shm_nattch; /* no. of current attaches */ | ||
26 | unsigned long __unused4; | ||
27 | unsigned long __unused5; | ||
28 | }; | ||
29 | |||
30 | struct shminfo64 { | ||
31 | unsigned long shmmax; | ||
32 | unsigned long shmmin; | ||
33 | unsigned long shmmni; | ||
34 | unsigned long shmseg; | ||
35 | unsigned long shmall; | ||
36 | unsigned long __unused1; | ||
37 | unsigned long __unused2; | ||
38 | unsigned long __unused3; | ||
39 | unsigned long __unused4; | ||
40 | }; | ||
41 | |||
42 | #endif /* _BFIN_SHMBUF_H */ | ||
diff --git a/arch/blackfin/include/asm/shmparam.h b/arch/blackfin/include/asm/shmparam.h index 3c03906b766..93f30deb95d 100644 --- a/arch/blackfin/include/asm/shmparam.h +++ b/arch/blackfin/include/asm/shmparam.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _BFIN_SHMPARAM_H | #include <asm-generic/shmparam.h> | |
2 | #define _BFIN_SHMPARAM_H | ||
3 | |||
4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | ||
5 | |||
6 | #endif /* _BFIN_SHMPARAM_H */ | ||
diff --git a/arch/blackfin/include/asm/signal.h b/arch/blackfin/include/asm/signal.h index 2eea9079445..77a3bf37b69 100644 --- a/arch/blackfin/include/asm/signal.h +++ b/arch/blackfin/include/asm/signal.h | |||
@@ -1,160 +1,7 @@ | |||
1 | #ifndef _BLACKFIN_SIGNAL_H | 1 | #ifndef _BLACKFIN_SIGNAL_H |
2 | #define _BLACKFIN_SIGNAL_H | 2 | #define _BLACKFIN_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #define SA_RESTORER 0x04000000 |
5 | #include <asm-generic/signal.h> | ||
5 | 6 | ||
6 | /* Avoid too many header ordering problems. */ | 7 | #endif |
7 | struct siginfo; | ||
8 | |||
9 | #ifdef __KERNEL__ | ||
10 | /* Most things should be clean enough to redefine this at will, if care | ||
11 | is taken to make libc match. */ | ||
12 | |||
13 | #define _NSIG 64 | ||
14 | #define _NSIG_BPW 32 | ||
15 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
16 | |||
17 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
18 | |||
19 | typedef struct { | ||
20 | unsigned long sig[_NSIG_WORDS]; | ||
21 | } sigset_t; | ||
22 | |||
23 | #else | ||
24 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
25 | |||
26 | #define NSIG 32 | ||
27 | typedef unsigned long sigset_t; | ||
28 | |||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | #define SIGHUP 1 | ||
32 | #define SIGINT 2 | ||
33 | #define SIGQUIT 3 | ||
34 | #define SIGILL 4 | ||
35 | #define SIGTRAP 5 | ||
36 | #define SIGABRT 6 | ||
37 | #define SIGIOT 6 | ||
38 | #define SIGBUS 7 | ||
39 | #define SIGFPE 8 | ||
40 | #define SIGKILL 9 | ||
41 | #define SIGUSR1 10 | ||
42 | #define SIGSEGV 11 | ||
43 | #define SIGUSR2 12 | ||
44 | #define SIGPIPE 13 | ||
45 | #define SIGALRM 14 | ||
46 | #define SIGTERM 15 | ||
47 | #define SIGSTKFLT 16 | ||
48 | #define SIGCHLD 17 | ||
49 | #define SIGCONT 18 | ||
50 | #define SIGSTOP 19 | ||
51 | #define SIGTSTP 20 | ||
52 | #define SIGTTIN 21 | ||
53 | #define SIGTTOU 22 | ||
54 | #define SIGURG 23 | ||
55 | #define SIGXCPU 24 | ||
56 | #define SIGXFSZ 25 | ||
57 | #define SIGVTALRM 26 | ||
58 | #define SIGPROF 27 | ||
59 | #define SIGWINCH 28 | ||
60 | #define SIGIO 29 | ||
61 | #define SIGPOLL SIGIO | ||
62 | /* | ||
63 | #define SIGLOST 29 | ||
64 | */ | ||
65 | #define SIGPWR 30 | ||
66 | #define SIGSYS 31 | ||
67 | #define SIGUNUSED 31 | ||
68 | |||
69 | /* These should not be considered constants from userland. */ | ||
70 | #define SIGRTMIN 32 | ||
71 | #define SIGRTMAX _NSIG | ||
72 | |||
73 | /* | ||
74 | * SA_FLAGS values: | ||
75 | * | ||
76 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
77 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
78 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
80 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
81 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
82 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
83 | * | ||
84 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
85 | * Unix names RESETHAND and NODEFER respectively. | ||
86 | */ | ||
87 | #define SA_NOCLDSTOP 0x00000001 | ||
88 | #define SA_NOCLDWAIT 0x00000002 /* not supported yet */ | ||
89 | #define SA_SIGINFO 0x00000004 | ||
90 | #define SA_ONSTACK 0x08000000 | ||
91 | #define SA_RESTART 0x10000000 | ||
92 | #define SA_NODEFER 0x40000000 | ||
93 | #define SA_RESETHAND 0x80000000 | ||
94 | |||
95 | #define SA_NOMASK SA_NODEFER | ||
96 | #define SA_ONESHOT SA_RESETHAND | ||
97 | |||
98 | /* | ||
99 | * sigaltstack controls | ||
100 | */ | ||
101 | #define SS_ONSTACK 1 | ||
102 | #define SS_DISABLE 2 | ||
103 | |||
104 | #define MINSIGSTKSZ 2048 | ||
105 | #define SIGSTKSZ 8192 | ||
106 | |||
107 | #include <asm-generic/signal-defs.h> | ||
108 | |||
109 | #ifdef __KERNEL__ | ||
110 | struct old_sigaction { | ||
111 | __sighandler_t sa_handler; | ||
112 | old_sigset_t sa_mask; | ||
113 | unsigned long sa_flags; | ||
114 | void (*sa_restorer) (void); | ||
115 | }; | ||
116 | |||
117 | struct sigaction { | ||
118 | __sighandler_t sa_handler; | ||
119 | unsigned long sa_flags; | ||
120 | void (*sa_restorer) (void); | ||
121 | sigset_t sa_mask; /* mask last for extensibility */ | ||
122 | }; | ||
123 | |||
124 | struct k_sigaction { | ||
125 | struct sigaction sa; | ||
126 | }; | ||
127 | #else | ||
128 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
129 | |||
130 | struct sigaction { | ||
131 | union { | ||
132 | __sighandler_t _sa_handler; | ||
133 | void (*_sa_sigaction) (int, struct siginfo *, void *); | ||
134 | } _u; | ||
135 | sigset_t sa_mask; | ||
136 | unsigned long sa_flags; | ||
137 | void (*sa_restorer) (void); | ||
138 | }; | ||
139 | |||
140 | #define sa_handler _u._sa_handler | ||
141 | #define sa_sigaction _u._sa_sigaction | ||
142 | |||
143 | #endif /* __KERNEL__ */ | ||
144 | |||
145 | typedef struct sigaltstack { | ||
146 | void __user *ss_sp; | ||
147 | int ss_flags; | ||
148 | size_t ss_size; | ||
149 | } stack_t; | ||
150 | |||
151 | #ifdef __KERNEL__ | ||
152 | |||
153 | #include <asm/sigcontext.h> | ||
154 | #undef __HAVE_ARCH_SIG_BITOPS | ||
155 | |||
156 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
157 | |||
158 | #endif /* __KERNEL__ */ | ||
159 | |||
160 | #endif /* _BLACKFIN_SIGNAL_H */ | ||
diff --git a/arch/blackfin/include/asm/socket.h b/arch/blackfin/include/asm/socket.h index fac7fe9e1f8..6b71384b9d8 100644 --- a/arch/blackfin/include/asm/socket.h +++ b/arch/blackfin/include/asm/socket.h | |||
@@ -1,59 +1 @@ | |||
1 | #ifndef _ASM_SOCKET_H | #include <asm-generic/socket.h> | |
2 | #define _ASM_SOCKET_H | ||
3 | |||
4 | #include <asm/sockios.h> | ||
5 | |||
6 | /* For setsockoptions(2) */ | ||
7 | #define SOL_SOCKET 1 | ||
8 | |||
9 | #define SO_DEBUG 1 | ||
10 | #define SO_REUSEADDR 2 | ||
11 | #define SO_TYPE 3 | ||
12 | #define SO_ERROR 4 | ||
13 | #define SO_DONTROUTE 5 | ||
14 | #define SO_BROADCAST 6 | ||
15 | #define SO_SNDBUF 7 | ||
16 | #define SO_RCVBUF 8 | ||
17 | #define SO_SNDBUFFORCE 32 | ||
18 | #define SO_RCVBUFFORCE 33 | ||
19 | #define SO_KEEPALIVE 9 | ||
20 | #define SO_OOBINLINE 10 | ||
21 | #define SO_NO_CHECK 11 | ||
22 | #define SO_PRIORITY 12 | ||
23 | #define SO_LINGER 13 | ||
24 | #define SO_BSDCOMPAT 14 | ||
25 | /* To add :#define SO_REUSEPORT 15 */ | ||
26 | #define SO_PASSCRED 16 | ||
27 | #define SO_PEERCRED 17 | ||
28 | #define SO_RCVLOWAT 18 | ||
29 | #define SO_SNDLOWAT 19 | ||
30 | #define SO_RCVTIMEO 20 | ||
31 | #define SO_SNDTIMEO 21 | ||
32 | |||
33 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
34 | #define SO_SECURITY_AUTHENTICATION 22 | ||
35 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
36 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
37 | |||
38 | #define SO_BINDTODEVICE 25 | ||
39 | |||
40 | /* Socket filtering */ | ||
41 | #define SO_ATTACH_FILTER 26 | ||
42 | #define SO_DETACH_FILTER 27 | ||
43 | |||
44 | #define SO_PEERNAME 28 | ||
45 | #define SO_TIMESTAMP 29 | ||
46 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
47 | |||
48 | #define SO_ACCEPTCONN 30 | ||
49 | #define SO_PEERSEC 31 | ||
50 | #define SO_PASSSEC 34 | ||
51 | #define SO_TIMESTAMPNS 35 | ||
52 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
53 | |||
54 | #define SO_MARK 36 | ||
55 | |||
56 | #define SO_TIMESTAMPING 37 | ||
57 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
58 | |||
59 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/arch/blackfin/include/asm/sockios.h b/arch/blackfin/include/asm/sockios.h index 426b89bfaa8..def6d4746ee 100644 --- a/arch/blackfin/include/asm/sockios.h +++ b/arch/blackfin/include/asm/sockios.h | |||
@@ -1,13 +1 @@ | |||
1 | #ifndef __ARCH_BFIN_SOCKIOS__ | #include <asm-generic/sockios.h> | |
2 | #define __ARCH_BFIN_SOCKIOS__ | ||
3 | |||
4 | /* Socket-level I/O control calls. */ | ||
5 | #define FIOSETOWN 0x8901 | ||
6 | #define SIOCSPGRP 0x8902 | ||
7 | #define FIOGETOWN 0x8903 | ||
8 | #define SIOCGPGRP 0x8904 | ||
9 | #define SIOCATMARK 0x8905 | ||
10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | ||
11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | ||
12 | |||
13 | #endif /* __ARCH_BFIN_SOCKIOS__ */ | ||
diff --git a/arch/blackfin/include/asm/spinlock.h b/arch/blackfin/include/asm/spinlock.h index 0249ac31947..d6ff4b59fcb 100644 --- a/arch/blackfin/include/asm/spinlock.h +++ b/arch/blackfin/include/asm/spinlock.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef __BFIN_SPINLOCK_H | 1 | #ifndef __BFIN_SPINLOCK_H |
2 | #define __BFIN_SPINLOCK_H | 2 | #define __BFIN_SPINLOCK_H |
3 | 3 | ||
4 | #ifndef CONFIG_SMP | ||
5 | # include <asm-generic/spinlock.h> | ||
6 | #else | ||
7 | |||
4 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
5 | 9 | ||
6 | asmlinkage int __raw_spin_is_locked_asm(volatile int *ptr); | 10 | asmlinkage int __raw_spin_is_locked_asm(volatile int *ptr); |
@@ -86,4 +90,6 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
86 | #define _raw_read_relax(lock) cpu_relax() | 90 | #define _raw_read_relax(lock) cpu_relax() |
87 | #define _raw_write_relax(lock) cpu_relax() | 91 | #define _raw_write_relax(lock) cpu_relax() |
88 | 92 | ||
93 | #endif | ||
94 | |||
89 | #endif /* !__BFIN_SPINLOCK_H */ | 95 | #endif /* !__BFIN_SPINLOCK_H */ |
diff --git a/arch/blackfin/include/asm/statfs.h b/arch/blackfin/include/asm/statfs.h index 350672091ba..0b91fe198c2 100644 --- a/arch/blackfin/include/asm/statfs.h +++ b/arch/blackfin/include/asm/statfs.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _BFIN_STATFS_H | ||
2 | #define _BFIN_STATFS_H | ||
3 | |||
4 | #include <asm-generic/statfs.h> | #include <asm-generic/statfs.h> | |
5 | |||
6 | #endif /* _BFIN_STATFS_H */ | ||
diff --git a/arch/blackfin/include/asm/swab.h b/arch/blackfin/include/asm/swab.h index 6403ad2932e..d442113de51 100644 --- a/arch/blackfin/include/asm/swab.h +++ b/arch/blackfin/include/asm/swab.h | |||
@@ -2,11 +2,7 @@ | |||
2 | #define _BLACKFIN_SWAB_H | 2 | #define _BLACKFIN_SWAB_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/compiler.h> | 5 | #include <asm-generic/swab.h> |
6 | |||
7 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
8 | # define __SWAB_64_THRU_32__ | ||
9 | #endif | ||
10 | 6 | ||
11 | #ifdef __GNUC__ | 7 | #ifdef __GNUC__ |
12 | 8 | ||
diff --git a/arch/blackfin/include/asm/system.h b/arch/blackfin/include/asm/system.h index 294dbda2416..85e8f16cf8c 100644 --- a/arch/blackfin/include/asm/system.h +++ b/arch/blackfin/include/asm/system.h | |||
@@ -135,11 +135,13 @@ struct __xchg_dummy { | |||
135 | }; | 135 | }; |
136 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) | 136 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) |
137 | 137 | ||
138 | #include <mach/blackfin.h> | ||
139 | |||
138 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | 140 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, |
139 | int size) | 141 | int size) |
140 | { | 142 | { |
141 | unsigned long tmp = 0; | 143 | unsigned long tmp = 0; |
142 | unsigned long flags = 0; | 144 | unsigned long flags; |
143 | 145 | ||
144 | local_irq_save_hw(flags); | 146 | local_irq_save_hw(flags); |
145 | 147 | ||
diff --git a/arch/blackfin/include/asm/termbits.h b/arch/blackfin/include/asm/termbits.h index f37feb7cf89..3935b106de7 100644 --- a/arch/blackfin/include/asm/termbits.h +++ b/arch/blackfin/include/asm/termbits.h | |||
@@ -1,198 +1 @@ | |||
1 | #ifndef __ARCH_BFIN_TERMBITS_H__ | #include <asm-generic/termbits.h> | |
2 | #define __ARCH_BFIN_TERMBITS_H__ | ||
3 | |||
4 | #include <linux/posix_types.h> | ||
5 | |||
6 | typedef unsigned char cc_t; | ||
7 | typedef unsigned int speed_t; | ||
8 | typedef unsigned int tcflag_t; | ||
9 | |||
10 | #define NCCS 19 | ||
11 | struct termios { | ||
12 | tcflag_t c_iflag; /* input mode flags */ | ||
13 | tcflag_t c_oflag; /* output mode flags */ | ||
14 | tcflag_t c_cflag; /* control mode flags */ | ||
15 | tcflag_t c_lflag; /* local mode flags */ | ||
16 | cc_t c_line; /* line discipline */ | ||
17 | cc_t c_cc[NCCS]; /* control characters */ | ||
18 | }; | ||
19 | |||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
31 | struct ktermios { | ||
32 | tcflag_t c_iflag; /* input mode flags */ | ||
33 | tcflag_t c_oflag; /* output mode flags */ | ||
34 | tcflag_t c_cflag; /* control mode flags */ | ||
35 | tcflag_t c_lflag; /* local mode flags */ | ||
36 | cc_t c_line; /* line discipline */ | ||
37 | cc_t c_cc[NCCS]; /* control characters */ | ||
38 | speed_t c_ispeed; /* input speed */ | ||
39 | speed_t c_ospeed; /* output speed */ | ||
40 | }; | ||
41 | |||
42 | /* c_cc characters */ | ||
43 | #define VINTR 0 | ||
44 | #define VQUIT 1 | ||
45 | #define VERASE 2 | ||
46 | #define VKILL 3 | ||
47 | #define VEOF 4 | ||
48 | #define VTIME 5 | ||
49 | #define VMIN 6 | ||
50 | #define VSWTC 7 | ||
51 | #define VSTART 8 | ||
52 | #define VSTOP 9 | ||
53 | #define VSUSP 10 | ||
54 | #define VEOL 11 | ||
55 | #define VREPRINT 12 | ||
56 | #define VDISCARD 13 | ||
57 | #define VWERASE 14 | ||
58 | #define VLNEXT 15 | ||
59 | #define VEOL2 16 | ||
60 | |||
61 | /* c_iflag bits */ | ||
62 | #define IGNBRK 0000001 | ||
63 | #define BRKINT 0000002 | ||
64 | #define IGNPAR 0000004 | ||
65 | #define PARMRK 0000010 | ||
66 | #define INPCK 0000020 | ||
67 | #define ISTRIP 0000040 | ||
68 | #define INLCR 0000100 | ||
69 | #define IGNCR 0000200 | ||
70 | #define ICRNL 0000400 | ||
71 | #define IUCLC 0001000 | ||
72 | #define IXON 0002000 | ||
73 | #define IXANY 0004000 | ||
74 | #define IXOFF 0010000 | ||
75 | #define IMAXBEL 0020000 | ||
76 | #define IUTF8 0040000 | ||
77 | |||
78 | /* c_oflag bits */ | ||
79 | #define OPOST 0000001 | ||
80 | #define OLCUC 0000002 | ||
81 | #define ONLCR 0000004 | ||
82 | #define OCRNL 0000010 | ||
83 | #define ONOCR 0000020 | ||
84 | #define ONLRET 0000040 | ||
85 | #define OFILL 0000100 | ||
86 | #define OFDEL 0000200 | ||
87 | #define NLDLY 0000400 | ||
88 | #define NL0 0000000 | ||
89 | #define NL1 0000400 | ||
90 | #define CRDLY 0003000 | ||
91 | #define CR0 0000000 | ||
92 | #define CR1 0001000 | ||
93 | #define CR2 0002000 | ||
94 | #define CR3 0003000 | ||
95 | #define TABDLY 0014000 | ||
96 | #define TAB0 0000000 | ||
97 | #define TAB1 0004000 | ||
98 | #define TAB2 0010000 | ||
99 | #define TAB3 0014000 | ||
100 | #define XTABS 0014000 | ||
101 | #define BSDLY 0020000 | ||
102 | #define BS0 0000000 | ||
103 | #define BS1 0020000 | ||
104 | #define VTDLY 0040000 | ||
105 | #define VT0 0000000 | ||
106 | #define VT1 0040000 | ||
107 | #define FFDLY 0100000 | ||
108 | #define FF0 0000000 | ||
109 | #define FF1 0100000 | ||
110 | |||
111 | /* c_cflag bit meaning */ | ||
112 | #define CBAUD 0010017 | ||
113 | #define B0 0000000 /* hang up */ | ||
114 | #define B50 0000001 | ||
115 | #define B75 0000002 | ||
116 | #define B110 0000003 | ||
117 | #define B134 0000004 | ||
118 | #define B150 0000005 | ||
119 | #define B200 0000006 | ||
120 | #define B300 0000007 | ||
121 | #define B600 0000010 | ||
122 | #define B1200 0000011 | ||
123 | #define B1800 0000012 | ||
124 | #define B2400 0000013 | ||
125 | #define B4800 0000014 | ||
126 | #define B9600 0000015 | ||
127 | #define B19200 0000016 | ||
128 | #define B38400 0000017 | ||
129 | #define EXTA B19200 | ||
130 | #define EXTB B38400 | ||
131 | #define CSIZE 0000060 | ||
132 | #define CS5 0000000 | ||
133 | #define CS6 0000020 | ||
134 | #define CS7 0000040 | ||
135 | #define CS8 0000060 | ||
136 | #define CSTOPB 0000100 | ||
137 | #define CREAD 0000200 | ||
138 | #define PARENB 0000400 | ||
139 | #define PARODD 0001000 | ||
140 | #define HUPCL 0002000 | ||
141 | #define CLOCAL 0004000 | ||
142 | #define CBAUDEX 0010000 | ||
143 | #define BOTHER 0010000 | ||
144 | #define B57600 0010001 | ||
145 | #define B115200 0010002 | ||
146 | #define B230400 0010003 | ||
147 | #define B460800 0010004 | ||
148 | #define B500000 0010005 | ||
149 | #define B576000 0010006 | ||
150 | #define B921600 0010007 | ||
151 | #define B1000000 0010010 | ||
152 | #define B1152000 0010011 | ||
153 | #define B1500000 0010012 | ||
154 | #define B2000000 0010013 | ||
155 | #define B2500000 0010014 | ||
156 | #define B3000000 0010015 | ||
157 | #define B3500000 0010016 | ||
158 | #define B4000000 0010017 | ||
159 | #define CIBAUD 002003600000 /* input baud rate */ | ||
160 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
161 | #define CRTSCTS 020000000000 /* flow control */ | ||
162 | |||
163 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
164 | |||
165 | /* c_lflag bits */ | ||
166 | #define ISIG 0000001 | ||
167 | #define ICANON 0000002 | ||
168 | #define XCASE 0000004 | ||
169 | #define ECHO 0000010 | ||
170 | #define ECHOE 0000020 | ||
171 | #define ECHOK 0000040 | ||
172 | #define ECHONL 0000100 | ||
173 | #define NOFLSH 0000200 | ||
174 | #define TOSTOP 0000400 | ||
175 | #define ECHOCTL 0001000 | ||
176 | #define ECHOPRT 0002000 | ||
177 | #define ECHOKE 0004000 | ||
178 | #define FLUSHO 0010000 | ||
179 | #define PENDIN 0040000 | ||
180 | #define IEXTEN 0100000 | ||
181 | |||
182 | /* tcflow() and TCXONC use these */ | ||
183 | #define TCOOFF 0 | ||
184 | #define TCOON 1 | ||
185 | #define TCIOFF 2 | ||
186 | #define TCION 3 | ||
187 | |||
188 | /* tcflush() and TCFLSH use these */ | ||
189 | #define TCIFLUSH 0 | ||
190 | #define TCOFLUSH 1 | ||
191 | #define TCIOFLUSH 2 | ||
192 | |||
193 | /* tcsetattr uses these */ | ||
194 | #define TCSANOW 0 | ||
195 | #define TCSADRAIN 1 | ||
196 | #define TCSAFLUSH 2 | ||
197 | |||
198 | #endif /* __ARCH_BFIN_TERMBITS_H__ */ | ||
diff --git a/arch/blackfin/include/asm/termios.h b/arch/blackfin/include/asm/termios.h index d50d063c605..280d78a9d96 100644 --- a/arch/blackfin/include/asm/termios.h +++ b/arch/blackfin/include/asm/termios.h | |||
@@ -1,94 +1 @@ | |||
1 | #ifndef __BFIN_TERMIOS_H__ | #include <asm-generic/termios.h> | |
2 | #define __BFIN_TERMIOS_H__ | ||
3 | |||
4 | #include <asm/termbits.h> | ||
5 | #include <asm/ioctls.h> | ||
6 | |||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | /* modem lines */ | ||
25 | #define TIOCM_LE 0x001 | ||
26 | #define TIOCM_DTR 0x002 | ||
27 | #define TIOCM_RTS 0x004 | ||
28 | #define TIOCM_ST 0x008 | ||
29 | #define TIOCM_SR 0x010 | ||
30 | #define TIOCM_CTS 0x020 | ||
31 | #define TIOCM_CAR 0x040 | ||
32 | #define TIOCM_RNG 0x080 | ||
33 | #define TIOCM_DSR 0x100 | ||
34 | #define TIOCM_CD TIOCM_CAR | ||
35 | #define TIOCM_RI TIOCM_RNG | ||
36 | #define TIOCM_OUT1 0x2000 | ||
37 | #define TIOCM_OUT2 0x4000 | ||
38 | #define TIOCM_LOOP 0x8000 | ||
39 | |||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
41 | |||
42 | #ifdef __KERNEL__ | ||
43 | |||
44 | /* intr=^C quit=^\ erase=del kill=^U | ||
45 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | ||
46 | start=^Q stop=^S susp=^Z eol=\0 | ||
47 | reprint=^R discard=^U werase=^W lnext=^V | ||
48 | eol2=\0 | ||
49 | */ | ||
50 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | ||
51 | |||
52 | /* | ||
53 | * Translate a "termio" structure into a "termios". Ugh. | ||
54 | */ | ||
55 | #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ | ||
56 | unsigned short __tmp; \ | ||
57 | get_user(__tmp,&(termio)->x); \ | ||
58 | *(unsigned short *) &(termios)->x = __tmp; \ | ||
59 | } | ||
60 | |||
61 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
62 | ({ \ | ||
63 | SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ | ||
64 | SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ | ||
65 | SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ | ||
66 | SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ | ||
67 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
68 | }) | ||
69 | |||
70 | /* | ||
71 | * Translate a "termios" structure into a "termio". Ugh. | ||
72 | */ | ||
73 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
74 | ({ \ | ||
75 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
76 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
77 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
78 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
79 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
80 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
81 | }) | ||
82 | |||
83 | #define user_termios_to_kernel_termios(k, u) \ | ||
84 | copy_from_user(k, u, sizeof(struct termios2)) | ||
85 | #define kernel_termios_to_user_termios(u, k) \ | ||
86 | copy_to_user(u, k, sizeof(struct termios2)) | ||
87 | #define user_termios_to_kernel_termios_1(k, u) \ | ||
88 | copy_from_user(k, u, sizeof(struct termios)) | ||
89 | #define kernel_termios_to_user_termios_1(u, k) \ | ||
90 | copy_to_user(u, k, sizeof(struct termios)) | ||
91 | |||
92 | #endif /* __KERNEL__ */ | ||
93 | |||
94 | #endif /* __BFIN_TERMIOS_H__ */ | ||
diff --git a/arch/blackfin/include/asm/tlbflush.h b/arch/blackfin/include/asm/tlbflush.h index 277b400924b..f1a06c006ed 100644 --- a/arch/blackfin/include/asm/tlbflush.h +++ b/arch/blackfin/include/asm/tlbflush.h | |||
@@ -1,56 +1 @@ | |||
1 | #ifndef _BLACKFIN_TLBFLUSH_H | #include <asm-generic/tlbflush.h> | |
2 | #define _BLACKFIN_TLBFLUSH_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2000 Lineo, David McCullough <davidm@uclinux.org> | ||
6 | * Copyright (C) 2000-2002, Greg Ungerer <gerg@snapgear.com> | ||
7 | */ | ||
8 | |||
9 | #include <asm/setup.h> | ||
10 | |||
11 | /* | ||
12 | * flush all user-space atc entries. | ||
13 | */ | ||
14 | static inline void __flush_tlb(void) | ||
15 | { | ||
16 | BUG(); | ||
17 | } | ||
18 | |||
19 | static inline void __flush_tlb_one(unsigned long addr) | ||
20 | { | ||
21 | BUG(); | ||
22 | } | ||
23 | |||
24 | #define flush_tlb() __flush_tlb() | ||
25 | |||
26 | /* | ||
27 | * flush all atc entries (both kernel and user-space entries). | ||
28 | */ | ||
29 | static inline void flush_tlb_all(void) | ||
30 | { | ||
31 | BUG(); | ||
32 | } | ||
33 | |||
34 | static inline void flush_tlb_mm(struct mm_struct *mm) | ||
35 | { | ||
36 | BUG(); | ||
37 | } | ||
38 | |||
39 | static inline void flush_tlb_page(struct vm_area_struct *vma, | ||
40 | unsigned long addr) | ||
41 | { | ||
42 | BUG(); | ||
43 | } | ||
44 | |||
45 | static inline void flush_tlb_range(struct mm_struct *mm, | ||
46 | unsigned long start, unsigned long end) | ||
47 | { | ||
48 | BUG(); | ||
49 | } | ||
50 | |||
51 | static inline void flush_tlb_kernel_page(unsigned long addr) | ||
52 | { | ||
53 | BUG(); | ||
54 | } | ||
55 | |||
56 | #endif | ||
diff --git a/arch/blackfin/include/asm/topology.h b/arch/blackfin/include/asm/topology.h index acee2398789..5428f333a02 100644 --- a/arch/blackfin/include/asm/topology.h +++ b/arch/blackfin/include/asm/topology.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _ASM_BLACKFIN_TOPOLOGY_H | ||
2 | #define _ASM_BLACKFIN_TOPOLOGY_H | ||
3 | |||
4 | #include <asm-generic/topology.h> | #include <asm-generic/topology.h> | |
5 | |||
6 | #endif /* _ASM_BLACKFIN_TOPOLOGY_H */ | ||
diff --git a/arch/blackfin/include/asm/traps.h b/arch/blackfin/include/asm/traps.h index 34f7295fb07..3cdc454cde2 100644 --- a/arch/blackfin/include/asm/traps.h +++ b/arch/blackfin/include/asm/traps.h | |||
@@ -111,9 +111,7 @@ | |||
111 | level " bits in the Watchpoint Instruction Address Control register (WPIACTL) is set.\n" | 111 | level " bits in the Watchpoint Instruction Address Control register (WPIACTL) is set.\n" |
112 | #define EXC_0x2A(level) \ | 112 | #define EXC_0x2A(level) \ |
113 | "Instruction fetch misaligned address violation\n" \ | 113 | "Instruction fetch misaligned address violation\n" \ |
114 | level " - Attempted misaligned instruction cache fetch. On a misaligned instruction fetch\n" \ | 114 | level " - Attempted misaligned instruction cache fetch.\n" |
115 | level " exception, the return address provided in RETX is the destination address which is\n" \ | ||
116 | level " misaligned, rather than the address of the offending instruction.\n" | ||
117 | #define EXC_0x2B(level) \ | 115 | #define EXC_0x2B(level) \ |
118 | "CPLB protection violation\n" \ | 116 | "CPLB protection violation\n" \ |
119 | level " - Illegal instruction fetch access (memory protection violation).\n" | 117 | level " - Illegal instruction fetch access (memory protection violation).\n" |
diff --git a/arch/blackfin/include/asm/types.h b/arch/blackfin/include/asm/types.h index 8441cbc2bf9..b9e79bc580d 100644 --- a/arch/blackfin/include/asm/types.h +++ b/arch/blackfin/include/asm/types.h | |||
@@ -1,36 +1 @@ | |||
1 | #ifndef _BFIN_TYPES_H | #include <asm-generic/types.h> | |
2 | #define _BFIN_TYPES_H | ||
3 | |||
4 | /* | ||
5 | * This file is never included by application software unless | ||
6 | * explicitly requested (e.g., via linux/types.h) in which case the | ||
7 | * application is Linux specific so (user-) name space pollution is | ||
8 | * not a major issue. However, for interoperability, libraries still | ||
9 | * need to be careful to avoid a name clashes. | ||
10 | */ | ||
11 | #include <asm-generic/int-ll64.h> | ||
12 | |||
13 | #ifndef __ASSEMBLY__ | ||
14 | |||
15 | typedef unsigned short umode_t; | ||
16 | |||
17 | #endif /* __ASSEMBLY__ */ | ||
18 | /* | ||
19 | * These aren't exported outside the kernel to avoid name space clashes | ||
20 | */ | ||
21 | #ifdef __KERNEL__ | ||
22 | |||
23 | #define BITS_PER_LONG 32 | ||
24 | |||
25 | #ifndef __ASSEMBLY__ | ||
26 | |||
27 | /* Dma addresses are 32-bits wide. */ | ||
28 | |||
29 | typedef u32 dma_addr_t; | ||
30 | typedef u64 dma64_addr_t; | ||
31 | |||
32 | #endif /* __ASSEMBLY__ */ | ||
33 | |||
34 | #endif /* __KERNEL__ */ | ||
35 | |||
36 | #endif /* _BFIN_TYPES_H */ | ||
diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h index 8894e9ffbb5..2f469a1f80f 100644 --- a/arch/blackfin/include/asm/uaccess.h +++ b/arch/blackfin/include/asm/uaccess.h | |||
@@ -265,4 +265,26 @@ __clear_user(void *to, unsigned long n) | |||
265 | 265 | ||
266 | #define clear_user(to, n) __clear_user(to, n) | 266 | #define clear_user(to, n) __clear_user(to, n) |
267 | 267 | ||
268 | /* How to interpret these return values: | ||
269 | * CORE: can be accessed by core load or dma memcpy | ||
270 | * CORE_ONLY: can only be accessed by core load | ||
271 | * DMA: can only be accessed by dma memcpy | ||
272 | * IDMA: can only be accessed by interprocessor dma memcpy (BF561) | ||
273 | * ITEST: can be accessed by isram memcpy or dma memcpy | ||
274 | */ | ||
275 | enum { | ||
276 | BFIN_MEM_ACCESS_CORE = 0, | ||
277 | BFIN_MEM_ACCESS_CORE_ONLY, | ||
278 | BFIN_MEM_ACCESS_DMA, | ||
279 | BFIN_MEM_ACCESS_IDMA, | ||
280 | BFIN_MEM_ACCESS_ITEST, | ||
281 | }; | ||
282 | /** | ||
283 | * bfin_mem_access_type() - what kind of memory access is required | ||
284 | * @addr: the address to check | ||
285 | * @size: number of bytes needed | ||
286 | * @return: <0 is error, >=0 is BFIN_MEM_ACCESS_xxx enum (see above) | ||
287 | */ | ||
288 | int bfin_mem_access_type(unsigned long addr, unsigned long size); | ||
289 | |||
268 | #endif /* _BLACKFIN_UACCESS_H */ | 290 | #endif /* _BLACKFIN_UACCESS_H */ |
diff --git a/arch/blackfin/include/asm/ucontext.h b/arch/blackfin/include/asm/ucontext.h index 4a4e3856beb..9bc07b9f30f 100644 --- a/arch/blackfin/include/asm/ucontext.h +++ b/arch/blackfin/include/asm/ucontext.h | |||
@@ -1,17 +1 @@ | |||
1 | /** Changes made by Tony Kou Lineo Inc. May 2001 | #include <asm-generic/ucontext.h> | |
2 | * | ||
3 | * Based on: include/m68knommu/ucontext.h | ||
4 | */ | ||
5 | |||
6 | #ifndef _BLACKFIN_UCONTEXT_H | ||
7 | #define _BLACKFIN_UCONTEXT_H | ||
8 | |||
9 | struct ucontext { | ||
10 | unsigned long uc_flags; /* the others are necessary */ | ||
11 | struct ucontext *uc_link; | ||
12 | stack_t uc_stack; | ||
13 | struct sigcontext uc_mcontext; | ||
14 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
15 | }; | ||
16 | |||
17 | #endif /* _BLACKFIN_UCONTEXT_H */ | ||
diff --git a/arch/blackfin/include/asm/unaligned.h b/arch/blackfin/include/asm/unaligned.h index fd8a1d63494..6cecbbb2111 100644 --- a/arch/blackfin/include/asm/unaligned.h +++ b/arch/blackfin/include/asm/unaligned.h | |||
@@ -1,11 +1 @@ | |||
1 | #ifndef _ASM_BLACKFIN_UNALIGNED_H | #include <asm-generic/unaligned.h> | |
2 | #define _ASM_BLACKFIN_UNALIGNED_H | ||
3 | |||
4 | #include <linux/unaligned/le_struct.h> | ||
5 | #include <linux/unaligned/be_byteshift.h> | ||
6 | #include <linux/unaligned/generic.h> | ||
7 | |||
8 | #define get_unaligned __get_unaligned_le | ||
9 | #define put_unaligned __put_unaligned_le | ||
10 | |||
11 | #endif /* _ASM_BLACKFIN_UNALIGNED_H */ | ||
diff --git a/arch/blackfin/include/asm/unistd.h b/arch/blackfin/include/asm/unistd.h index da35133c171..c8e7ee4768c 100644 --- a/arch/blackfin/include/asm/unistd.h +++ b/arch/blackfin/include/asm/unistd.h | |||
@@ -381,8 +381,9 @@ | |||
381 | #define __NR_preadv 366 | 381 | #define __NR_preadv 366 |
382 | #define __NR_pwritev 367 | 382 | #define __NR_pwritev 367 |
383 | #define __NR_rt_tgsigqueueinfo 368 | 383 | #define __NR_rt_tgsigqueueinfo 368 |
384 | #define __NR_perf_counter_open 369 | ||
384 | 385 | ||
385 | #define __NR_syscall 369 | 386 | #define __NR_syscall 370 |
386 | #define NR_syscalls __NR_syscall | 387 | #define NR_syscalls __NR_syscall |
387 | 388 | ||
388 | /* Old optional stuff no one actually uses */ | 389 | /* Old optional stuff no one actually uses */ |
diff --git a/arch/blackfin/include/asm/user.h b/arch/blackfin/include/asm/user.h index afe6a0e1f7c..4792a60831e 100644 --- a/arch/blackfin/include/asm/user.h +++ b/arch/blackfin/include/asm/user.h | |||
@@ -1,89 +1 @@ | |||
1 | #ifndef _BFIN_USER_H | #include <asm-generic/user.h> | |
2 | #define _BFIN_USER_H | ||
3 | |||
4 | /* Changes by Tony Kou Lineo, Inc. July, 2001 | ||
5 | * | ||
6 | * Based include/asm-m68knommu/user.h | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | /* Core file format: The core file is written in such a way that gdb | ||
11 | can understand it and provide useful information to the user (under | ||
12 | linux we use the 'trad-core' bfd). There are quite a number of | ||
13 | obstacles to being able to view the contents of the floating point | ||
14 | registers, and until these are solved you will not be able to view the | ||
15 | contents of them. Actually, you can read in the core file and look at | ||
16 | the contents of the user struct to find out what the floating point | ||
17 | registers contain. | ||
18 | The actual file contents are as follows: | ||
19 | UPAGE: 1 page consisting of a user struct that tells gdb what is present | ||
20 | in the file. Directly after this is a copy of the task_struct, which | ||
21 | is currently not used by gdb, but it may come in useful at some point. | ||
22 | All of the registers are stored as part of the upage. The upage should | ||
23 | always be only one page. | ||
24 | DATA: The data area is stored. We use current->end_text to | ||
25 | current->brk to pick up all of the user variables, plus any memory | ||
26 | that may have been malloced. No attempt is made to determine if a page | ||
27 | is demand-zero or if a page is totally unused, we just cover the entire | ||
28 | range. All of the addresses are rounded in such a way that an integral | ||
29 | number of pages is written. | ||
30 | STACK: We need the stack information in order to get a meaningful | ||
31 | backtrace. We need to write the data from (esp) to | ||
32 | current->start_stack, so we round each of these off in order to be able | ||
33 | to write an integer number of pages. | ||
34 | The minimum core file size is 3 pages, or 12288 bytes. | ||
35 | */ | ||
36 | struct user_bfinfp_struct { | ||
37 | }; | ||
38 | |||
39 | /* This is the old layout of "struct pt_regs" as of Linux 1.x, and | ||
40 | is still the layout used by user (the new pt_regs doesn't have | ||
41 | all registers). */ | ||
42 | struct user_regs_struct { | ||
43 | long r0, r1, r2, r3, r4, r5, r6, r7; | ||
44 | long p0, p1, p2, p3, p4, p5, usp, fp; | ||
45 | long i0, i1, i2, i3; | ||
46 | long l0, l1, l2, l3; | ||
47 | long b0, b1, b2, b3; | ||
48 | long m0, m1, m2, m3; | ||
49 | long a0w, a1w; | ||
50 | long a0x, a1x; | ||
51 | unsigned long rets; | ||
52 | unsigned long astat; | ||
53 | unsigned long pc; | ||
54 | unsigned long orig_p0; | ||
55 | }; | ||
56 | |||
57 | /* When the kernel dumps core, it starts by dumping the user struct - | ||
58 | this will be used by gdb to figure out where the data and stack segments | ||
59 | are within the file, and what virtual addresses to use. */ | ||
60 | |||
61 | struct user { | ||
62 | /* We start with the registers, to mimic the way that "memory" is returned | ||
63 | from the ptrace(3,...) function. */ | ||
64 | |||
65 | struct user_regs_struct regs; /* Where the registers are actually stored */ | ||
66 | |||
67 | /* The rest of this junk is to help gdb figure out what goes where */ | ||
68 | unsigned long int u_tsize; /* Text segment size (pages). */ | ||
69 | unsigned long int u_dsize; /* Data segment size (pages). */ | ||
70 | unsigned long int u_ssize; /* Stack segment size (pages). */ | ||
71 | unsigned long start_code; /* Starting virtual address of text. */ | ||
72 | unsigned long start_stack; /* Starting virtual address of stack area. | ||
73 | This is actually the bottom of the stack, | ||
74 | the top of the stack is always found in the | ||
75 | esp register. */ | ||
76 | long int signal; /* Signal that caused the core dump. */ | ||
77 | int reserved; /* No longer used */ | ||
78 | unsigned long u_ar0; | ||
79 | /* Used by gdb to help find the values for */ | ||
80 | /* the registers. */ | ||
81 | unsigned long magic; /* To uniquely identify a core file */ | ||
82 | char u_comm[32]; /* User command that was responsible */ | ||
83 | }; | ||
84 | #define NBPG PAGE_SIZE | ||
85 | #define UPAGES 1 | ||
86 | #define HOST_TEXT_START_ADDR (u.start_code) | ||
87 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | ||
88 | |||
89 | #endif | ||