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