diff options
Diffstat (limited to 'arch/arm/include/asm/system.h')
-rw-r--r-- | arch/arm/include/asm/system.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 97f6d60297d5..9a87823642d0 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -347,6 +347,7 @@ void cpu_idle_wait(void); | |||
347 | #include <asm-generic/cmpxchg-local.h> | 347 | #include <asm-generic/cmpxchg-local.h> |
348 | 348 | ||
349 | #if __LINUX_ARM_ARCH__ < 6 | 349 | #if __LINUX_ARM_ARCH__ < 6 |
350 | /* min ARCH < ARMv6 */ | ||
350 | 351 | ||
351 | #ifdef CONFIG_SMP | 352 | #ifdef CONFIG_SMP |
352 | #error "SMP is not supported on this platform" | 353 | #error "SMP is not supported on this platform" |
@@ -365,7 +366,7 @@ void cpu_idle_wait(void); | |||
365 | #include <asm-generic/cmpxchg.h> | 366 | #include <asm-generic/cmpxchg.h> |
366 | #endif | 367 | #endif |
367 | 368 | ||
368 | #else /* __LINUX_ARM_ARCH__ >= 6 */ | 369 | #else /* min ARCH >= ARMv6 */ |
369 | 370 | ||
370 | extern void __bad_cmpxchg(volatile void *ptr, int size); | 371 | extern void __bad_cmpxchg(volatile void *ptr, int size); |
371 | 372 | ||
@@ -379,7 +380,7 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
379 | unsigned long oldval, res; | 380 | unsigned long oldval, res; |
380 | 381 | ||
381 | switch (size) { | 382 | switch (size) { |
382 | #ifdef CONFIG_CPU_32v6K | 383 | #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ |
383 | case 1: | 384 | case 1: |
384 | do { | 385 | do { |
385 | asm volatile("@ __cmpxchg1\n" | 386 | asm volatile("@ __cmpxchg1\n" |
@@ -404,7 +405,7 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
404 | : "memory", "cc"); | 405 | : "memory", "cc"); |
405 | } while (res); | 406 | } while (res); |
406 | break; | 407 | break; |
407 | #endif /* CONFIG_CPU_32v6K */ | 408 | #endif |
408 | case 4: | 409 | case 4: |
409 | do { | 410 | do { |
410 | asm volatile("@ __cmpxchg4\n" | 411 | asm volatile("@ __cmpxchg4\n" |
@@ -450,12 +451,12 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, | |||
450 | unsigned long ret; | 451 | unsigned long ret; |
451 | 452 | ||
452 | switch (size) { | 453 | switch (size) { |
453 | #ifndef CONFIG_CPU_32v6K | 454 | #ifdef CONFIG_CPU_V6 /* min ARCH == ARMv6 */ |
454 | case 1: | 455 | case 1: |
455 | case 2: | 456 | case 2: |
456 | ret = __cmpxchg_local_generic(ptr, old, new, size); | 457 | ret = __cmpxchg_local_generic(ptr, old, new, size); |
457 | break; | 458 | break; |
458 | #endif /* !CONFIG_CPU_32v6K */ | 459 | #endif |
459 | default: | 460 | default: |
460 | ret = __cmpxchg(ptr, old, new, size); | 461 | ret = __cmpxchg(ptr, old, new, size); |
461 | } | 462 | } |
@@ -469,7 +470,7 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, | |||
469 | (unsigned long)(n), \ | 470 | (unsigned long)(n), \ |
470 | sizeof(*(ptr)))) | 471 | sizeof(*(ptr)))) |
471 | 472 | ||
472 | #ifdef CONFIG_CPU_32v6K | 473 | #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ |
473 | 474 | ||
474 | /* | 475 | /* |
475 | * Note : ARMv7-M (currently unsupported by Linux) does not support | 476 | * Note : ARMv7-M (currently unsupported by Linux) does not support |
@@ -524,11 +525,11 @@ static inline unsigned long long __cmpxchg64_mb(volatile void *ptr, | |||
524 | (unsigned long long)(o), \ | 525 | (unsigned long long)(o), \ |
525 | (unsigned long long)(n))) | 526 | (unsigned long long)(n))) |
526 | 527 | ||
527 | #else /* !CONFIG_CPU_32v6K */ | 528 | #else /* min ARCH = ARMv6 */ |
528 | 529 | ||
529 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | 530 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) |
530 | 531 | ||
531 | #endif /* CONFIG_CPU_32v6K */ | 532 | #endif |
532 | 533 | ||
533 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ | 534 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ |
534 | 535 | ||