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] User stack pointer randomisation
[MIPS] Remove unused include/asm-mips/gfx.h
[MIPS] Remove unused include/asm-mips/ds1216.h
[MIPS] Workaround for RM7000 WAIT instruction aka erratum 38
[MIPS] Make support for weakly ordered LL/SC a config option.
[MIPS] Disable UserLocal runtime detection on platforms which never have it.
[MIPS] Disable MT runtime detection on platforms which never support MT.

+125 -134
+11
arch/mips/Kconfig
··· 1190 1190 config SYS_HAS_CPU_SB1 1191 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 1197 config WEAK_ORDERING 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 1194 1205 bool 1195 1206 endmenu 1196 1207
+25 -1
arch/mips/kernel/cpu-probe.c
··· 75 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 99 /* The Au1xxx wait is available only if using 32khz counter or 79 100 * external timer source, but specifically not CP0 Counter. */ 80 101 int allow_au1k_wait; ··· 153 132 case CPU_R4700: 154 133 case CPU_R5000: 155 134 case CPU_NEVADA: 156 - case CPU_RM7000: 157 135 case CPU_4KC: 158 136 case CPU_4KEC: 159 137 case CPU_4KSC: ··· 160 140 case CPU_25KF: 161 141 case CPU_PR4450: 162 142 cpu_wait = r4k_wait; 143 + break; 144 + 145 + case CPU_RM7000: 146 + cpu_wait = rm7k_wait_irqoff; 163 147 break; 164 148 165 149 case CPU_24K:
+14
arch/mips/kernel/process.c
··· 25 25 #include <linux/init.h> 26 26 #include <linux/completion.h> 27 27 #include <linux/kallsyms.h> 28 + #include <linux/random.h> 28 29 30 + #include <asm/asm.h> 29 31 #include <asm/bootinfo.h> 30 32 #include <asm/cpu.h> 31 33 #include <asm/dsp.h> ··· 461 459 462 460 out: 463 461 return pc; 462 + } 463 + 464 + /* 465 + * Don't forget that the stack pointer must be aligned on a 8 bytes 466 + * boundary for 32-bits ABI and 16 bytes for 64-bits ABI. 467 + */ 468 + unsigned long arch_align_stack(unsigned long sp) 469 + { 470 + if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) 471 + sp -= get_random_int() & ~PAGE_MASK; 472 + 473 + return sp & ALMASK; 464 474 }
+17 -16
include/asm-mips/atomic.h
··· 138 138 { 139 139 unsigned long result; 140 140 141 - smp_mb(); 141 + smp_llsc_mb(); 142 142 143 143 if (cpu_has_llsc && R10000_LLSC_WAR) { 144 144 unsigned long temp; ··· 181 181 raw_local_irq_restore(flags); 182 182 } 183 183 184 - smp_mb(); 184 + smp_llsc_mb(); 185 185 186 186 return result; 187 187 } ··· 190 190 { 191 191 unsigned long result; 192 192 193 - smp_mb(); 193 + smp_llsc_mb(); 194 194 195 195 if (cpu_has_llsc && R10000_LLSC_WAR) { 196 196 unsigned long temp; ··· 233 233 raw_local_irq_restore(flags); 234 234 } 235 235 236 - smp_mb(); 236 + smp_llsc_mb(); 237 237 238 238 return result; 239 239 } ··· 250 250 { 251 251 unsigned long result; 252 252 253 - smp_mb(); 253 + smp_llsc_mb(); 254 254 255 255 if (cpu_has_llsc && R10000_LLSC_WAR) { 256 256 unsigned long temp; ··· 302 302 raw_local_irq_restore(flags); 303 303 } 304 304 305 - smp_mb(); 305 + smp_llsc_mb(); 306 306 307 307 return result; 308 308 } ··· 519 519 { 520 520 unsigned long result; 521 521 522 - smp_mb(); 522 + smp_llsc_mb(); 523 523 524 524 if (cpu_has_llsc && R10000_LLSC_WAR) { 525 525 unsigned long temp; ··· 562 562 raw_local_irq_restore(flags); 563 563 } 564 564 565 - smp_mb(); 565 + smp_llsc_mb(); 566 566 567 567 return result; 568 568 } ··· 571 571 { 572 572 unsigned long result; 573 573 574 - smp_mb(); 574 + smp_llsc_mb(); 575 575 576 576 if (cpu_has_llsc && R10000_LLSC_WAR) { 577 577 unsigned long temp; ··· 614 614 raw_local_irq_restore(flags); 615 615 } 616 616 617 - smp_mb(); 617 + smp_llsc_mb(); 618 618 619 619 return result; 620 620 } ··· 631 631 { 632 632 unsigned long result; 633 633 634 - smp_mb(); 634 + smp_llsc_mb(); 635 635 636 636 if (cpu_has_llsc && R10000_LLSC_WAR) { 637 637 unsigned long temp; ··· 683 683 raw_local_irq_restore(flags); 684 684 } 685 685 686 - smp_mb(); 686 + smp_llsc_mb(); 687 687 688 688 return result; 689 689 } ··· 791 791 * atomic*_return operations are serializing but not the non-*_return 792 792 * versions. 793 793 */ 794 - #define smp_mb__before_atomic_dec() smp_mb() 795 - #define smp_mb__after_atomic_dec() smp_mb() 796 - #define smp_mb__before_atomic_inc() smp_mb() 797 - #define smp_mb__after_atomic_inc() smp_mb() 794 + #define smp_mb__before_atomic_dec() smp_llsc_mb() 795 + #define smp_mb__after_atomic_dec() smp_llsc_mb() 796 + #define smp_mb__before_atomic_inc() smp_llsc_mb() 797 + #define smp_mb__after_atomic_inc() smp_llsc_mb() 798 798 799 799 #include <asm-generic/atomic.h> 800 + 800 801 #endif /* _ASM_ATOMIC_H */
+9
include/asm-mips/barrier.h
··· 121 121 #else 122 122 #define __WEAK_ORDERING_MB " \n" 123 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 130 #define smp_mb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") 126 131 #define smp_rmb() __asm__ __volatile__(__WEAK_ORDERING_MB : : :"memory") ··· 133 128 134 129 #define set_mb(var, value) \ 135 130 do { var = value; smp_mb(); } while (0) 131 + 132 + #define smp_llsc_mb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory") 133 + #define smp_llsc_rmb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory") 134 + #define smp_llsc_wmb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory") 136 135 137 136 #endif /* __ASM_BARRIER_H */
+5 -5
include/asm-mips/bitops.h
··· 38 38 /* 39 39 * clear_bit() doesn't provide any barrier for the compiler. 40 40 */ 41 - #define smp_mb__before_clear_bit() smp_mb() 42 - #define smp_mb__after_clear_bit() smp_mb() 41 + #define smp_mb__before_clear_bit() smp_llsc_mb() 42 + #define smp_mb__after_clear_bit() smp_llsc_mb() 43 43 44 44 /* 45 45 * set_bit - Atomically set a bit in memory ··· 289 289 raw_local_irq_restore(flags); 290 290 } 291 291 292 - smp_mb(); 292 + smp_llsc_mb(); 293 293 294 294 return res != 0; 295 295 } ··· 377 377 raw_local_irq_restore(flags); 378 378 } 379 379 380 - smp_mb(); 380 + smp_llsc_mb(); 381 381 382 382 return res != 0; 383 383 } ··· 445 445 raw_local_irq_restore(flags); 446 446 } 447 447 448 - smp_mb(); 448 + smp_llsc_mb(); 449 449 450 450 return res != 0; 451 451 }
-31
include/asm-mips/ds1216.h
··· 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
+4 -4
include/asm-mips/futex.h
··· 29 29 " .set mips3 \n" \ 30 30 "2: sc $1, %2 \n" \ 31 31 " beqzl $1, 1b \n" \ 32 - __WEAK_ORDERING_MB \ 32 + __WEAK_LLSC_MB \ 33 33 "3: \n" \ 34 34 " .set pop \n" \ 35 35 " .set mips0 \n" \ ··· 55 55 " .set mips3 \n" \ 56 56 "2: sc $1, %2 \n" \ 57 57 " beqz $1, 1b \n" \ 58 - __WEAK_ORDERING_MB \ 58 + __WEAK_LLSC_MB \ 59 59 "3: \n" \ 60 60 " .set pop \n" \ 61 61 " .set mips0 \n" \ ··· 152 152 " .set mips3 \n" 153 153 "2: sc $1, %1 \n" 154 154 " beqzl $1, 1b \n" 155 - __WEAK_ORDERING_MB 155 + __WEAK_LLSC_MB 156 156 "3: \n" 157 157 " .set pop \n" 158 158 " .section .fixup,\"ax\" \n" ··· 179 179 " .set mips3 \n" 180 180 "2: sc $1, %1 \n" 181 181 " beqz $1, 1b \n" 182 - __WEAK_ORDERING_MB 182 + __WEAK_LLSC_MB 183 183 "3: \n" 184 184 " .set pop \n" 185 185 " .section .fixup,\"ax\" \n"
-55
include/asm-mips/gfx.h
··· 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 */
+3 -1
include/asm-mips/mach-cobalt/cpu-feature-overrides.h
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 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 8 #ifndef __ASM_COBALT_CPU_FEATURE_OVERRIDES_H 9 9 #define __ASM_COBALT_CPU_FEATURE_OVERRIDES_H ··· 46 46 #define cpu_has_ic_fills_f_dc 0 47 47 #define cpu_icache_snoops_remote_store 0 48 48 #define cpu_has_dsp 0 49 + #define cpu_has_mipsmt 0 50 + #define cpu_has_userlocal 0 49 51 50 52 #define cpu_has_mips32r1 0 51 53 #define cpu_has_mips32r2 0
+3
include/asm-mips/mach-excite/cpu-feature-overrides.h
··· 4 4 * for more details. 5 5 * 6 6 * Copyright (C) 2004 Thomas Koeller <thomas.koeller@baslerweb.com> 7 + * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) 7 8 */ 8 9 #ifndef __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H 9 10 #define __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H ··· 28 27 #define cpu_has_ic_fills_f_dc 0 29 28 #define cpu_has_dsp 0 30 29 #define cpu_icache_snoops_remote_store 0 30 + #define cpu_has_mipsmt 0 31 + #define cpu_has_userlocal 0 31 32 32 33 #define cpu_has_nofpuex 0 33 34 #define cpu_has_64bits 1
+3 -1
include/asm-mips/mach-ip22/cpu-feature-overrides.h
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 4 * for more details. 5 5 * 6 - * Copyright (C) 2003 Ralf Baechle 6 + * Copyright (C) 2003, 07 Ralf Baechle 7 7 */ 8 8 #ifndef __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H 9 9 #define __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H ··· 30 30 #define cpu_has_ic_fills_f_dc 0 31 31 32 32 #define cpu_has_dsp 0 33 + #define cpu_has_mipsmt 0 34 + #define cpu_has_userlocal 0 33 35 34 36 #define cpu_has_nofpuex 0 35 37 #define cpu_has_64bits 1
+3 -1
include/asm-mips/mach-ip27/cpu-feature-overrides.h
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 4 * for more details. 5 5 * 6 - * Copyright (C) 2003 Ralf Baechle 6 + * Copyright (C) 2003, 07 Ralf Baechle 7 7 */ 8 8 #ifndef __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H 9 9 #define __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H ··· 27 27 #define cpu_has_ic_fills_f_dc 0 28 28 #define cpu_has_dsp 0 29 29 #define cpu_icache_snoops_remote_store 1 30 + #define cpu_has_mipsmt 0 31 + #define cpu_has_userlocal 0 30 32 31 33 #define cpu_has_nofpuex 0 32 34 #define cpu_has_64bits 1
+3 -1
include/asm-mips/mach-ip32/cpu-feature-overrides.h
··· 4 4 * for more details. 5 5 * 6 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 9 #ifndef __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H 10 10 #define __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H ··· 38 38 #define cpu_has_ic_fills_f_dc 0 39 39 #define cpu_has_dsp 0 40 40 #define cpu_has_4k_cache 1 41 + #define cpu_has_mipsmt 0 42 + #define cpu_has_userlocal 0 41 43 42 44 43 45 #define cpu_has_mips32r1 0
+2 -1
include/asm-mips/mach-qemu/cpu-feature-overrides.h
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 4 * for more details. 5 5 * 6 - * Copyright (C) 2003 Ralf Baechle 6 + * Copyright (C) 2003, 07 Ralf Baechle 7 7 */ 8 8 #ifndef __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H 9 9 #define __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H ··· 24 24 #define cpu_has_ic_fills_f_dc 0 25 25 26 26 #define cpu_has_dsp 0 27 + #define cpu_has_mipsmt 0 27 28 28 29 #define cpu_has_nofpuex 0 29 30 #define cpu_has_64bits 0
+3 -1
include/asm-mips/mach-rm/cpu-feature-overrides.h
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 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 8 * SNI RM200 C apparently was only shipped with R4600 V2.0 and R5000 processors. 9 9 */ ··· 32 32 #define cpu_has_dsp 0 33 33 #define cpu_has_nofpuex 0 34 34 #define cpu_has_64bits 1 35 + #define cpu_has_mipsmt 0 36 + #define cpu_has_userlocal 0 35 37 36 38 #define cpu_has_mips32r1 0 37 39 #define cpu_has_mips32r2 0
+3 -1
include/asm-mips/mach-sibyte/cpu-feature-overrides.h
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 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 8 #ifndef __ASM_MACH_SIBYTE_CPU_FEATURE_OVERRIDES_H 9 9 #define __ASM_MACH_SIBYTE_CPU_FEATURE_OVERRIDES_H ··· 26 26 #define cpu_has_dc_aliases 0 27 27 #define cpu_has_ic_fills_f_dc 0 28 28 #define cpu_has_dsp 0 29 + #define cpu_has_mipsmt 0 30 + #define cpu_has_userlocal 0 29 31 #define cpu_icache_snoops_remote_store 0 30 32 31 33 #define cpu_has_nofpuex 0
+3 -1
include/asm-mips/mach-yosemite/cpu-feature-overrides.h
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 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 8 #ifndef __ASM_MACH_YOSEMITE_CPU_FEATURE_OVERRIDES_H 9 9 #define __ASM_MACH_YOSEMITE_CPU_FEATURE_OVERRIDES_H ··· 26 26 #define cpu_has_dc_aliases 0 27 27 #define cpu_has_ic_fills_f_dc 0 28 28 #define cpu_has_dsp 0 29 + #define cpu_has_mipsmt 0 30 + #define cpu_has_userlocal 0 29 31 #define cpu_icache_snoops_remote_store 0 30 32 31 33 #define cpu_has_nofpuex 0
+9 -9
include/asm-mips/spinlock.h
··· 67 67 : "memory"); 68 68 } 69 69 70 - smp_mb(); 70 + smp_llsc_mb(); 71 71 } 72 72 73 73 static inline void __raw_spin_unlock(raw_spinlock_t *lock) ··· 118 118 : "memory"); 119 119 } 120 120 121 - smp_mb(); 121 + smp_llsc_mb(); 122 122 123 123 return res == 0; 124 124 } ··· 183 183 : "memory"); 184 184 } 185 185 186 - smp_mb(); 186 + smp_llsc_mb(); 187 187 } 188 188 189 189 /* Note the use of sub, not subu which will make the kernel die with an ··· 193 193 { 194 194 unsigned int tmp; 195 195 196 - smp_mb(); 196 + smp_llsc_mb(); 197 197 198 198 if (R10000_LLSC_WAR) { 199 199 __asm__ __volatile__( ··· 262 262 : "memory"); 263 263 } 264 264 265 - smp_mb(); 265 + smp_llsc_mb(); 266 266 } 267 267 268 268 static inline void __raw_write_unlock(raw_rwlock_t *rw) ··· 293 293 " .set reorder \n" 294 294 " beqzl %1, 1b \n" 295 295 " nop \n" 296 - __WEAK_ORDERING_MB 296 + __WEAK_LLSC_MB 297 297 " li %2, 1 \n" 298 298 "2: \n" 299 299 : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) ··· 310 310 " beqz %1, 1b \n" 311 311 " nop \n" 312 312 " .set reorder \n" 313 - __WEAK_ORDERING_MB 313 + __WEAK_LLSC_MB 314 314 " li %2, 1 \n" 315 315 "2: \n" 316 316 : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) ··· 336 336 " sc %1, %0 \n" 337 337 " beqzl %1, 1b \n" 338 338 " nop \n" 339 - __WEAK_ORDERING_MB 339 + __WEAK_LLSC_MB 340 340 " li %2, 1 \n" 341 341 " .set reorder \n" 342 342 "2: \n" ··· 354 354 " beqz %1, 3f \n" 355 355 " li %2, 1 \n" 356 356 "2: \n" 357 - __WEAK_ORDERING_MB 357 + __WEAK_LLSC_MB 358 358 " .subsection 2 \n" 359 359 "3: b 1b \n" 360 360 " li %2, 0 \n"
+5 -5
include/asm-mips/system.h
··· 117 117 raw_local_irq_restore(flags); /* implies memory barrier */ 118 118 } 119 119 120 - smp_mb(); 120 + smp_llsc_mb(); 121 121 122 122 return retval; 123 123 } ··· 165 165 raw_local_irq_restore(flags); /* implies memory barrier */ 166 166 } 167 167 168 - smp_mb(); 168 + smp_llsc_mb(); 169 169 170 170 return retval; 171 171 } ··· 246 246 raw_local_irq_restore(flags); /* implies memory barrier */ 247 247 } 248 248 249 - smp_mb(); 249 + smp_llsc_mb(); 250 250 251 251 return retval; 252 252 } ··· 352 352 raw_local_irq_restore(flags); /* implies memory barrier */ 353 353 } 354 354 355 - smp_mb(); 355 + smp_llsc_mb(); 356 356 357 357 return retval; 358 358 } ··· 470 470 */ 471 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 475 #endif /* _ASM_SYSTEM_H */