diff options
-rw-r--r-- | arch/mips/Kconfig | 11 | ||||
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 26 | ||||
-rw-r--r-- | arch/mips/kernel/process.c | 14 | ||||
-rw-r--r-- | include/asm-mips/atomic.h | 33 | ||||
-rw-r--r-- | include/asm-mips/barrier.h | 9 | ||||
-rw-r--r-- | include/asm-mips/bitops.h | 10 | ||||
-rw-r--r-- | include/asm-mips/ds1216.h | 31 | ||||
-rw-r--r-- | include/asm-mips/futex.h | 8 | ||||
-rw-r--r-- | include/asm-mips/gfx.h | 55 | ||||
-rw-r--r-- | include/asm-mips/mach-cobalt/cpu-feature-overrides.h | 4 | ||||
-rw-r--r-- | include/asm-mips/mach-excite/cpu-feature-overrides.h | 3 | ||||
-rw-r--r-- | include/asm-mips/mach-ip22/cpu-feature-overrides.h | 4 | ||||
-rw-r--r-- | include/asm-mips/mach-ip27/cpu-feature-overrides.h | 4 | ||||
-rw-r--r-- | include/asm-mips/mach-ip32/cpu-feature-overrides.h | 4 | ||||
-rw-r--r-- | include/asm-mips/mach-qemu/cpu-feature-overrides.h | 3 | ||||
-rw-r--r-- | include/asm-mips/mach-rm/cpu-feature-overrides.h | 4 | ||||
-rw-r--r-- | include/asm-mips/mach-sibyte/cpu-feature-overrides.h | 4 | ||||
-rw-r--r-- | include/asm-mips/mach-yosemite/cpu-feature-overrides.h | 4 | ||||
-rw-r--r-- | include/asm-mips/spinlock.h | 18 | ||||
-rw-r--r-- | include/asm-mips/system.h | 10 |
20 files changed, 125 insertions, 134 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 5c863bcd5614..1e3aeccd7322 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1190,8 +1190,19 @@ config SYS_HAS_CPU_RM9000 | |||
1190 | config SYS_HAS_CPU_SB1 | 1190 | config SYS_HAS_CPU_SB1 |
1191 | bool | 1191 | bool |
1192 | 1192 | ||
1193 | # | ||
1194 | # CPU may reorder R->R, R->W, W->R, W->W | ||
1195 | # Reordering beyond LL and SC is handled in WEAK_REORDERING_BEYOND_LLSC | ||
1196 | # | ||
1193 | config WEAK_ORDERING | 1197 | config WEAK_ORDERING |
1194 | bool | 1198 | bool |
1199 | |||
1200 | # | ||
1201 | # CPU may reorder reads and writes beyond LL/SC | ||
1202 | # CPU may reorder R->LL, R->LL, W->LL, W->LL, R->SC, R->SC, W->SC, W->SC | ||
1203 | # | ||
1204 | config WEAK_REORDERING_BEYOND_LLSC | ||
1205 | bool | ||
1195 | endmenu | 1206 | endmenu |
1196 | 1207 | ||
1197 | # | 1208 | # |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index c6b8b074a81a..06448a9656dc 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -75,6 +75,27 @@ static void r4k_wait_irqoff(void) | |||
75 | local_irq_enable(); | 75 | local_irq_enable(); |
76 | } | 76 | } |
77 | 77 | ||
78 | /* | ||
79 | * The RM7000 variant has to handle erratum 38. The workaround is to not | ||
80 | * have any pending stores when the WAIT instruction is executed. | ||
81 | */ | ||
82 | static void rm7k_wait_irqoff(void) | ||
83 | { | ||
84 | local_irq_disable(); | ||
85 | if (!need_resched()) | ||
86 | __asm__( | ||
87 | " .set push \n" | ||
88 | " .set mips3 \n" | ||
89 | " .set noat \n" | ||
90 | " mfc0 $1, $12 \n" | ||
91 | " sync \n" | ||
92 | " mtc0 $1, $12 # stalls until W stage \n" | ||
93 | " wait \n" | ||
94 | " mtc0 $1, $12 # stalls until W stage \n" | ||
95 | " .set pop \n"); | ||
96 | local_irq_enable(); | ||
97 | } | ||
98 | |||
78 | /* The Au1xxx wait is available only if using 32khz counter or | 99 | /* The Au1xxx wait is available only if using 32khz counter or |
79 | * external timer source, but specifically not CP0 Counter. */ | 100 | * external timer source, but specifically not CP0 Counter. */ |
80 | int allow_au1k_wait; | 101 | int allow_au1k_wait; |
@@ -132,7 +153,6 @@ static inline void check_wait(void) | |||
132 | case CPU_R4700: | 153 | case CPU_R4700: |
133 | case CPU_R5000: | 154 | case CPU_R5000: |
134 | case CPU_NEVADA: | 155 | case CPU_NEVADA: |
135 | case CPU_RM7000: | ||
136 | case CPU_4KC: | 156 | case CPU_4KC: |
137 | case CPU_4KEC: | 157 | case CPU_4KEC: |
138 | case CPU_4KSC: | 158 | case CPU_4KSC: |
@@ -142,6 +162,10 @@ static inline void check_wait(void) | |||
142 | cpu_wait = r4k_wait; | 162 | cpu_wait = r4k_wait; |
143 | break; | 163 | break; |
144 | 164 | ||
165 | case CPU_RM7000: | ||
166 | cpu_wait = rm7k_wait_irqoff; | ||
167 | break; | ||
168 | |||
145 | case CPU_24K: | 169 | case CPU_24K: |
146 | case CPU_34K: | 170 | case CPU_34K: |
147 | cpu_wait = r4k_wait; | 171 | cpu_wait = r4k_wait; |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 8f4cf27c7157..bd05f5a927ea 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -25,7 +25,9 @@ | |||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/completion.h> | 26 | #include <linux/completion.h> |
27 | #include <linux/kallsyms.h> | 27 | #include <linux/kallsyms.h> |
28 | #include <linux/random.h> | ||
28 | 29 | ||
30 | #include <asm/asm.h> | ||
29 | #include <asm/bootinfo.h> | 31 | #include <asm/bootinfo.h> |
30 | #include <asm/cpu.h> | 32 | #include <asm/cpu.h> |
31 | #include <asm/dsp.h> | 33 | #include <asm/dsp.h> |
@@ -460,3 +462,15 @@ unsigned long get_wchan(struct task_struct *task) | |||
460 | out: | 462 | out: |
461 | return pc; | 463 | return pc; |
462 | } | 464 | } |
465 | |||
466 | /* | ||
467 | * Don't forget that the stack pointer must be aligned on a 8 bytes | ||
468 | * boundary for 32-bits ABI and 16 bytes for 64-bits ABI. | ||
469 | */ | ||
470 | unsigned long arch_align_stack(unsigned long sp) | ||
471 | { | ||
472 | if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) | ||
473 | sp -= get_random_int() & ~PAGE_MASK; | ||
474 | |||
475 | return sp & ALMASK; | ||
476 | } | ||
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index 1b60624dab7e..7d8003769a44 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h | |||
@@ -138,7 +138,7 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) | |||
138 | { | 138 | { |
139 | unsigned long result; | 139 | unsigned long result; |
140 | 140 | ||
141 | smp_mb(); | 141 | smp_llsc_mb(); |
142 | 142 | ||
143 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 143 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
144 | unsigned long temp; | 144 | unsigned long temp; |
@@ -181,7 +181,7 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) | |||
181 | raw_local_irq_restore(flags); | 181 | raw_local_irq_restore(flags); |
182 | } | 182 | } |
183 | 183 | ||
184 | smp_mb(); | 184 | smp_llsc_mb(); |
185 | 185 | ||
186 | return result; | 186 | return result; |
187 | } | 187 | } |
@@ -190,7 +190,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
190 | { | 190 | { |
191 | unsigned long result; | 191 | unsigned long result; |
192 | 192 | ||
193 | smp_mb(); | 193 | smp_llsc_mb(); |
194 | 194 | ||
195 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 195 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
196 | unsigned long temp; | 196 | unsigned long temp; |
@@ -233,7 +233,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
233 | raw_local_irq_restore(flags); | 233 | raw_local_irq_restore(flags); |
234 | } | 234 | } |
235 | 235 | ||
236 | smp_mb(); | 236 | smp_llsc_mb(); |
237 | 237 | ||
238 | return result; | 238 | return result; |
239 | } | 239 | } |
@@ -250,7 +250,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
250 | { | 250 | { |
251 | unsigned long result; | 251 | unsigned long result; |
252 | 252 | ||
253 | smp_mb(); | 253 | smp_llsc_mb(); |
254 | 254 | ||
255 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 255 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
256 | unsigned long temp; | 256 | unsigned long temp; |
@@ -302,7 +302,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
302 | raw_local_irq_restore(flags); | 302 | raw_local_irq_restore(flags); |
303 | } | 303 | } |
304 | 304 | ||
305 | smp_mb(); | 305 | smp_llsc_mb(); |
306 | 306 | ||
307 | return result; | 307 | return result; |
308 | } | 308 | } |
@@ -519,7 +519,7 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) | |||
519 | { | 519 | { |
520 | unsigned long result; | 520 | unsigned long result; |
521 | 521 | ||
522 | smp_mb(); | 522 | smp_llsc_mb(); |
523 | 523 | ||
524 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 524 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
525 | unsigned long temp; | 525 | unsigned long temp; |
@@ -562,7 +562,7 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) | |||
562 | raw_local_irq_restore(flags); | 562 | raw_local_irq_restore(flags); |
563 | } | 563 | } |
564 | 564 | ||
565 | smp_mb(); | 565 | smp_llsc_mb(); |
566 | 566 | ||
567 | return result; | 567 | return result; |
568 | } | 568 | } |
@@ -571,7 +571,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
571 | { | 571 | { |
572 | unsigned long result; | 572 | unsigned long result; |
573 | 573 | ||
574 | smp_mb(); | 574 | smp_llsc_mb(); |
575 | 575 | ||
576 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 576 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
577 | unsigned long temp; | 577 | unsigned long temp; |
@@ -614,7 +614,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
614 | raw_local_irq_restore(flags); | 614 | raw_local_irq_restore(flags); |
615 | } | 615 | } |
616 | 616 | ||
617 | smp_mb(); | 617 | smp_llsc_mb(); |
618 | 618 | ||
619 | return result; | 619 | return result; |
620 | } | 620 | } |
@@ -631,7 +631,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
631 | { | 631 | { |
632 | unsigned long result; | 632 | unsigned long result; |
633 | 633 | ||
634 | smp_mb(); | 634 | smp_llsc_mb(); |
635 | 635 | ||
636 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 636 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
637 | unsigned long temp; | 637 | unsigned long temp; |
@@ -683,7 +683,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
683 | raw_local_irq_restore(flags); | 683 | raw_local_irq_restore(flags); |
684 | } | 684 | } |
685 | 685 | ||
686 | smp_mb(); | 686 | smp_llsc_mb(); |
687 | 687 | ||
688 | return result; | 688 | return result; |
689 | } | 689 | } |
@@ -791,10 +791,11 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
791 | * atomic*_return operations are serializing but not the non-*_return | 791 | * atomic*_return operations are serializing but not the non-*_return |
792 | * versions. | 792 | * versions. |
793 | */ | 793 | */ |
794 | #define smp_mb__before_atomic_dec() smp_mb() | 794 | #define smp_mb__before_atomic_dec() smp_llsc_mb() |
795 | #define smp_mb__after_atomic_dec() smp_mb() | 795 | #define smp_mb__after_atomic_dec() smp_llsc_mb() |
796 | #define smp_mb__before_atomic_inc() smp_mb() | 796 | #define smp_mb__before_atomic_inc() smp_llsc_mb() |
797 | #define smp_mb__after_atomic_inc() smp_mb() | 797 | #define smp_mb__after_atomic_inc() smp_llsc_mb() |
798 | 798 | ||
799 | #include <asm-generic/atomic.h> | 799 | #include <asm-generic/atomic.h> |
800 | |||
800 | #endif /* _ASM_ATOMIC_H */ | 801 | #endif /* _ASM_ATOMIC_H */ |
diff --git a/include/asm-mips/barrier.h b/include/asm-mips/barrier.h index ed82631b0017..9d8cfbb5e796 100644 --- a/include/asm-mips/barrier.h +++ b/include/asm-mips/barrier.h | |||
@@ -121,6 +121,11 @@ | |||
121 | #else | 121 | #else |
122 | #define __WEAK_ORDERING_MB " \n" | 122 | #define __WEAK_ORDERING_MB " \n" |
123 | #endif | 123 | #endif |
124 | #if defined(CONFIG_WEAK_REORDERING_BEYOND_LLSC) && defined(CONFIG_SMP) | ||
125 | #define __WEAK_LLSC_MB " sync \n" | ||
126 | #else | ||
127 | #define __WEAK_LLSC_MB " \n" | ||
128 | #endif | ||
124 | 129 | ||
125 | #define smp_mb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") | 130 | #define smp_mb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") |
126 | #define smp_rmb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") | 131 | #define smp_rmb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") |
@@ -129,4 +134,8 @@ | |||
129 | #define set_mb(var, value) \ | 134 | #define set_mb(var, value) \ |
130 | do { var = value; smp_mb(); } while (0) | 135 | do { var = value; smp_mb(); } while (0) |
131 | 136 | ||
137 | #define smp_llsc_mb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory") | ||
138 | #define smp_llsc_rmb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory") | ||
139 | #define smp_llsc_wmb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory") | ||
140 | |||
132 | #endif /* __ASM_BARRIER_H */ | 141 | #endif /* __ASM_BARRIER_H */ |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index d9e81af53f78..148bc79557f1 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -38,8 +38,8 @@ | |||
38 | /* | 38 | /* |
39 | * clear_bit() doesn't provide any barrier for the compiler. | 39 | * clear_bit() doesn't provide any barrier for the compiler. |
40 | */ | 40 | */ |
41 | #define smp_mb__before_clear_bit() smp_mb() | 41 | #define smp_mb__before_clear_bit() smp_llsc_mb() |
42 | #define smp_mb__after_clear_bit() smp_mb() | 42 | #define smp_mb__after_clear_bit() smp_llsc_mb() |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * set_bit - Atomically set a bit in memory | 45 | * set_bit - Atomically set a bit in memory |
@@ -289,7 +289,7 @@ static inline int test_and_set_bit(unsigned long nr, | |||
289 | raw_local_irq_restore(flags); | 289 | raw_local_irq_restore(flags); |
290 | } | 290 | } |
291 | 291 | ||
292 | smp_mb(); | 292 | smp_llsc_mb(); |
293 | 293 | ||
294 | return res != 0; | 294 | return res != 0; |
295 | } | 295 | } |
@@ -377,7 +377,7 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
377 | raw_local_irq_restore(flags); | 377 | raw_local_irq_restore(flags); |
378 | } | 378 | } |
379 | 379 | ||
380 | smp_mb(); | 380 | smp_llsc_mb(); |
381 | 381 | ||
382 | return res != 0; | 382 | return res != 0; |
383 | } | 383 | } |
@@ -445,7 +445,7 @@ static inline int test_and_change_bit(unsigned long nr, | |||
445 | raw_local_irq_restore(flags); | 445 | raw_local_irq_restore(flags); |
446 | } | 446 | } |
447 | 447 | ||
448 | smp_mb(); | 448 | smp_llsc_mb(); |
449 | 449 | ||
450 | return res != 0; | 450 | return res != 0; |
451 | } | 451 | } |
diff --git a/include/asm-mips/ds1216.h b/include/asm-mips/ds1216.h deleted file mode 100644 index 1ff8b73f7a6a..000000000000 --- a/include/asm-mips/ds1216.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #ifndef _DS1216_H | ||
2 | #define _DS1216_H | ||
3 | |||
4 | extern volatile unsigned char *ds1216_base; | ||
5 | unsigned long ds1216_get_cmos_time(void); | ||
6 | int ds1216_set_rtc_mmss(unsigned long nowtime); | ||
7 | |||
8 | #define DS1216_SEC_BYTE 1 | ||
9 | #define DS1216_MIN_BYTE 2 | ||
10 | #define DS1216_HOUR_BYTE 3 | ||
11 | #define DS1216_HOUR_MASK (0x1f) | ||
12 | #define DS1216_AMPM_MASK (1<<5) | ||
13 | #define DS1216_1224_MASK (1<<7) | ||
14 | #define DS1216_DAY_BYTE 4 | ||
15 | #define DS1216_DAY_MASK (0x7) | ||
16 | #define DS1216_DATE_BYTE 5 | ||
17 | #define DS1216_DATE_MASK (0x3f) | ||
18 | #define DS1216_MONTH_BYTE 6 | ||
19 | #define DS1216_MONTH_MASK (0x1f) | ||
20 | #define DS1216_YEAR_BYTE 7 | ||
21 | |||
22 | #define DS1216_SEC(buf) (buf[DS1216_SEC_BYTE]) | ||
23 | #define DS1216_MIN(buf) (buf[DS1216_MIN_BYTE]) | ||
24 | #define DS1216_HOUR(buf) (buf[DS1216_HOUR_BYTE] & DS1216_HOUR_MASK) | ||
25 | #define DS1216_AMPM(buf) (buf[DS1216_HOUR_BYTE] & DS1216_AMPM_MASK) | ||
26 | #define DS1216_1224(buf) (buf[DS1216_HOUR_BYTE] & DS1216_1224_MASK) | ||
27 | #define DS1216_DATE(buf) (buf[DS1216_DATE_BYTE] & DS1216_DATE_MASK) | ||
28 | #define DS1216_MONTH(buf) (buf[DS1216_MONTH_BYTE] & DS1216_MONTH_MASK) | ||
29 | #define DS1216_YEAR(buf) (buf[DS1216_YEAR_BYTE]) | ||
30 | |||
31 | #endif | ||
diff --git a/include/asm-mips/futex.h b/include/asm-mips/futex.h index 47e5679c2353..b623882bce19 100644 --- a/include/asm-mips/futex.h +++ b/include/asm-mips/futex.h | |||
@@ -29,7 +29,7 @@ | |||
29 | " .set mips3 \n" \ | 29 | " .set mips3 \n" \ |
30 | "2: sc $1, %2 \n" \ | 30 | "2: sc $1, %2 \n" \ |
31 | " beqzl $1, 1b \n" \ | 31 | " beqzl $1, 1b \n" \ |
32 | __WEAK_ORDERING_MB \ | 32 | __WEAK_LLSC_MB \ |
33 | "3: \n" \ | 33 | "3: \n" \ |
34 | " .set pop \n" \ | 34 | " .set pop \n" \ |
35 | " .set mips0 \n" \ | 35 | " .set mips0 \n" \ |
@@ -55,7 +55,7 @@ | |||
55 | " .set mips3 \n" \ | 55 | " .set mips3 \n" \ |
56 | "2: sc $1, %2 \n" \ | 56 | "2: sc $1, %2 \n" \ |
57 | " beqz $1, 1b \n" \ | 57 | " beqz $1, 1b \n" \ |
58 | __WEAK_ORDERING_MB \ | 58 | __WEAK_LLSC_MB \ |
59 | "3: \n" \ | 59 | "3: \n" \ |
60 | " .set pop \n" \ | 60 | " .set pop \n" \ |
61 | " .set mips0 \n" \ | 61 | " .set mips0 \n" \ |
@@ -152,7 +152,7 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
152 | " .set mips3 \n" | 152 | " .set mips3 \n" |
153 | "2: sc $1, %1 \n" | 153 | "2: sc $1, %1 \n" |
154 | " beqzl $1, 1b \n" | 154 | " beqzl $1, 1b \n" |
155 | __WEAK_ORDERING_MB | 155 | __WEAK_LLSC_MB |
156 | "3: \n" | 156 | "3: \n" |
157 | " .set pop \n" | 157 | " .set pop \n" |
158 | " .section .fixup,\"ax\" \n" | 158 | " .section .fixup,\"ax\" \n" |
@@ -179,7 +179,7 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
179 | " .set mips3 \n" | 179 | " .set mips3 \n" |
180 | "2: sc $1, %1 \n" | 180 | "2: sc $1, %1 \n" |
181 | " beqz $1, 1b \n" | 181 | " beqz $1, 1b \n" |
182 | __WEAK_ORDERING_MB | 182 | __WEAK_LLSC_MB |
183 | "3: \n" | 183 | "3: \n" |
184 | " .set pop \n" | 184 | " .set pop \n" |
185 | " .section .fixup,\"ax\" \n" | 185 | " .section .fixup,\"ax\" \n" |
diff --git a/include/asm-mips/gfx.h b/include/asm-mips/gfx.h deleted file mode 100644 index 37235e41a6fd..000000000000 --- a/include/asm-mips/gfx.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * This is the user-visible SGI GFX interface. | ||
7 | * | ||
8 | * This must be used verbatim into the GNU libc. It does not include | ||
9 | * any kernel-only bits on it. | ||
10 | * | ||
11 | * miguel@nuclecu.unam.mx | ||
12 | */ | ||
13 | #ifndef _ASM_GFX_H | ||
14 | #define _ASM_GFX_H | ||
15 | |||
16 | /* The iocls, yes, they do not make sense, but such is life */ | ||
17 | #define GFX_BASE 100 | ||
18 | #define GFX_GETNUM_BOARDS (GFX_BASE + 1) | ||
19 | #define GFX_GETBOARD_INFO (GFX_BASE + 2) | ||
20 | #define GFX_ATTACH_BOARD (GFX_BASE + 3) | ||
21 | #define GFX_DETACH_BOARD (GFX_BASE + 4) | ||
22 | #define GFX_IS_MANAGED (GFX_BASE + 5) | ||
23 | |||
24 | #define GFX_MAPALL (GFX_BASE + 10) | ||
25 | #define GFX_LABEL (GFX_BASE + 11) | ||
26 | |||
27 | #define GFX_INFO_NAME_SIZE 16 | ||
28 | #define GFX_INFO_LABEL_SIZE 16 | ||
29 | |||
30 | struct gfx_info { | ||
31 | char name [GFX_INFO_NAME_SIZE]; /* board name */ | ||
32 | char label [GFX_INFO_LABEL_SIZE]; /* label name */ | ||
33 | unsigned short int xpmax, ypmax; /* screen resolution */ | ||
34 | unsigned int lenght; /* size of a complete gfx_info for this board */ | ||
35 | }; | ||
36 | |||
37 | struct gfx_getboardinfo_args { | ||
38 | unsigned int board; /* board number. starting from zero */ | ||
39 | void *buf; /* pointer to gfx_info */ | ||
40 | unsigned int len; /* buffer size of buf */ | ||
41 | }; | ||
42 | |||
43 | struct gfx_attach_board_args { | ||
44 | unsigned int board; /* board number, starting from zero */ | ||
45 | void *vaddr; /* address where the board registers should be mapped */ | ||
46 | }; | ||
47 | |||
48 | #ifdef __KERNEL__ | ||
49 | /* umap.c */ | ||
50 | extern void remove_mapping (struct vm_area_struct *vma, struct task_struct *, unsigned long, unsigned long); | ||
51 | extern void *vmalloc_uncached (unsigned long size); | ||
52 | extern int vmap_page_range (struct vm_area_struct *vma, unsigned long from, unsigned long size, unsigned long vaddr); | ||
53 | #endif | ||
54 | |||
55 | #endif /* _ASM_GFX_H */ | ||
diff --git a/include/asm-mips/mach-cobalt/cpu-feature-overrides.h b/include/asm-mips/mach-cobalt/cpu-feature-overrides.h index c6dfa59d1986..d38f069d9e95 100644 --- a/include/asm-mips/mach-cobalt/cpu-feature-overrides.h +++ b/include/asm-mips/mach-cobalt/cpu-feature-overrides.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) | 6 | * Copyright (C) 2006, 07 Ralf Baechle (ralf@linux-mips.org) |
7 | */ | 7 | */ |
8 | #ifndef __ASM_COBALT_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_COBALT_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_COBALT_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_COBALT_CPU_FEATURE_OVERRIDES_H |
@@ -46,6 +46,8 @@ | |||
46 | #define cpu_has_ic_fills_f_dc 0 | 46 | #define cpu_has_ic_fills_f_dc 0 |
47 | #define cpu_icache_snoops_remote_store 0 | 47 | #define cpu_icache_snoops_remote_store 0 |
48 | #define cpu_has_dsp 0 | 48 | #define cpu_has_dsp 0 |
49 | #define cpu_has_mipsmt 0 | ||
50 | #define cpu_has_userlocal 0 | ||
49 | 51 | ||
50 | #define cpu_has_mips32r1 0 | 52 | #define cpu_has_mips32r1 0 |
51 | #define cpu_has_mips32r2 0 | 53 | #define cpu_has_mips32r2 0 |
diff --git a/include/asm-mips/mach-excite/cpu-feature-overrides.h b/include/asm-mips/mach-excite/cpu-feature-overrides.h index 0d31854222f9..07f4322c235d 100644 --- a/include/asm-mips/mach-excite/cpu-feature-overrides.h +++ b/include/asm-mips/mach-excite/cpu-feature-overrides.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2004 Thomas Koeller <thomas.koeller@baslerweb.com> | 6 | * Copyright (C) 2004 Thomas Koeller <thomas.koeller@baslerweb.com> |
7 | * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) | ||
7 | */ | 8 | */ |
8 | #ifndef __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H | 9 | #ifndef __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H | 10 | #define __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H |
@@ -27,6 +28,8 @@ | |||
27 | #define cpu_has_ic_fills_f_dc 0 | 28 | #define cpu_has_ic_fills_f_dc 0 |
28 | #define cpu_has_dsp 0 | 29 | #define cpu_has_dsp 0 |
29 | #define cpu_icache_snoops_remote_store 0 | 30 | #define cpu_icache_snoops_remote_store 0 |
31 | #define cpu_has_mipsmt 0 | ||
32 | #define cpu_has_userlocal 0 | ||
30 | 33 | ||
31 | #define cpu_has_nofpuex 0 | 34 | #define cpu_has_nofpuex 0 |
32 | #define cpu_has_64bits 1 | 35 | #define cpu_has_64bits 1 |
diff --git a/include/asm-mips/mach-ip22/cpu-feature-overrides.h b/include/asm-mips/mach-ip22/cpu-feature-overrides.h index f7c5dc8a5336..9c8735158da1 100644 --- a/include/asm-mips/mach-ip22/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip22/cpu-feature-overrides.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003 Ralf Baechle | 6 | * Copyright (C) 2003, 07 Ralf Baechle |
7 | */ | 7 | */ |
8 | #ifndef __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H |
@@ -30,6 +30,8 @@ | |||
30 | #define cpu_has_ic_fills_f_dc 0 | 30 | #define cpu_has_ic_fills_f_dc 0 |
31 | 31 | ||
32 | #define cpu_has_dsp 0 | 32 | #define cpu_has_dsp 0 |
33 | #define cpu_has_mipsmt 0 | ||
34 | #define cpu_has_userlocal 0 | ||
33 | 35 | ||
34 | #define cpu_has_nofpuex 0 | 36 | #define cpu_has_nofpuex 0 |
35 | #define cpu_has_64bits 1 | 37 | #define cpu_has_64bits 1 |
diff --git a/include/asm-mips/mach-ip27/cpu-feature-overrides.h b/include/asm-mips/mach-ip27/cpu-feature-overrides.h index a071974b67bb..fe076380c189 100644 --- a/include/asm-mips/mach-ip27/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip27/cpu-feature-overrides.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003 Ralf Baechle | 6 | * Copyright (C) 2003, 07 Ralf Baechle |
7 | */ | 7 | */ |
8 | #ifndef __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H |
@@ -27,6 +27,8 @@ | |||
27 | #define cpu_has_ic_fills_f_dc 0 | 27 | #define cpu_has_ic_fills_f_dc 0 |
28 | #define cpu_has_dsp 0 | 28 | #define cpu_has_dsp 0 |
29 | #define cpu_icache_snoops_remote_store 1 | 29 | #define cpu_icache_snoops_remote_store 1 |
30 | #define cpu_has_mipsmt 0 | ||
31 | #define cpu_has_userlocal 0 | ||
30 | 32 | ||
31 | #define cpu_has_nofpuex 0 | 33 | #define cpu_has_nofpuex 0 |
32 | #define cpu_has_64bits 1 | 34 | #define cpu_has_64bits 1 |
diff --git a/include/asm-mips/mach-ip32/cpu-feature-overrides.h b/include/asm-mips/mach-ip32/cpu-feature-overrides.h index 2a3de092bf13..6782fccebe8d 100644 --- a/include/asm-mips/mach-ip32/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip32/cpu-feature-overrides.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2005 Ilya A. Volynets-Evenbakh | 6 | * Copyright (C) 2005 Ilya A. Volynets-Evenbakh |
7 | * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) | 7 | * Copyright (C) 2005, 07 Ralf Baechle (ralf@linux-mips.org) |
8 | */ | 8 | */ |
9 | #ifndef __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H | 9 | #ifndef __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H |
10 | #define __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H | 10 | #define __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H |
@@ -38,6 +38,8 @@ | |||
38 | #define cpu_has_ic_fills_f_dc 0 | 38 | #define cpu_has_ic_fills_f_dc 0 |
39 | #define cpu_has_dsp 0 | 39 | #define cpu_has_dsp 0 |
40 | #define cpu_has_4k_cache 1 | 40 | #define cpu_has_4k_cache 1 |
41 | #define cpu_has_mipsmt 0 | ||
42 | #define cpu_has_userlocal 0 | ||
41 | 43 | ||
42 | 44 | ||
43 | #define cpu_has_mips32r1 0 | 45 | #define cpu_has_mips32r1 0 |
diff --git a/include/asm-mips/mach-qemu/cpu-feature-overrides.h b/include/asm-mips/mach-qemu/cpu-feature-overrides.h index 529445dacedb..d2daaed235d5 100644 --- a/include/asm-mips/mach-qemu/cpu-feature-overrides.h +++ b/include/asm-mips/mach-qemu/cpu-feature-overrides.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003 Ralf Baechle | 6 | * Copyright (C) 2003, 07 Ralf Baechle |
7 | */ | 7 | */ |
8 | #ifndef __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H |
@@ -24,6 +24,7 @@ | |||
24 | #define cpu_has_ic_fills_f_dc 0 | 24 | #define cpu_has_ic_fills_f_dc 0 |
25 | 25 | ||
26 | #define cpu_has_dsp 0 | 26 | #define cpu_has_dsp 0 |
27 | #define cpu_has_mipsmt 0 | ||
27 | 28 | ||
28 | #define cpu_has_nofpuex 0 | 29 | #define cpu_has_nofpuex 0 |
29 | #define cpu_has_64bits 0 | 30 | #define cpu_has_64bits 0 |
diff --git a/include/asm-mips/mach-rm/cpu-feature-overrides.h b/include/asm-mips/mach-rm/cpu-feature-overrides.h index 7e07283140a3..ccf543363537 100644 --- a/include/asm-mips/mach-rm/cpu-feature-overrides.h +++ b/include/asm-mips/mach-rm/cpu-feature-overrides.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003, 2004 Ralf Baechle | 6 | * Copyright (C) 2003, 04, 07 Ralf Baechle (ralf@linux-mips.org) |
7 | * | 7 | * |
8 | * SNI RM200 C apparently was only shipped with R4600 V2.0 and R5000 processors. | 8 | * SNI RM200 C apparently was only shipped with R4600 V2.0 and R5000 processors. |
9 | */ | 9 | */ |
@@ -32,6 +32,8 @@ | |||
32 | #define cpu_has_dsp 0 | 32 | #define cpu_has_dsp 0 |
33 | #define cpu_has_nofpuex 0 | 33 | #define cpu_has_nofpuex 0 |
34 | #define cpu_has_64bits 1 | 34 | #define cpu_has_64bits 1 |
35 | #define cpu_has_mipsmt 0 | ||
36 | #define cpu_has_userlocal 0 | ||
35 | 37 | ||
36 | #define cpu_has_mips32r1 0 | 38 | #define cpu_has_mips32r1 0 |
37 | #define cpu_has_mips32r2 0 | 39 | #define cpu_has_mips32r2 0 |
diff --git a/include/asm-mips/mach-sibyte/cpu-feature-overrides.h b/include/asm-mips/mach-sibyte/cpu-feature-overrides.h index a25968f277a2..63d5bf649af1 100644 --- a/include/asm-mips/mach-sibyte/cpu-feature-overrides.h +++ b/include/asm-mips/mach-sibyte/cpu-feature-overrides.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003, 2004 Ralf Baechle | 6 | * Copyright (C) 2003, 04, 07 Ralf Baechle (ralf@linux-mips.org) |
7 | */ | 7 | */ |
8 | #ifndef __ASM_MACH_SIBYTE_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_MACH_SIBYTE_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_SIBYTE_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_MACH_SIBYTE_CPU_FEATURE_OVERRIDES_H |
@@ -26,6 +26,8 @@ | |||
26 | #define cpu_has_dc_aliases 0 | 26 | #define cpu_has_dc_aliases 0 |
27 | #define cpu_has_ic_fills_f_dc 0 | 27 | #define cpu_has_ic_fills_f_dc 0 |
28 | #define cpu_has_dsp 0 | 28 | #define cpu_has_dsp 0 |
29 | #define cpu_has_mipsmt 0 | ||
30 | #define cpu_has_userlocal 0 | ||
29 | #define cpu_icache_snoops_remote_store 0 | 31 | #define cpu_icache_snoops_remote_store 0 |
30 | 32 | ||
31 | #define cpu_has_nofpuex 0 | 33 | #define cpu_has_nofpuex 0 |
diff --git a/include/asm-mips/mach-yosemite/cpu-feature-overrides.h b/include/asm-mips/mach-yosemite/cpu-feature-overrides.h index 42cebb7ce7a6..470e5e9e10d6 100644 --- a/include/asm-mips/mach-yosemite/cpu-feature-overrides.h +++ b/include/asm-mips/mach-yosemite/cpu-feature-overrides.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003, 2004 Ralf Baechle | 6 | * Copyright (C) 2003, 04, 07 Ralf Baechle (ralf@linux-mips.org) |
7 | */ | 7 | */ |
8 | #ifndef __ASM_MACH_YOSEMITE_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_MACH_YOSEMITE_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_YOSEMITE_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_MACH_YOSEMITE_CPU_FEATURE_OVERRIDES_H |
@@ -26,6 +26,8 @@ | |||
26 | #define cpu_has_dc_aliases 0 | 26 | #define cpu_has_dc_aliases 0 |
27 | #define cpu_has_ic_fills_f_dc 0 | 27 | #define cpu_has_ic_fills_f_dc 0 |
28 | #define cpu_has_dsp 0 | 28 | #define cpu_has_dsp 0 |
29 | #define cpu_has_mipsmt 0 | ||
30 | #define cpu_has_userlocal 0 | ||
29 | #define cpu_icache_snoops_remote_store 0 | 31 | #define cpu_icache_snoops_remote_store 0 |
30 | 32 | ||
31 | #define cpu_has_nofpuex 0 | 33 | #define cpu_has_nofpuex 0 |
diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h index 35e431cd796b..bb897016c491 100644 --- a/include/asm-mips/spinlock.h +++ b/include/asm-mips/spinlock.h | |||
@@ -67,7 +67,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) | |||
67 | : "memory"); | 67 | : "memory"); |
68 | } | 68 | } |
69 | 69 | ||
70 | smp_mb(); | 70 | smp_llsc_mb(); |
71 | } | 71 | } |
72 | 72 | ||
73 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) | 73 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) |
@@ -118,7 +118,7 @@ static inline unsigned int __raw_spin_trylock(raw_spinlock_t *lock) | |||
118 | : "memory"); | 118 | : "memory"); |
119 | } | 119 | } |
120 | 120 | ||
121 | smp_mb(); | 121 | smp_llsc_mb(); |
122 | 122 | ||
123 | return res == 0; | 123 | return res == 0; |
124 | } | 124 | } |
@@ -183,7 +183,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) | |||
183 | : "memory"); | 183 | : "memory"); |
184 | } | 184 | } |
185 | 185 | ||
186 | smp_mb(); | 186 | smp_llsc_mb(); |
187 | } | 187 | } |
188 | 188 | ||
189 | /* Note the use of sub, not subu which will make the kernel die with an | 189 | /* Note the use of sub, not subu which will make the kernel die with an |
@@ -193,7 +193,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) | |||
193 | { | 193 | { |
194 | unsigned int tmp; | 194 | unsigned int tmp; |
195 | 195 | ||
196 | smp_mb(); | 196 | smp_llsc_mb(); |
197 | 197 | ||
198 | if (R10000_LLSC_WAR) { | 198 | if (R10000_LLSC_WAR) { |
199 | __asm__ __volatile__( | 199 | __asm__ __volatile__( |
@@ -262,7 +262,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw) | |||
262 | : "memory"); | 262 | : "memory"); |
263 | } | 263 | } |
264 | 264 | ||
265 | smp_mb(); | 265 | smp_llsc_mb(); |
266 | } | 266 | } |
267 | 267 | ||
268 | static inline void __raw_write_unlock(raw_rwlock_t *rw) | 268 | static inline void __raw_write_unlock(raw_rwlock_t *rw) |
@@ -293,7 +293,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw) | |||
293 | " .set reorder \n" | 293 | " .set reorder \n" |
294 | " beqzl %1, 1b \n" | 294 | " beqzl %1, 1b \n" |
295 | " nop \n" | 295 | " nop \n" |
296 | __WEAK_ORDERING_MB | 296 | __WEAK_LLSC_MB |
297 | " li %2, 1 \n" | 297 | " li %2, 1 \n" |
298 | "2: \n" | 298 | "2: \n" |
299 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) | 299 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) |
@@ -310,7 +310,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw) | |||
310 | " beqz %1, 1b \n" | 310 | " beqz %1, 1b \n" |
311 | " nop \n" | 311 | " nop \n" |
312 | " .set reorder \n" | 312 | " .set reorder \n" |
313 | __WEAK_ORDERING_MB | 313 | __WEAK_LLSC_MB |
314 | " li %2, 1 \n" | 314 | " li %2, 1 \n" |
315 | "2: \n" | 315 | "2: \n" |
316 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) | 316 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) |
@@ -336,7 +336,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) | |||
336 | " sc %1, %0 \n" | 336 | " sc %1, %0 \n" |
337 | " beqzl %1, 1b \n" | 337 | " beqzl %1, 1b \n" |
338 | " nop \n" | 338 | " nop \n" |
339 | __WEAK_ORDERING_MB | 339 | __WEAK_LLSC_MB |
340 | " li %2, 1 \n" | 340 | " li %2, 1 \n" |
341 | " .set reorder \n" | 341 | " .set reorder \n" |
342 | "2: \n" | 342 | "2: \n" |
@@ -354,7 +354,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) | |||
354 | " beqz %1, 3f \n" | 354 | " beqz %1, 3f \n" |
355 | " li %2, 1 \n" | 355 | " li %2, 1 \n" |
356 | "2: \n" | 356 | "2: \n" |
357 | __WEAK_ORDERING_MB | 357 | __WEAK_LLSC_MB |
358 | " .subsection 2 \n" | 358 | " .subsection 2 \n" |
359 | "3: b 1b \n" | 359 | "3: b 1b \n" |
360 | " li %2, 0 \n" | 360 | " li %2, 0 \n" |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 76339165bc20..8d0b1cd4a45e 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -117,7 +117,7 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) | |||
117 | raw_local_irq_restore(flags); /* implies memory barrier */ | 117 | raw_local_irq_restore(flags); /* implies memory barrier */ |
118 | } | 118 | } |
119 | 119 | ||
120 | smp_mb(); | 120 | smp_llsc_mb(); |
121 | 121 | ||
122 | return retval; | 122 | return retval; |
123 | } | 123 | } |
@@ -165,7 +165,7 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) | |||
165 | raw_local_irq_restore(flags); /* implies memory barrier */ | 165 | raw_local_irq_restore(flags); /* implies memory barrier */ |
166 | } | 166 | } |
167 | 167 | ||
168 | smp_mb(); | 168 | smp_llsc_mb(); |
169 | 169 | ||
170 | return retval; | 170 | return retval; |
171 | } | 171 | } |
@@ -246,7 +246,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, | |||
246 | raw_local_irq_restore(flags); /* implies memory barrier */ | 246 | raw_local_irq_restore(flags); /* implies memory barrier */ |
247 | } | 247 | } |
248 | 248 | ||
249 | smp_mb(); | 249 | smp_llsc_mb(); |
250 | 250 | ||
251 | return retval; | 251 | return retval; |
252 | } | 252 | } |
@@ -352,7 +352,7 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, | |||
352 | raw_local_irq_restore(flags); /* implies memory barrier */ | 352 | raw_local_irq_restore(flags); /* implies memory barrier */ |
353 | } | 353 | } |
354 | 354 | ||
355 | smp_mb(); | 355 | smp_llsc_mb(); |
356 | 356 | ||
357 | return retval; | 357 | return retval; |
358 | } | 358 | } |
@@ -470,6 +470,6 @@ extern int stop_a_enabled; | |||
470 | */ | 470 | */ |
471 | #define __ARCH_WANT_UNLOCKED_CTXSW | 471 | #define __ARCH_WANT_UNLOCKED_CTXSW |
472 | 472 | ||
473 | #define arch_align_stack(x) (x) | 473 | extern unsigned long arch_align_stack(unsigned long sp); |
474 | 474 | ||
475 | #endif /* _ASM_SYSTEM_H */ | 475 | #endif /* _ASM_SYSTEM_H */ |