diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-16 22:28:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-16 22:28:15 -0400 |
commit | 47455911674d65fba28d43f4135c28ee40c75bac (patch) | |
tree | bb109710af11a8e499e971a230fff7316cc49095 /include | |
parent | 5379058b718ac6354ba99cc74d10c28d632dc28a (diff) | |
parent | f510aa3bdb095c5253f6bee9e0f5a3a9ac69ded4 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Kconfig: Move missplaced NR_CPUS default from SMTC to VSMP.
[MIPS] Lockdep: Fix recursion bug.
[MIPS] RTLX: Handle copy_*_user return values.
[MIPS] RTLX: Protect rtlx_{read,write} with mutex.
[MIPS] RTLX: Harden against compiler reordering and optimization.
[MIPS] RTLX: Don't use volatile; it's fragile.
[MIPS] Lasat: Downgrade 64-bit kernel from experimental to broken.
[MIPS] Compat: Fix build if CONFIG_SYSVIPC is disabled.
[CHAR] lcd: Fix two warnings.
[MIPS] FPU ownership management & preemption fixes
[MIPS] Check FCSR for pending interrupts, alternative version
[MIPS] IP27, IP35: Fix warnings.
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/atomic.h | 40 | ||||
-rw-r--r-- | include/asm-mips/bitops.h | 24 | ||||
-rw-r--r-- | include/asm-mips/cpu-features.h | 3 | ||||
-rw-r--r-- | include/asm-mips/cpu-info.h | 1 | ||||
-rw-r--r-- | include/asm-mips/fpu.h | 54 | ||||
-rw-r--r-- | include/asm-mips/mach-ip27/dma-coherence.h | 5 | ||||
-rw-r--r-- | include/asm-mips/mach-ip32/dma-coherence.h | 5 | ||||
-rw-r--r-- | include/asm-mips/rtlx.h | 4 | ||||
-rw-r--r-- | include/asm-mips/system.h | 16 | ||||
-rw-r--r-- | include/asm-mips/thread_info.h | 1 |
10 files changed, 96 insertions, 57 deletions
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index 8578869a8bcf..1ac50b6c47ad 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h | |||
@@ -79,9 +79,9 @@ static __inline__ void atomic_add(int i, atomic_t * v) | |||
79 | } else { | 79 | } else { |
80 | unsigned long flags; | 80 | unsigned long flags; |
81 | 81 | ||
82 | local_irq_save(flags); | 82 | raw_local_irq_save(flags); |
83 | v->counter += i; | 83 | v->counter += i; |
84 | local_irq_restore(flags); | 84 | raw_local_irq_restore(flags); |
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
@@ -124,9 +124,9 @@ static __inline__ void atomic_sub(int i, atomic_t * v) | |||
124 | } else { | 124 | } else { |
125 | unsigned long flags; | 125 | unsigned long flags; |
126 | 126 | ||
127 | local_irq_save(flags); | 127 | raw_local_irq_save(flags); |
128 | v->counter -= i; | 128 | v->counter -= i; |
129 | local_irq_restore(flags); | 129 | raw_local_irq_restore(flags); |
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
@@ -173,11 +173,11 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) | |||
173 | } else { | 173 | } else { |
174 | unsigned long flags; | 174 | unsigned long flags; |
175 | 175 | ||
176 | local_irq_save(flags); | 176 | raw_local_irq_save(flags); |
177 | result = v->counter; | 177 | result = v->counter; |
178 | result += i; | 178 | result += i; |
179 | v->counter = result; | 179 | v->counter = result; |
180 | local_irq_restore(flags); | 180 | raw_local_irq_restore(flags); |
181 | } | 181 | } |
182 | 182 | ||
183 | smp_mb(); | 183 | smp_mb(); |
@@ -225,11 +225,11 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
225 | } else { | 225 | } else { |
226 | unsigned long flags; | 226 | unsigned long flags; |
227 | 227 | ||
228 | local_irq_save(flags); | 228 | raw_local_irq_save(flags); |
229 | result = v->counter; | 229 | result = v->counter; |
230 | result -= i; | 230 | result -= i; |
231 | v->counter = result; | 231 | v->counter = result; |
232 | local_irq_restore(flags); | 232 | raw_local_irq_restore(flags); |
233 | } | 233 | } |
234 | 234 | ||
235 | smp_mb(); | 235 | smp_mb(); |
@@ -293,12 +293,12 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
293 | } else { | 293 | } else { |
294 | unsigned long flags; | 294 | unsigned long flags; |
295 | 295 | ||
296 | local_irq_save(flags); | 296 | raw_local_irq_save(flags); |
297 | result = v->counter; | 297 | result = v->counter; |
298 | result -= i; | 298 | result -= i; |
299 | if (result >= 0) | 299 | if (result >= 0) |
300 | v->counter = result; | 300 | v->counter = result; |
301 | local_irq_restore(flags); | 301 | raw_local_irq_restore(flags); |
302 | } | 302 | } |
303 | 303 | ||
304 | smp_mb(); | 304 | smp_mb(); |
@@ -454,9 +454,9 @@ static __inline__ void atomic64_add(long i, atomic64_t * v) | |||
454 | } else { | 454 | } else { |
455 | unsigned long flags; | 455 | unsigned long flags; |
456 | 456 | ||
457 | local_irq_save(flags); | 457 | raw_local_irq_save(flags); |
458 | v->counter += i; | 458 | v->counter += i; |
459 | local_irq_restore(flags); | 459 | raw_local_irq_restore(flags); |
460 | } | 460 | } |
461 | } | 461 | } |
462 | 462 | ||
@@ -499,9 +499,9 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) | |||
499 | } else { | 499 | } else { |
500 | unsigned long flags; | 500 | unsigned long flags; |
501 | 501 | ||
502 | local_irq_save(flags); | 502 | raw_local_irq_save(flags); |
503 | v->counter -= i; | 503 | v->counter -= i; |
504 | local_irq_restore(flags); | 504 | raw_local_irq_restore(flags); |
505 | } | 505 | } |
506 | } | 506 | } |
507 | 507 | ||
@@ -548,11 +548,11 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) | |||
548 | } else { | 548 | } else { |
549 | unsigned long flags; | 549 | unsigned long flags; |
550 | 550 | ||
551 | local_irq_save(flags); | 551 | raw_local_irq_save(flags); |
552 | result = v->counter; | 552 | result = v->counter; |
553 | result += i; | 553 | result += i; |
554 | v->counter = result; | 554 | v->counter = result; |
555 | local_irq_restore(flags); | 555 | raw_local_irq_restore(flags); |
556 | } | 556 | } |
557 | 557 | ||
558 | smp_mb(); | 558 | smp_mb(); |
@@ -600,11 +600,11 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
600 | } else { | 600 | } else { |
601 | unsigned long flags; | 601 | unsigned long flags; |
602 | 602 | ||
603 | local_irq_save(flags); | 603 | raw_local_irq_save(flags); |
604 | result = v->counter; | 604 | result = v->counter; |
605 | result -= i; | 605 | result -= i; |
606 | v->counter = result; | 606 | v->counter = result; |
607 | local_irq_restore(flags); | 607 | raw_local_irq_restore(flags); |
608 | } | 608 | } |
609 | 609 | ||
610 | smp_mb(); | 610 | smp_mb(); |
@@ -668,12 +668,12 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
668 | } else { | 668 | } else { |
669 | unsigned long flags; | 669 | unsigned long flags; |
670 | 670 | ||
671 | local_irq_save(flags); | 671 | raw_local_irq_save(flags); |
672 | result = v->counter; | 672 | result = v->counter; |
673 | result -= i; | 673 | result -= i; |
674 | if (result >= 0) | 674 | if (result >= 0) |
675 | v->counter = result; | 675 | v->counter = result; |
676 | local_irq_restore(flags); | 676 | raw_local_irq_restore(flags); |
677 | } | 677 | } |
678 | 678 | ||
679 | smp_mb(); | 679 | smp_mb(); |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 8959da245cfb..d995413e11fd 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -100,9 +100,9 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
100 | 100 | ||
101 | a += nr >> SZLONG_LOG; | 101 | a += nr >> SZLONG_LOG; |
102 | mask = 1UL << bit; | 102 | mask = 1UL << bit; |
103 | local_irq_save(flags); | 103 | raw_local_irq_save(flags); |
104 | *a |= mask; | 104 | *a |= mask; |
105 | local_irq_restore(flags); | 105 | raw_local_irq_restore(flags); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
@@ -165,9 +165,9 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
165 | 165 | ||
166 | a += nr >> SZLONG_LOG; | 166 | a += nr >> SZLONG_LOG; |
167 | mask = 1UL << bit; | 167 | mask = 1UL << bit; |
168 | local_irq_save(flags); | 168 | raw_local_irq_save(flags); |
169 | *a &= ~mask; | 169 | *a &= ~mask; |
170 | local_irq_restore(flags); | 170 | raw_local_irq_restore(flags); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
@@ -220,9 +220,9 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) | |||
220 | 220 | ||
221 | a += nr >> SZLONG_LOG; | 221 | a += nr >> SZLONG_LOG; |
222 | mask = 1UL << bit; | 222 | mask = 1UL << bit; |
223 | local_irq_save(flags); | 223 | raw_local_irq_save(flags); |
224 | *a ^= mask; | 224 | *a ^= mask; |
225 | local_irq_restore(flags); | 225 | raw_local_irq_restore(flags); |
226 | } | 226 | } |
227 | } | 227 | } |
228 | 228 | ||
@@ -287,10 +287,10 @@ static inline int test_and_set_bit(unsigned long nr, | |||
287 | 287 | ||
288 | a += nr >> SZLONG_LOG; | 288 | a += nr >> SZLONG_LOG; |
289 | mask = 1UL << bit; | 289 | mask = 1UL << bit; |
290 | local_irq_save(flags); | 290 | raw_local_irq_save(flags); |
291 | retval = (mask & *a) != 0; | 291 | retval = (mask & *a) != 0; |
292 | *a |= mask; | 292 | *a |= mask; |
293 | local_irq_restore(flags); | 293 | raw_local_irq_restore(flags); |
294 | 294 | ||
295 | return retval; | 295 | return retval; |
296 | } | 296 | } |
@@ -381,10 +381,10 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
381 | 381 | ||
382 | a += nr >> SZLONG_LOG; | 382 | a += nr >> SZLONG_LOG; |
383 | mask = 1UL << bit; | 383 | mask = 1UL << bit; |
384 | local_irq_save(flags); | 384 | raw_local_irq_save(flags); |
385 | retval = (mask & *a) != 0; | 385 | retval = (mask & *a) != 0; |
386 | *a &= ~mask; | 386 | *a &= ~mask; |
387 | local_irq_restore(flags); | 387 | raw_local_irq_restore(flags); |
388 | 388 | ||
389 | return retval; | 389 | return retval; |
390 | } | 390 | } |
@@ -452,10 +452,10 @@ static inline int test_and_change_bit(unsigned long nr, | |||
452 | 452 | ||
453 | a += nr >> SZLONG_LOG; | 453 | a += nr >> SZLONG_LOG; |
454 | mask = 1UL << bit; | 454 | mask = 1UL << bit; |
455 | local_irq_save(flags); | 455 | raw_local_irq_save(flags); |
456 | retval = (mask & *a) != 0; | 456 | retval = (mask & *a) != 0; |
457 | *a ^= mask; | 457 | *a ^= mask; |
458 | local_irq_restore(flags); | 458 | raw_local_irq_restore(flags); |
459 | 459 | ||
460 | return retval; | 460 | return retval; |
461 | } | 461 | } |
diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h index eadca266f159..5e4bed123b48 100644 --- a/include/asm-mips/cpu-features.h +++ b/include/asm-mips/cpu-features.h | |||
@@ -40,6 +40,9 @@ | |||
40 | #endif | 40 | #endif |
41 | #ifndef cpu_has_fpu | 41 | #ifndef cpu_has_fpu |
42 | #define cpu_has_fpu (current_cpu_data.options & MIPS_CPU_FPU) | 42 | #define cpu_has_fpu (current_cpu_data.options & MIPS_CPU_FPU) |
43 | #define raw_cpu_has_fpu (raw_current_cpu_data.options & MIPS_CPU_FPU) | ||
44 | #else | ||
45 | #define raw_cpu_has_fpu cpu_has_fpu | ||
43 | #endif | 46 | #endif |
44 | #ifndef cpu_has_32fpr | 47 | #ifndef cpu_has_32fpr |
45 | #define cpu_has_32fpr (cpu_data[0].options & MIPS_CPU_32FPR) | 48 | #define cpu_has_32fpr (cpu_data[0].options & MIPS_CPU_32FPR) |
diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h index 610d0cdeaa9e..22fe8453fcc7 100644 --- a/include/asm-mips/cpu-info.h +++ b/include/asm-mips/cpu-info.h | |||
@@ -87,6 +87,7 @@ struct cpuinfo_mips { | |||
87 | 87 | ||
88 | extern struct cpuinfo_mips cpu_data[]; | 88 | extern struct cpuinfo_mips cpu_data[]; |
89 | #define current_cpu_data cpu_data[smp_processor_id()] | 89 | #define current_cpu_data cpu_data[smp_processor_id()] |
90 | #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] | ||
90 | 91 | ||
91 | extern void cpu_probe(void); | 92 | extern void cpu_probe(void); |
92 | extern void cpu_report(void); | 93 | extern void cpu_report(void); |
diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h index efef843b93f0..4e12d1f9534f 100644 --- a/include/asm-mips/fpu.h +++ b/include/asm-mips/fpu.h | |||
@@ -27,11 +27,11 @@ | |||
27 | struct sigcontext; | 27 | struct sigcontext; |
28 | struct sigcontext32; | 28 | struct sigcontext32; |
29 | 29 | ||
30 | extern asmlinkage int (*save_fp_context)(struct sigcontext *sc); | 30 | extern asmlinkage int (*save_fp_context)(struct sigcontext __user *sc); |
31 | extern asmlinkage int (*restore_fp_context)(struct sigcontext *sc); | 31 | extern asmlinkage int (*restore_fp_context)(struct sigcontext __user *sc); |
32 | 32 | ||
33 | extern asmlinkage int (*save_fp_context32)(struct sigcontext32 *sc); | 33 | extern asmlinkage int (*save_fp_context32)(struct sigcontext32 __user *sc); |
34 | extern asmlinkage int (*restore_fp_context32)(struct sigcontext32 *sc); | 34 | extern asmlinkage int (*restore_fp_context32)(struct sigcontext32 __user *sc); |
35 | 35 | ||
36 | extern void fpu_emulator_init_fpu(void); | 36 | extern void fpu_emulator_init_fpu(void); |
37 | extern void _init_fpu(void); | 37 | extern void _init_fpu(void); |
@@ -68,6 +68,8 @@ do { \ | |||
68 | /* We don't care about the c0 hazard here */ \ | 68 | /* We don't care about the c0 hazard here */ \ |
69 | } while (0) | 69 | } while (0) |
70 | 70 | ||
71 | #define __fpu_enabled() (read_c0_status() & ST0_CU1) | ||
72 | |||
71 | #define enable_fpu() \ | 73 | #define enable_fpu() \ |
72 | do { \ | 74 | do { \ |
73 | if (cpu_has_fpu) \ | 75 | if (cpu_has_fpu) \ |
@@ -93,31 +95,47 @@ static inline int is_fpu_owner(void) | |||
93 | return cpu_has_fpu && __is_fpu_owner(); | 95 | return cpu_has_fpu && __is_fpu_owner(); |
94 | } | 96 | } |
95 | 97 | ||
96 | static inline void own_fpu(void) | 98 | static inline void __own_fpu(void) |
97 | { | 99 | { |
98 | if (cpu_has_fpu) { | 100 | __enable_fpu(); |
99 | __enable_fpu(); | 101 | KSTK_STATUS(current) |= ST0_CU1; |
100 | KSTK_STATUS(current) |= ST0_CU1; | 102 | set_thread_flag(TIF_USEDFPU); |
101 | set_thread_flag(TIF_USEDFPU); | 103 | } |
104 | |||
105 | static inline void own_fpu(int restore) | ||
106 | { | ||
107 | preempt_disable(); | ||
108 | if (cpu_has_fpu && !__is_fpu_owner()) { | ||
109 | __own_fpu(); | ||
110 | if (restore) | ||
111 | _restore_fp(current); | ||
102 | } | 112 | } |
113 | preempt_enable(); | ||
103 | } | 114 | } |
104 | 115 | ||
105 | static inline void lose_fpu(void) | 116 | static inline void lose_fpu(int save) |
106 | { | 117 | { |
107 | if (cpu_has_fpu) { | 118 | preempt_disable(); |
119 | if (is_fpu_owner()) { | ||
120 | if (save) | ||
121 | _save_fp(current); | ||
108 | KSTK_STATUS(current) &= ~ST0_CU1; | 122 | KSTK_STATUS(current) &= ~ST0_CU1; |
109 | clear_thread_flag(TIF_USEDFPU); | 123 | clear_thread_flag(TIF_USEDFPU); |
110 | __disable_fpu(); | 124 | __disable_fpu(); |
111 | } | 125 | } |
126 | preempt_enable(); | ||
112 | } | 127 | } |
113 | 128 | ||
114 | static inline void init_fpu(void) | 129 | static inline void init_fpu(void) |
115 | { | 130 | { |
131 | preempt_disable(); | ||
116 | if (cpu_has_fpu) { | 132 | if (cpu_has_fpu) { |
133 | __own_fpu(); | ||
117 | _init_fpu(); | 134 | _init_fpu(); |
118 | } else { | 135 | } else { |
119 | fpu_emulator_init_fpu(); | 136 | fpu_emulator_init_fpu(); |
120 | } | 137 | } |
138 | preempt_enable(); | ||
121 | } | 139 | } |
122 | 140 | ||
123 | static inline void save_fp(struct task_struct *tsk) | 141 | static inline void save_fp(struct task_struct *tsk) |
@@ -144,4 +162,18 @@ static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) | |||
144 | return tsk->thread.fpu.fpr; | 162 | return tsk->thread.fpu.fpr; |
145 | } | 163 | } |
146 | 164 | ||
165 | static inline void enable_fp_in_kernel(void) | ||
166 | { | ||
167 | set_thread_flag(TIF_ALLOW_FP_IN_KERNEL); | ||
168 | /* make sure CU1 and FPU ownership are consistent */ | ||
169 | if (!__is_fpu_owner() && __fpu_enabled()) | ||
170 | __disable_fpu(); | ||
171 | } | ||
172 | |||
173 | static inline void disable_fp_in_kernel(void) | ||
174 | { | ||
175 | BUG_ON(!__is_fpu_owner() && __fpu_enabled()); | ||
176 | clear_thread_flag(TIF_ALLOW_FP_IN_KERNEL); | ||
177 | } | ||
178 | |||
147 | #endif /* _ASM_FPU_H */ | 179 | #endif /* _ASM_FPU_H */ |
diff --git a/include/asm-mips/mach-ip27/dma-coherence.h b/include/asm-mips/mach-ip27/dma-coherence.h index 659816e200d4..3fdbbf68e952 100644 --- a/include/asm-mips/mach-ip27/dma-coherence.h +++ b/include/asm-mips/mach-ip27/dma-coherence.h | |||
@@ -18,7 +18,8 @@ | |||
18 | 18 | ||
19 | struct device; | 19 | struct device; |
20 | 20 | ||
21 | static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) | 21 | static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, |
22 | size_t size) | ||
22 | { | 23 | { |
23 | dma_addr_t pa = dev_to_baddr(dev, virt_to_phys(addr)); | 24 | dma_addr_t pa = dev_to_baddr(dev, virt_to_phys(addr)); |
24 | 25 | ||
@@ -37,7 +38,7 @@ static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | |||
37 | return dma_addr & (0xffUL << 56); | 38 | return dma_addr & (0xffUL << 56); |
38 | } | 39 | } |
39 | 40 | ||
40 | static void plat_unmap_dma_mem(dma_addr_t dma_addr) | 41 | static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) |
41 | { | 42 | { |
42 | } | 43 | } |
43 | 44 | ||
diff --git a/include/asm-mips/mach-ip32/dma-coherence.h b/include/asm-mips/mach-ip32/dma-coherence.h index 950be17bbb86..c3f9a6a20eb0 100644 --- a/include/asm-mips/mach-ip32/dma-coherence.h +++ b/include/asm-mips/mach-ip32/dma-coherence.h | |||
@@ -26,7 +26,8 @@ struct device; | |||
26 | 26 | ||
27 | #define RAM_OFFSET_MASK 0x3fffffffUL | 27 | #define RAM_OFFSET_MASK 0x3fffffffUL |
28 | 28 | ||
29 | static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) | 29 | static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, |
30 | size_t size) | ||
30 | { | 31 | { |
31 | dma_addr_t pa = virt_to_phys(addr) & RAM_OFFSET_MASK; | 32 | dma_addr_t pa = virt_to_phys(addr) & RAM_OFFSET_MASK; |
32 | 33 | ||
@@ -59,7 +60,7 @@ static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | |||
59 | return addr; | 60 | return addr; |
60 | } | 61 | } |
61 | 62 | ||
62 | static void plat_unmap_dma_mem(dma_addr_t dma_addr) | 63 | static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) |
63 | { | 64 | { |
64 | } | 65 | } |
65 | 66 | ||
diff --git a/include/asm-mips/rtlx.h b/include/asm-mips/rtlx.h index 59162f74a798..65778c890a62 100644 --- a/include/asm-mips/rtlx.h +++ b/include/asm-mips/rtlx.h | |||
@@ -23,8 +23,8 @@ | |||
23 | 23 | ||
24 | extern int rtlx_open(int index, int can_sleep); | 24 | extern int rtlx_open(int index, int can_sleep); |
25 | extern int rtlx_release(int index); | 25 | extern int rtlx_release(int index); |
26 | extern ssize_t rtlx_read(int index, void *buff, size_t count, int user); | 26 | extern ssize_t rtlx_read(int index, void __user *buff, size_t count); |
27 | extern ssize_t rtlx_write(int index, void *buffer, size_t count, int user); | 27 | extern ssize_t rtlx_write(int index, const void __user *buffer, size_t count); |
28 | extern unsigned int rtlx_read_poll(int index, int can_sleep); | 28 | extern unsigned int rtlx_read_poll(int index, int can_sleep); |
29 | extern unsigned int rtlx_write_poll(int index); | 29 | extern unsigned int rtlx_write_poll(int index); |
30 | 30 | ||
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 597a3743f6a1..290887077e44 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -121,10 +121,10 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) | |||
121 | } else { | 121 | } else { |
122 | unsigned long flags; | 122 | unsigned long flags; |
123 | 123 | ||
124 | local_irq_save(flags); | 124 | raw_local_irq_save(flags); |
125 | retval = *m; | 125 | retval = *m; |
126 | *m = val; | 126 | *m = val; |
127 | local_irq_restore(flags); /* implies memory barrier */ | 127 | raw_local_irq_restore(flags); /* implies memory barrier */ |
128 | } | 128 | } |
129 | 129 | ||
130 | smp_mb(); | 130 | smp_mb(); |
@@ -169,10 +169,10 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) | |||
169 | } else { | 169 | } else { |
170 | unsigned long flags; | 170 | unsigned long flags; |
171 | 171 | ||
172 | local_irq_save(flags); | 172 | raw_local_irq_save(flags); |
173 | retval = *m; | 173 | retval = *m; |
174 | *m = val; | 174 | *m = val; |
175 | local_irq_restore(flags); /* implies memory barrier */ | 175 | raw_local_irq_restore(flags); /* implies memory barrier */ |
176 | } | 176 | } |
177 | 177 | ||
178 | smp_mb(); | 178 | smp_mb(); |
@@ -250,11 +250,11 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, | |||
250 | } else { | 250 | } else { |
251 | unsigned long flags; | 251 | unsigned long flags; |
252 | 252 | ||
253 | local_irq_save(flags); | 253 | raw_local_irq_save(flags); |
254 | retval = *m; | 254 | retval = *m; |
255 | if (retval == old) | 255 | if (retval == old) |
256 | *m = new; | 256 | *m = new; |
257 | local_irq_restore(flags); /* implies memory barrier */ | 257 | raw_local_irq_restore(flags); /* implies memory barrier */ |
258 | } | 258 | } |
259 | 259 | ||
260 | smp_mb(); | 260 | smp_mb(); |
@@ -304,11 +304,11 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, | |||
304 | } else { | 304 | } else { |
305 | unsigned long flags; | 305 | unsigned long flags; |
306 | 306 | ||
307 | local_irq_save(flags); | 307 | raw_local_irq_save(flags); |
308 | retval = *m; | 308 | retval = *m; |
309 | if (retval == old) | 309 | if (retval == old) |
310 | *m = new; | 310 | *m = new; |
311 | local_irq_restore(flags); /* implies memory barrier */ | 311 | raw_local_irq_restore(flags); /* implies memory barrier */ |
312 | } | 312 | } |
313 | 313 | ||
314 | smp_mb(); | 314 | smp_mb(); |
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index fbcda8204473..6cf05f4a4e7e 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h | |||
@@ -119,6 +119,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
119 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 119 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
120 | #define TIF_MEMDIE 18 | 120 | #define TIF_MEMDIE 18 |
121 | #define TIF_FREEZE 19 | 121 | #define TIF_FREEZE 19 |
122 | #define TIF_ALLOW_FP_IN_KERNEL 20 | ||
122 | #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ | 123 | #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ |
123 | 124 | ||
124 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 125 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |