From 9b4f71018e89aff127a8d842d026833668c9c8d9 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Mon, 30 Jul 2012 14:41:09 -0700 Subject: [PATCH] --- yaml --- r: 319933 b: refs/heads/master c: 7463449b8287162454d7e00bf7fd2c64f72c1dc8 h: refs/heads/master i: 319931: f148c756d0dcc4d86a89782f3fb085d077d01aed v: v3 --- [refs] | 2 +- trunk/arch/arm/Kconfig | 1 + trunk/arch/mips/Kconfig | 1 + trunk/arch/powerpc/Kconfig | 1 + trunk/arch/s390/Kconfig | 1 + trunk/arch/x86/Kconfig | 1 + trunk/lib/Kconfig | 3 +++ trunk/lib/atomic64_test.c | 5 ++--- 8 files changed, 11 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index b24e3ddf847a..89845ea9ba07 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6017b485caeae5915956190b4f3d8307021e785d +refs/heads/master: 7463449b8287162454d7e00bf7fd2c64f72c1dc8 diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index fbdd8533c05d..4172c3cea228 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -11,6 +11,7 @@ config ARM select RTC_LIB select SYS_SUPPORTS_APM_EMULATION select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI) + select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select HAVE_OPROFILE if (HAVE_PERF_EVENTS) select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL select HAVE_ARCH_KGDB diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig index b3e10fdd3898..5e238d03960d 100644 --- a/trunk/arch/mips/Kconfig +++ b/trunk/arch/mips/Kconfig @@ -20,6 +20,7 @@ config MIPS select ARCH_BINFMT_ELF_RANDOMIZE_PIE select RTC_LIB if !MACH_LOONGSON select GENERIC_ATOMIC64 if !64BIT + select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select HAVE_DMA_ATTRS select HAVE_DMA_API_DEBUG select HAVE_GENERIC_HARDIRQS diff --git a/trunk/arch/powerpc/Kconfig b/trunk/arch/powerpc/Kconfig index 9a5d3cdc3e12..4f681b78dd8b 100644 --- a/trunk/arch/powerpc/Kconfig +++ b/trunk/arch/powerpc/Kconfig @@ -115,6 +115,7 @@ config PPC select HAVE_OPROFILE select HAVE_SYSCALL_WRAPPERS if PPC64 select GENERIC_ATOMIC64 if PPC32 + select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select HAVE_IRQ_WORK select HAVE_PERF_EVENTS select HAVE_REGS_AND_STACK_ACCESS_API diff --git a/trunk/arch/s390/Kconfig b/trunk/arch/s390/Kconfig index a39b4690c171..d0a5e92b6b9e 100644 --- a/trunk/arch/s390/Kconfig +++ b/trunk/arch/s390/Kconfig @@ -85,6 +85,7 @@ config S390 select HAVE_ARCH_MUTEX_CPU_RELAX select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 select ARCH_SAVE_PAGE_KEYS if HIBERNATION + select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select HAVE_MEMBLOCK select HAVE_MEMBLOCK_NODE_MAP select HAVE_CMPXCHG_LOCAL diff --git a/trunk/arch/x86/Kconfig b/trunk/arch/x86/Kconfig index c70684f859e1..ca4fdefe79e6 100644 --- a/trunk/arch/x86/Kconfig +++ b/trunk/arch/x86/Kconfig @@ -70,6 +70,7 @@ config X86 select HAVE_ARCH_JUMP_LABEL select HAVE_TEXT_POKE_SMP select HAVE_GENERIC_HARDIRQS + select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select SPARSE_IRQ select GENERIC_FIND_FIRST_BIT select GENERIC_IRQ_PROBE diff --git a/trunk/lib/Kconfig b/trunk/lib/Kconfig index 8269d56dcdaa..72c1d4693068 100644 --- a/trunk/lib/Kconfig +++ b/trunk/lib/Kconfig @@ -340,6 +340,9 @@ config NLATTR config GENERIC_ATOMIC64 bool +config ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE + def_bool y if GENERIC_ATOMIC64 + config LRU_CACHE tristate diff --git a/trunk/lib/atomic64_test.c b/trunk/lib/atomic64_test.c index cb99b91c3a1d..00bca223d1e1 100644 --- a/trunk/lib/atomic64_test.c +++ b/trunk/lib/atomic64_test.c @@ -114,8 +114,7 @@ static __init int test_atomic64(void) r += one; BUG_ON(v.counter != r); -#if defined(CONFIG_X86) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || \ - defined(CONFIG_S390) || defined(_ASM_GENERIC_ATOMIC64_H) || defined(CONFIG_ARM) +#ifdef CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE INIT(onestwos); BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1)); r -= one; @@ -129,7 +128,7 @@ static __init int test_atomic64(void) BUG_ON(atomic64_dec_if_positive(&v) != (-one - one)); BUG_ON(v.counter != r); #else -#warning Please implement atomic64_dec_if_positive for your architecture, and add it to the IF above +#warning Please implement atomic64_dec_if_positive for your architecture and select the above Kconfig symbol #endif INIT(onestwos);