Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'arc-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:

- Revert of ll-sc backoff retry workaround in atomics/spinlocks as
hardware is now proven to work just fine

- Typo fixes (Thanks Andrea Gelmini)

- Removal of obsolete DT property (Alexey)

- Other minor fixes

* tag 'arc-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
Revert "ARCv2: spinlock/rwlock/atomics: Delayed retry of failed SCOND with exponential backoff"
Revert "ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle"
Revert "ARCv2: spinlock/rwlock/atomics: reduce 1 instruction in exponential backoff"
ARC: don't enable DISCONTIGMEM unconditionally
ARC: [intc-compact] simplify code for 2 priority levels
arc: Get rid of root core-frequency property
Fix typos

+30 -415
+4 -27
arch/arc/Kconfig
··· 61 61 def_bool y 62 62 63 63 config ARCH_DISCONTIGMEM_ENABLE 64 - def_bool y 64 + def_bool n 65 65 66 66 config ARCH_FLATMEM_ENABLE 67 67 def_bool y ··· 184 184 if SMP 185 185 186 186 config ARC_HAS_COH_CACHES 187 - def_bool n 188 - 189 - config ARC_HAS_REENTRANT_IRQ_LV2 190 187 def_bool n 191 188 192 189 config ARC_MCIP ··· 363 366 if ISA_ARCOMPACT 364 367 365 368 config ARC_COMPACT_IRQ_LEVELS 366 - bool "ARCompact IRQ Priorities: High(2)/Low(1)" 369 + bool "Setup Timer IRQ as high Priority" 367 370 default n 368 - # Timer HAS to be high priority, for any other high priority config 369 - select ARC_IRQ3_LV2 370 371 # if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy 371 - depends on !SMP || ARC_HAS_REENTRANT_IRQ_LV2 372 - 373 - if ARC_COMPACT_IRQ_LEVELS 374 - 375 - config ARC_IRQ3_LV2 376 - bool 377 - 378 - config ARC_IRQ5_LV2 379 - bool 380 - 381 - config ARC_IRQ6_LV2 382 - bool 383 - 384 - endif #ARC_COMPACT_IRQ_LEVELS 372 + depends on !SMP 385 373 386 374 config ARC_FPU_SAVE_RESTORE 387 375 bool "Enable FPU state persistence across context switch" ··· 388 406 bool "Insn: LLOCK/SCOND (efficient atomic ops)" 389 407 default y 390 408 depends on !ARC_CANT_LLSC 391 - 392 - config ARC_STAR_9000923308 393 - bool "Workaround for llock/scond livelock" 394 - default n 395 - depends on ISA_ARCV2 && SMP && ARC_HAS_LLSC 396 409 397 410 config ARC_HAS_SWAPE 398 411 bool "Insn: SWAPE (endian-swap)" ··· 448 471 449 472 config HIGHMEM 450 473 bool "High Memory Support" 451 - select DISCONTIGMEM 474 + select ARCH_DISCONTIGMEM_ENABLE 452 475 help 453 476 With ARC 2G:2G address split, only upper 2G is directly addressable by 454 477 kernel. Enable this to potentially allow access to rest of 2G and PAE
+1 -1
arch/arc/Makefile
··· 127 127 128 128 boot := arch/arc/boot 129 129 130 - #default target for make without any arguements. 130 + #default target for make without any arguments. 131 131 KBUILD_IMAGE := bootpImage 132 132 133 133 all: $(KBUILD_IMAGE)
-2
arch/arc/boot/dts/abilis_tb100.dtsi
··· 23 23 24 24 25 25 / { 26 - clock-frequency = <500000000>; /* 500 MHZ */ 27 - 28 26 soc100 { 29 27 bus-frequency = <166666666>; 30 28
-2
arch/arc/boot/dts/abilis_tb101.dtsi
··· 23 23 24 24 25 25 / { 26 - clock-frequency = <500000000>; /* 500 MHZ */ 27 - 28 26 soc100 { 29 27 bus-frequency = <166666666>; 30 28
-1
arch/arc/boot/dts/axc001.dtsi
··· 15 15 16 16 / { 17 17 compatible = "snps,arc"; 18 - clock-frequency = <750000000>; /* 750 MHZ */ 19 18 #address-cells = <1>; 20 19 #size-cells = <1>; 21 20
-1
arch/arc/boot/dts/axc003.dtsi
··· 14 14 15 15 / { 16 16 compatible = "snps,arc"; 17 - clock-frequency = <90000000>; 18 17 #address-cells = <1>; 19 18 #size-cells = <1>; 20 19
-1
arch/arc/boot/dts/axc003_idu.dtsi
··· 14 14 15 15 / { 16 16 compatible = "snps,arc"; 17 - clock-frequency = <90000000>; 18 17 #address-cells = <1>; 19 18 #size-cells = <1>; 20 19
-1
arch/arc/boot/dts/eznps.dts
··· 18 18 19 19 / { 20 20 compatible = "ezchip,arc-nps"; 21 - clock-frequency = <83333333>; /* 83.333333 MHZ */ 22 21 #address-cells = <1>; 23 22 #size-cells = <1>; 24 23 interrupt-parent = <&intc>;
-1
arch/arc/boot/dts/nsim_700.dts
··· 11 11 12 12 / { 13 13 compatible = "snps,nsim"; 14 - clock-frequency = <80000000>; /* 80 MHZ */ 15 14 #address-cells = <1>; 16 15 #size-cells = <1>; 17 16 interrupt-parent = <&core_intc>;
-1
arch/arc/boot/dts/nsimosci.dts
··· 11 11 12 12 / { 13 13 compatible = "snps,nsimosci"; 14 - clock-frequency = <20000000>; /* 20 MHZ */ 15 14 #address-cells = <1>; 16 15 #size-cells = <1>; 17 16 interrupt-parent = <&core_intc>;
-1
arch/arc/boot/dts/nsimosci_hs.dts
··· 11 11 12 12 / { 13 13 compatible = "snps,nsimosci_hs"; 14 - clock-frequency = <20000000>; /* 20 MHZ */ 15 14 #address-cells = <1>; 16 15 #size-cells = <1>; 17 16 interrupt-parent = <&core_intc>;
-1
arch/arc/boot/dts/nsimosci_hs_idu.dts
··· 11 11 12 12 / { 13 13 compatible = "snps,nsimosci_hs"; 14 - clock-frequency = <5000000>; /* 5 MHZ */ 15 14 #address-cells = <1>; 16 15 #size-cells = <1>; 17 16 interrupt-parent = <&core_intc>;
-1
arch/arc/boot/dts/skeleton.dtsi
··· 13 13 14 14 / { 15 15 compatible = "snps,arc"; 16 - clock-frequency = <80000000>; /* 80 MHZ */ 17 16 #address-cells = <1>; 18 17 #size-cells = <1>; 19 18 chosen { };
-1
arch/arc/boot/dts/skeleton_hs.dtsi
··· 8 8 9 9 / { 10 10 compatible = "snps,arc"; 11 - clock-frequency = <80000000>; /* 80 MHZ */ 12 11 #address-cells = <1>; 13 12 #size-cells = <1>; 14 13 chosen { };
-1
arch/arc/boot/dts/skeleton_hs_idu.dtsi
··· 8 8 9 9 / { 10 10 compatible = "snps,arc"; 11 - clock-frequency = <80000000>; /* 80 MHZ */ 12 11 #address-cells = <1>; 13 12 #size-cells = <1>; 14 13 chosen { };
-1
arch/arc/boot/dts/vdk_axc003.dtsi
··· 14 14 15 15 / { 16 16 compatible = "snps,arc"; 17 - clock-frequency = <50000000>; 18 17 #address-cells = <1>; 19 18 #size-cells = <1>; 20 19
-1
arch/arc/boot/dts/vdk_axc003_idu.dtsi
··· 15 15 16 16 / { 17 17 compatible = "snps,arc"; 18 - clock-frequency = <50000000>; 19 18 #address-cells = <1>; 20 19 #size-cells = <1>; 21 20
+4 -41
arch/arc/include/asm/atomic.h
··· 25 25 26 26 #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) 27 27 28 - #ifdef CONFIG_ARC_STAR_9000923308 29 - 30 - #define SCOND_FAIL_RETRY_VAR_DEF \ 31 - unsigned int delay = 1, tmp; \ 32 - 33 - #define SCOND_FAIL_RETRY_ASM \ 34 - " bz 4f \n" \ 35 - " ; --- scond fail delay --- \n" \ 36 - " mov %[tmp], %[delay] \n" /* tmp = delay */ \ 37 - "2: brne.d %[tmp], 0, 2b \n" /* while (tmp != 0) */ \ 38 - " sub %[tmp], %[tmp], 1 \n" /* tmp-- */ \ 39 - " rol %[delay], %[delay] \n" /* delay *= 2 */ \ 40 - " b 1b \n" /* start over */ \ 41 - "4: ; --- success --- \n" \ 42 - 43 - #define SCOND_FAIL_RETRY_VARS \ 44 - ,[delay] "+&r" (delay),[tmp] "=&r" (tmp) \ 45 - 46 - #else /* !CONFIG_ARC_STAR_9000923308 */ 47 - 48 - #define SCOND_FAIL_RETRY_VAR_DEF 49 - 50 - #define SCOND_FAIL_RETRY_ASM \ 51 - " bnz 1b \n" \ 52 - 53 - #define SCOND_FAIL_RETRY_VARS 54 - 55 - #endif 56 - 57 28 #define ATOMIC_OP(op, c_op, asm_op) \ 58 29 static inline void atomic_##op(int i, atomic_t *v) \ 59 30 { \ 60 - unsigned int val; \ 61 - SCOND_FAIL_RETRY_VAR_DEF \ 31 + unsigned int val; \ 62 32 \ 63 33 __asm__ __volatile__( \ 64 34 "1: llock %[val], [%[ctr]] \n" \ 65 35 " " #asm_op " %[val], %[val], %[i] \n" \ 66 36 " scond %[val], [%[ctr]] \n" \ 67 - " \n" \ 68 - SCOND_FAIL_RETRY_ASM \ 69 - \ 37 + " bnz 1b \n" \ 70 38 : [val] "=&r" (val) /* Early clobber to prevent reg reuse */ \ 71 - SCOND_FAIL_RETRY_VARS \ 72 39 : [ctr] "r" (&v->counter), /* Not "m": llock only supports reg direct addr mode */ \ 73 40 [i] "ir" (i) \ 74 41 : "cc"); \ ··· 44 77 #define ATOMIC_OP_RETURN(op, c_op, asm_op) \ 45 78 static inline int atomic_##op##_return(int i, atomic_t *v) \ 46 79 { \ 47 - unsigned int val; \ 48 - SCOND_FAIL_RETRY_VAR_DEF \ 80 + unsigned int val; \ 49 81 \ 50 82 /* \ 51 83 * Explicit full memory barrier needed before/after as \ ··· 56 90 "1: llock %[val], [%[ctr]] \n" \ 57 91 " " #asm_op " %[val], %[val], %[i] \n" \ 58 92 " scond %[val], [%[ctr]] \n" \ 59 - " \n" \ 60 - SCOND_FAIL_RETRY_ASM \ 61 - \ 93 + " bnz 1b \n" \ 62 94 : [val] "=&r" (val) \ 63 - SCOND_FAIL_RETRY_VARS \ 64 95 : [ctr] "r" (&v->counter), \ 65 96 [i] "ir" (i) \ 66 97 : "cc"); \
+2 -2
arch/arc/include/asm/entry-compact.h
··· 76 76 * We need to be a bit more cautious here. What if a kernel bug in 77 77 * L1 ISR, caused SP to go whaco (some small value which looks like 78 78 * USER stk) and then we take L2 ISR. 79 - * Above brlo alone would treat it as a valid L1-L2 sceanrio 80 - * instead of shouting alound 79 + * Above brlo alone would treat it as a valid L1-L2 scenario 80 + * instead of shouting around 81 81 * The only feasible way is to make sure this L2 happened in 82 82 * L1 prelogue ONLY i.e. ilink2 is less than a pre-set marker in 83 83 * L1 ISR before it switches stack
+1 -1
arch/arc/include/asm/mmu_context.h
··· 83 83 local_flush_tlb_all(); 84 84 85 85 /* 86 - * Above checke for rollover of 8 bit ASID in 32 bit container. 86 + * Above check for rollover of 8 bit ASID in 32 bit container. 87 87 * If the container itself wrapped around, set it to a non zero 88 88 * "generation" to distinguish from no context 89 89 */
+1 -1
arch/arc/include/asm/pgtable.h
··· 47 47 * Page Tables are purely for Linux VM's consumption and the bits below are 48 48 * suited to that (uniqueness). Hence some are not implemented in the TLB and 49 49 * some have different value in TLB. 50 - * e.g. MMU v2: K_READ bit is 8 and so is GLOBAL (possible becoz they live in 50 + * e.g. MMU v2: K_READ bit is 8 and so is GLOBAL (possible because they live in 51 51 * seperate PD0 and PD1, which combined forms a translation entry) 52 52 * while for PTE perspective, they are 8 and 9 respectively 53 53 * with MMU v3: Most bits (except SHARED) represent the exact hardware pos
+1 -1
arch/arc/include/asm/processor.h
··· 78 78 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->sp) 79 79 80 80 /* 81 - * Where abouts of Task's sp, fp, blink when it was last seen in kernel mode. 81 + * Where about of Task's sp, fp, blink when it was last seen in kernel mode. 82 82 * Look in process.c for details of kernel stack layout 83 83 */ 84 84 #define TSK_K_ESP(tsk) (tsk->thread.ksp)
+1 -1
arch/arc/include/asm/smp.h
··· 86 86 * (1) These insn were introduced only in 4.10 release. So for older released 87 87 * support needed. 88 88 * 89 - * (2) In a SMP setup, the LLOCK/SCOND atomiticity across CPUs needs to be 89 + * (2) In a SMP setup, the LLOCK/SCOND atomicity across CPUs needs to be 90 90 * gaurantted by the platform (not something which core handles). 91 91 * Assuming a platform won't, SMP Linux needs to use spinlocks + local IRQ 92 92 * disabling for atomicity.
-292
arch/arc/include/asm/spinlock.h
··· 20 20 21 21 #ifdef CONFIG_ARC_HAS_LLSC 22 22 23 - /* 24 - * A normal LLOCK/SCOND based system, w/o need for livelock workaround 25 - */ 26 - #ifndef CONFIG_ARC_STAR_9000923308 27 - 28 23 static inline void arch_spin_lock(arch_spinlock_t *lock) 29 24 { 30 25 unsigned int val; ··· 232 237 233 238 smp_mb(); 234 239 } 235 - 236 - #else /* CONFIG_ARC_STAR_9000923308 */ 237 - 238 - /* 239 - * HS38x4 could get into a LLOCK/SCOND livelock in case of multiple overlapping 240 - * coherency transactions in the SCU. The exclusive line state keeps rotating 241 - * among contenting cores leading to a never ending cycle. So break the cycle 242 - * by deferring the retry of failed exclusive access (SCOND). The actual delay 243 - * needed is function of number of contending cores as well as the unrelated 244 - * coherency traffic from other cores. To keep the code simple, start off with 245 - * small delay of 1 which would suffice most cases and in case of contention 246 - * double the delay. Eventually the delay is sufficient such that the coherency 247 - * pipeline is drained, thus a subsequent exclusive access would succeed. 248 - */ 249 - 250 - #define SCOND_FAIL_RETRY_VAR_DEF \ 251 - unsigned int delay, tmp; \ 252 - 253 - #define SCOND_FAIL_RETRY_ASM \ 254 - " ; --- scond fail delay --- \n" \ 255 - " mov %[tmp], %[delay] \n" /* tmp = delay */ \ 256 - "2: brne.d %[tmp], 0, 2b \n" /* while (tmp != 0) */ \ 257 - " sub %[tmp], %[tmp], 1 \n" /* tmp-- */ \ 258 - " rol %[delay], %[delay] \n" /* delay *= 2 */ \ 259 - " b 1b \n" /* start over */ \ 260 - " \n" \ 261 - "4: ; --- done --- \n" \ 262 - 263 - #define SCOND_FAIL_RETRY_VARS \ 264 - ,[delay] "=&r" (delay), [tmp] "=&r" (tmp) \ 265 - 266 - static inline void arch_spin_lock(arch_spinlock_t *lock) 267 - { 268 - unsigned int val; 269 - SCOND_FAIL_RETRY_VAR_DEF; 270 - 271 - smp_mb(); 272 - 273 - __asm__ __volatile__( 274 - "0: mov %[delay], 1 \n" 275 - "1: llock %[val], [%[slock]] \n" 276 - " breq %[val], %[LOCKED], 0b \n" /* spin while LOCKED */ 277 - " scond %[LOCKED], [%[slock]] \n" /* acquire */ 278 - " bz 4f \n" /* done */ 279 - " \n" 280 - SCOND_FAIL_RETRY_ASM 281 - 282 - : [val] "=&r" (val) 283 - SCOND_FAIL_RETRY_VARS 284 - : [slock] "r" (&(lock->slock)), 285 - [LOCKED] "r" (__ARCH_SPIN_LOCK_LOCKED__) 286 - : "memory", "cc"); 287 - 288 - smp_mb(); 289 - } 290 - 291 - /* 1 - lock taken successfully */ 292 - static inline int arch_spin_trylock(arch_spinlock_t *lock) 293 - { 294 - unsigned int val, got_it = 0; 295 - SCOND_FAIL_RETRY_VAR_DEF; 296 - 297 - smp_mb(); 298 - 299 - __asm__ __volatile__( 300 - "0: mov %[delay], 1 \n" 301 - "1: llock %[val], [%[slock]] \n" 302 - " breq %[val], %[LOCKED], 4f \n" /* already LOCKED, just bail */ 303 - " scond %[LOCKED], [%[slock]] \n" /* acquire */ 304 - " bz.d 4f \n" 305 - " mov.z %[got_it], 1 \n" /* got it */ 306 - " \n" 307 - SCOND_FAIL_RETRY_ASM 308 - 309 - : [val] "=&r" (val), 310 - [got_it] "+&r" (got_it) 311 - SCOND_FAIL_RETRY_VARS 312 - : [slock] "r" (&(lock->slock)), 313 - [LOCKED] "r" (__ARCH_SPIN_LOCK_LOCKED__) 314 - : "memory", "cc"); 315 - 316 - smp_mb(); 317 - 318 - return got_it; 319 - } 320 - 321 - static inline void arch_spin_unlock(arch_spinlock_t *lock) 322 - { 323 - smp_mb(); 324 - 325 - lock->slock = __ARCH_SPIN_LOCK_UNLOCKED__; 326 - 327 - smp_mb(); 328 - } 329 - 330 - /* 331 - * Read-write spinlocks, allowing multiple readers but only one writer. 332 - * Unfair locking as Writers could be starved indefinitely by Reader(s) 333 - */ 334 - 335 - static inline void arch_read_lock(arch_rwlock_t *rw) 336 - { 337 - unsigned int val; 338 - SCOND_FAIL_RETRY_VAR_DEF; 339 - 340 - smp_mb(); 341 - 342 - /* 343 - * zero means writer holds the lock exclusively, deny Reader. 344 - * Otherwise grant lock to first/subseq reader 345 - * 346 - * if (rw->counter > 0) { 347 - * rw->counter--; 348 - * ret = 1; 349 - * } 350 - */ 351 - 352 - __asm__ __volatile__( 353 - "0: mov %[delay], 1 \n" 354 - "1: llock %[val], [%[rwlock]] \n" 355 - " brls %[val], %[WR_LOCKED], 0b\n" /* <= 0: spin while write locked */ 356 - " sub %[val], %[val], 1 \n" /* reader lock */ 357 - " scond %[val], [%[rwlock]] \n" 358 - " bz 4f \n" /* done */ 359 - " \n" 360 - SCOND_FAIL_RETRY_ASM 361 - 362 - : [val] "=&r" (val) 363 - SCOND_FAIL_RETRY_VARS 364 - : [rwlock] "r" (&(rw->counter)), 365 - [WR_LOCKED] "ir" (0) 366 - : "memory", "cc"); 367 - 368 - smp_mb(); 369 - } 370 - 371 - /* 1 - lock taken successfully */ 372 - static inline int arch_read_trylock(arch_rwlock_t *rw) 373 - { 374 - unsigned int val, got_it = 0; 375 - SCOND_FAIL_RETRY_VAR_DEF; 376 - 377 - smp_mb(); 378 - 379 - __asm__ __volatile__( 380 - "0: mov %[delay], 1 \n" 381 - "1: llock %[val], [%[rwlock]] \n" 382 - " brls %[val], %[WR_LOCKED], 4f\n" /* <= 0: already write locked, bail */ 383 - " sub %[val], %[val], 1 \n" /* counter-- */ 384 - " scond %[val], [%[rwlock]] \n" 385 - " bz.d 4f \n" 386 - " mov.z %[got_it], 1 \n" /* got it */ 387 - " \n" 388 - SCOND_FAIL_RETRY_ASM 389 - 390 - : [val] "=&r" (val), 391 - [got_it] "+&r" (got_it) 392 - SCOND_FAIL_RETRY_VARS 393 - : [rwlock] "r" (&(rw->counter)), 394 - [WR_LOCKED] "ir" (0) 395 - : "memory", "cc"); 396 - 397 - smp_mb(); 398 - 399 - return got_it; 400 - } 401 - 402 - static inline void arch_write_lock(arch_rwlock_t *rw) 403 - { 404 - unsigned int val; 405 - SCOND_FAIL_RETRY_VAR_DEF; 406 - 407 - smp_mb(); 408 - 409 - /* 410 - * If reader(s) hold lock (lock < __ARCH_RW_LOCK_UNLOCKED__), 411 - * deny writer. Otherwise if unlocked grant to writer 412 - * Hence the claim that Linux rwlocks are unfair to writers. 413 - * (can be starved for an indefinite time by readers). 414 - * 415 - * if (rw->counter == __ARCH_RW_LOCK_UNLOCKED__) { 416 - * rw->counter = 0; 417 - * ret = 1; 418 - * } 419 - */ 420 - 421 - __asm__ __volatile__( 422 - "0: mov %[delay], 1 \n" 423 - "1: llock %[val], [%[rwlock]] \n" 424 - " brne %[val], %[UNLOCKED], 0b \n" /* while !UNLOCKED spin */ 425 - " mov %[val], %[WR_LOCKED] \n" 426 - " scond %[val], [%[rwlock]] \n" 427 - " bz 4f \n" 428 - " \n" 429 - SCOND_FAIL_RETRY_ASM 430 - 431 - : [val] "=&r" (val) 432 - SCOND_FAIL_RETRY_VARS 433 - : [rwlock] "r" (&(rw->counter)), 434 - [UNLOCKED] "ir" (__ARCH_RW_LOCK_UNLOCKED__), 435 - [WR_LOCKED] "ir" (0) 436 - : "memory", "cc"); 437 - 438 - smp_mb(); 439 - } 440 - 441 - /* 1 - lock taken successfully */ 442 - static inline int arch_write_trylock(arch_rwlock_t *rw) 443 - { 444 - unsigned int val, got_it = 0; 445 - SCOND_FAIL_RETRY_VAR_DEF; 446 - 447 - smp_mb(); 448 - 449 - __asm__ __volatile__( 450 - "0: mov %[delay], 1 \n" 451 - "1: llock %[val], [%[rwlock]] \n" 452 - " brne %[val], %[UNLOCKED], 4f \n" /* !UNLOCKED, bail */ 453 - " mov %[val], %[WR_LOCKED] \n" 454 - " scond %[val], [%[rwlock]] \n" 455 - " bz.d 4f \n" 456 - " mov.z %[got_it], 1 \n" /* got it */ 457 - " \n" 458 - SCOND_FAIL_RETRY_ASM 459 - 460 - : [val] "=&r" (val), 461 - [got_it] "+&r" (got_it) 462 - SCOND_FAIL_RETRY_VARS 463 - : [rwlock] "r" (&(rw->counter)), 464 - [UNLOCKED] "ir" (__ARCH_RW_LOCK_UNLOCKED__), 465 - [WR_LOCKED] "ir" (0) 466 - : "memory", "cc"); 467 - 468 - smp_mb(); 469 - 470 - return got_it; 471 - } 472 - 473 - static inline void arch_read_unlock(arch_rwlock_t *rw) 474 - { 475 - unsigned int val; 476 - 477 - smp_mb(); 478 - 479 - /* 480 - * rw->counter++; 481 - */ 482 - __asm__ __volatile__( 483 - "1: llock %[val], [%[rwlock]] \n" 484 - " add %[val], %[val], 1 \n" 485 - " scond %[val], [%[rwlock]] \n" 486 - " bnz 1b \n" 487 - " \n" 488 - : [val] "=&r" (val) 489 - : [rwlock] "r" (&(rw->counter)) 490 - : "memory", "cc"); 491 - 492 - smp_mb(); 493 - } 494 - 495 - static inline void arch_write_unlock(arch_rwlock_t *rw) 496 - { 497 - unsigned int val; 498 - 499 - smp_mb(); 500 - 501 - /* 502 - * rw->counter = __ARCH_RW_LOCK_UNLOCKED__; 503 - */ 504 - __asm__ __volatile__( 505 - "1: llock %[val], [%[rwlock]] \n" 506 - " scond %[UNLOCKED], [%[rwlock]]\n" 507 - " bnz 1b \n" 508 - " \n" 509 - : [val] "=&r" (val) 510 - : [rwlock] "r" (&(rw->counter)), 511 - [UNLOCKED] "r" (__ARCH_RW_LOCK_UNLOCKED__) 512 - : "memory", "cc"); 513 - 514 - smp_mb(); 515 - } 516 - 517 - #undef SCOND_FAIL_RETRY_VAR_DEF 518 - #undef SCOND_FAIL_RETRY_ASM 519 - #undef SCOND_FAIL_RETRY_VARS 520 - 521 - #endif /* CONFIG_ARC_STAR_9000923308 */ 522 240 523 241 #else /* !CONFIG_ARC_HAS_LLSC */ 524 242
+1 -1
arch/arc/include/asm/thread_info.h
··· 103 103 104 104 /* 105 105 * _TIF_ALLWORK_MASK includes SYSCALL_TRACE, but we don't need it. 106 - * SYSCALL_TRACE is anways seperately/unconditionally tested right after a 106 + * SYSCALL_TRACE is anyway seperately/unconditionally tested right after a 107 107 * syscall, so all that reamins to be tested is _TIF_WORK_MASK 108 108 */ 109 109
+1 -1
arch/arc/include/asm/uaccess.h
··· 32 32 #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) 33 33 34 34 /* 35 - * Algorthmically, for __user_ok() we want do: 35 + * Algorithmically, for __user_ok() we want do: 36 36 * (start < TASK_SIZE) && (start+len < TASK_SIZE) 37 37 * where TASK_SIZE could either be retrieved from thread_info->addr_limit or 38 38 * emitted directly in code.
+1 -1
arch/arc/include/uapi/asm/swab.h
··· 74 74 __tmp ^ __in; \ 75 75 }) 76 76 77 - #elif (ARC_BSWAP_TYPE == 2) /* Custom single cycle bwap instruction */ 77 + #elif (ARC_BSWAP_TYPE == 2) /* Custom single cycle bswap instruction */ 78 78 79 79 #define __arch_swab32(x) \ 80 80 ({ \
+2 -16
arch/arc/kernel/entry-compact.S
··· 91 91 VECTOR instr_service ; 0x10, Instrn Error (0x2) 92 92 93 93 ; ******************** Device ISRs ********************** 94 - #ifdef CONFIG_ARC_IRQ3_LV2 94 + #ifdef CONFIG_ARC_COMPACT_IRQ_LEVELS 95 95 VECTOR handle_interrupt_level2 96 96 #else 97 97 VECTOR handle_interrupt_level1 98 98 #endif 99 99 100 - VECTOR handle_interrupt_level1 101 - 102 - #ifdef CONFIG_ARC_IRQ5_LV2 103 - VECTOR handle_interrupt_level2 104 - #else 105 - VECTOR handle_interrupt_level1 106 - #endif 107 - 108 - #ifdef CONFIG_ARC_IRQ6_LV2 109 - VECTOR handle_interrupt_level2 110 - #else 111 - VECTOR handle_interrupt_level1 112 - #endif 113 - 114 - .rept 25 100 + .rept 28 115 101 VECTOR handle_interrupt_level1 ; Other devices 116 102 .endr 117 103
+2 -4
arch/arc/kernel/intc-compact.c
··· 28 28 { 29 29 int level_mask = 0; 30 30 31 - /* setup any high priority Interrupts (Level2 in ARCompact jargon) */ 32 - level_mask |= IS_ENABLED(CONFIG_ARC_IRQ3_LV2) << 3; 33 - level_mask |= IS_ENABLED(CONFIG_ARC_IRQ5_LV2) << 5; 34 - level_mask |= IS_ENABLED(CONFIG_ARC_IRQ6_LV2) << 6; 31 + /* Is timer high priority Interrupt (Level2 in ARCompact jargon) */ 32 + level_mask |= IS_ENABLED(CONFIG_ARC_COMPACT_IRQ_LEVELS) << TIMER0_IRQ; 35 33 36 34 /* 37 35 * Write to register, even if no LV2 IRQs configured to reset it
+1 -1
arch/arc/kernel/perf_event.c
··· 108 108 int64_t delta = new_raw_count - prev_raw_count; 109 109 110 110 /* 111 - * We don't afaraid of hwc->prev_count changing beneath our feet 111 + * We aren't afraid of hwc->prev_count changing beneath our feet 112 112 * because there's no way for us to re-enter this function anytime. 113 113 */ 114 114 local64_set(&hwc->prev_count, new_raw_count);
+1 -1
arch/arc/kernel/setup.c
··· 392 392 /* 393 393 * If we are here, it is established that @uboot_arg didn't 394 394 * point to DT blob. Instead if u-boot says it is cmdline, 395 - * Appent to embedded DT cmdline. 395 + * append to embedded DT cmdline. 396 396 * setup_machine_fdt() would have populated @boot_command_line 397 397 */ 398 398 if (uboot_tag == 1) {
+1 -1
arch/arc/kernel/signal.c
··· 34 34 * -ViXS were still seeing crashes when using insmod to load drivers. 35 35 * It turned out that the code to change Execute permssions for TLB entries 36 36 * of user was not guarded for interrupts (mod_tlb_permission) 37 - * This was cauing TLB entries to be overwritten on unrelated indexes 37 + * This was causing TLB entries to be overwritten on unrelated indexes 38 38 * 39 39 * Vineetg: July 15th 2008: Bug #94183 40 40 * -Exception happens in Delay slot of a JMP, and before user space resumes,
+1 -1
arch/arc/kernel/troubleshoot.c
··· 276 276 return 0; 277 277 } 278 278 279 - /* called on user read(): display the couters */ 279 + /* called on user read(): display the counters */ 280 280 static ssize_t tlb_stats_output(struct file *file, /* file descriptor */ 281 281 char __user *user_buf, /* user buffer */ 282 282 size_t len, /* length of buffer */
+3 -3
arch/arc/mm/cache.c
··· 215 215 * ------------------ 216 216 * This ver of MMU supports variable page sizes (1k-16k): although Linux will 217 217 * only support 8k (default), 16k and 4k. 218 - * However from hardware perspective, smaller page sizes aggrevate aliasing 218 + * However from hardware perspective, smaller page sizes aggravate aliasing 219 219 * meaning more vaddr bits needed to disambiguate the cache-line-op ; 220 220 * the existing scheme of piggybacking won't work for certain configurations. 221 221 * Two new registers IC_PTAG and DC_PTAG inttoduced. ··· 302 302 303 303 /* 304 304 * This is technically for MMU v4, using the MMU v3 programming model 305 - * Special work for HS38 aliasing I-cache configuratino with PAE40 305 + * Special work for HS38 aliasing I-cache configuration with PAE40 306 306 * - upper 8 bits of paddr need to be written into PTAG_HI 307 307 * - (and needs to be written before the lower 32 bits) 308 308 * Note that PTAG_HI is hoisted outside the line loop ··· 936 936 ic->ver, CONFIG_ARC_MMU_VER); 937 937 938 938 /* 939 - * In MMU v4 (HS38x) the alising icache config uses IVIL/PTAG 939 + * In MMU v4 (HS38x) the aliasing icache config uses IVIL/PTAG 940 940 * pair to provide vaddr/paddr respectively, just as in MMU v3 941 941 */ 942 942 if (is_isa_arcv2() && ic->alias)
+1 -1
arch/arc/mm/dma.c
··· 10 10 * DMA Coherent API Notes 11 11 * 12 12 * I/O is inherently non-coherent on ARC. So a coherent DMA buffer is 13 - * implemented by accessintg it using a kernel virtual address, with 13 + * implemented by accessing it using a kernel virtual address, with 14 14 * Cache bit off in the TLB entry. 15 15 * 16 16 * The default DMA address == Phy address which is 0x8000_0000 based.