The patch titled llist: add Kconfig option ARCH_HAVE_NMI_SAFE_CMPXCHG has been removed from the -mm tree. Its filename was llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg.patch This patch was dropped because an alternative patch was merged The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: llist: add Kconfig option ARCH_HAVE_NMI_SAFE_CMPXCHG From: Huang Ying <ying.huang@xxxxxxxxx> cmpxchg() is widely used by lockless code, including NMI-safe lockless code. But on some architectures, the cmpxchg() implementation is not NMI-safe, on these architectures the lockless code may need to a spin_trylock_irqsave() based implementation. This patch adds a Kconfig option: ARCH_HAVE_NMI_SAFE_CMPXCHG, so that NMI-safe lockless code can depend on it or provide different implementation according to it. On many architectures, cmpxchg is only NMI-safe for several specific operand sizes. So, ARCH_HAVE_NMI_SAFE_CMPXCHG define in this patch only guarantees cmpxchg is NMI-safe for sizeof(unsigned long). Signed-off-by: Huang Ying <ying.huang@xxxxxxxxx> Acked-by: Mike Frysinger <vapier@xxxxxxxxxx> Acked-by: Paul Mundt <lethal@xxxxxxxxxxxx> Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@xxxxxxxxx> Acked-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Acked-by: Chris Metcalf <cmetcalf@xxxxxxxxxx> Cc: Richard Henderson <rth@xxxxxxxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxxx> Cc: Mikael Starvik <starvik@xxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx> Cc: Tony Luck <tony.luck@xxxxxxxxx> Cc: Hirokazu Takata <takata@xxxxxxxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Michal Simek <monstr@xxxxxxxxx> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Cc: Kyle McMartin <kyle@xxxxxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Chen Liqin <liqin.chen@xxxxxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Chris Zankel <chris@xxxxxxxxxx> Cc: Andy Grover <andy.grover@xxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/Kconfig | 3 +++ arch/alpha/Kconfig | 1 + arch/avr32/Kconfig | 1 + arch/frv/Kconfig | 1 + arch/ia64/Kconfig | 1 + arch/m68k/Kconfig | 1 + arch/parisc/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/s390/Kconfig | 1 + arch/sh/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/tile/Kconfig | 1 + arch/x86/Kconfig | 1 + 13 files changed, 15 insertions(+) diff -puN arch/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/Kconfig --- a/arch/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/Kconfig @@ -181,4 +181,7 @@ config HAVE_ARCH_JUMP_LABEL config HAVE_ARCH_MUTEX_CPU_RELAX bool +config ARCH_HAVE_NMI_SAFE_CMPXCHG + bool + source "kernel/gcov/Kconfig" diff -puN arch/alpha/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/alpha/Kconfig --- a/arch/alpha/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/alpha/Kconfig @@ -7,6 +7,7 @@ config ALPHA select HAVE_SYSCALL_WRAPPERS select HAVE_IRQ_WORK select HAVE_PERF_EVENTS + select ARCH_HAVE_NMI_SAFE_CMPXCHG select HAVE_DMA_ATTRS select HAVE_GENERIC_HARDIRQS select GENERIC_IRQ_PROBE diff -puN arch/avr32/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/avr32/Kconfig --- a/arch/avr32/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/avr32/Kconfig @@ -6,6 +6,7 @@ config AVR32 select HAVE_CLK select HAVE_OPROFILE select HAVE_KPROBES + select ARCH_HAVE_NMI_SAFE_CMPXCHG help AVR32 is a high-performance 32-bit RISC microprocessor core, designed for cost-sensitive embedded applications, with particular diff -puN arch/frv/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/frv/Kconfig --- a/arch/frv/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/frv/Kconfig @@ -5,6 +5,7 @@ config FRV select HAVE_ARCH_TRACEHOOK select HAVE_IRQ_WORK select HAVE_PERF_EVENTS + select ARCH_HAVE_NMI_SAFE_CMPXCHG select HAVE_GENERIC_HARDIRQS config ZONE_DMA diff -puN arch/ia64/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/ia64/Kconfig --- a/arch/ia64/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/ia64/Kconfig @@ -17,6 +17,7 @@ config IA64 select HAVE_KRETPROBES select HAVE_FTRACE_MCOUNT_RECORD select HAVE_DYNAMIC_FTRACE if (!ITANIUM) + select ARCH_HAVE_NMI_SAFE_CMPXCHG select HAVE_FUNCTION_TRACER select HAVE_DMA_ATTRS select HAVE_KVM diff -puN arch/m68k/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/m68k/Kconfig --- a/arch/m68k/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/m68k/Kconfig @@ -4,6 +4,7 @@ config M68K select HAVE_AOUT select HAVE_IDE select GENERIC_ATOMIC64 + select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS config MMU bool diff -puN arch/parisc/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/parisc/Kconfig --- a/arch/parisc/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/parisc/Kconfig @@ -11,6 +11,7 @@ config PARISC select BUG select HAVE_IRQ_WORK select HAVE_PERF_EVENTS + select ARCH_HAVE_NMI_SAFE_CMPXCHG select GENERIC_ATOMIC64 if !64BIT select HAVE_GENERIC_HARDIRQS select GENERIC_IRQ_PROBE diff -puN arch/powerpc/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/powerpc/Kconfig --- a/arch/powerpc/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/powerpc/Kconfig @@ -129,6 +129,7 @@ config PPC select GENERIC_ATOMIC64 if PPC32 select HAVE_IRQ_WORK select HAVE_PERF_EVENTS + select ARCH_HAVE_NMI_SAFE_CMPXCHG select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64 select HAVE_GENERIC_HARDIRQS diff -puN arch/s390/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/s390/Kconfig --- a/arch/s390/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/s390/Kconfig @@ -81,6 +81,7 @@ config S390 select INIT_ALL_POSSIBLE select HAVE_IRQ_WORK select HAVE_PERF_EVENTS + select ARCH_HAVE_NMI_SAFE_CMPXCHG select HAVE_KERNEL_GZIP select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_LZMA diff -puN arch/sh/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/sh/Kconfig --- a/arch/sh/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/sh/Kconfig @@ -11,6 +11,7 @@ config SUPERH select HAVE_DMA_ATTRS select HAVE_IRQ_WORK select HAVE_PERF_EVENTS + select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A) select PERF_USE_VMALLOC select HAVE_KERNEL_GZIP select HAVE_KERNEL_BZIP2 diff -puN arch/sparc/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/sparc/Kconfig --- a/arch/sparc/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/sparc/Kconfig @@ -38,6 +38,7 @@ config SPARC64 select HAVE_FUNCTION_TRACE_MCOUNT_TEST select HAVE_KRETPROBES select HAVE_KPROBES + select ARCH_HAVE_NMI_SAFE_CMPXCHG select HAVE_MEMBLOCK select HAVE_SYSCALL_WRAPPERS select HAVE_DYNAMIC_FTRACE diff -puN arch/tile/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/tile/Kconfig --- a/arch/tile/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/tile/Kconfig @@ -6,6 +6,7 @@ config TILE select HAVE_KVM if !TILEGX select GENERIC_FIND_FIRST_BIT select GENERIC_FIND_NEXT_BIT + select ARCH_HAVE_NMI_SAFE_CMPXCHG select USE_GENERIC_SMP_HELPERS select CC_OPTIMIZE_FOR_SIZE select HAVE_GENERIC_HARDIRQS diff -puN arch/x86/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg arch/x86/Kconfig --- a/arch/x86/Kconfig~llist-add-kconfig-option-arch_have_nmi_safe_cmpxchg +++ a/arch/x86/Kconfig @@ -23,6 +23,7 @@ config X86 select HAVE_OPROFILE select HAVE_PERF_EVENTS select HAVE_IRQ_WORK + select ARCH_HAVE_NMI_SAFE_CMPXCHG if !M386 select HAVE_IOREMAP_PROT select HAVE_KPROBES select HAVE_MEMBLOCK _ Patches currently in -mm which might be from ying.huang@xxxxxxxxx are linux-next.patch llist-lib-add-lock-less-null-terminated-single-list.patch llist-irq_work-use-llist-in-irq_work.patch llist-net-rds-replace-xlist-in-net-rds-xlisth-with-llist.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html