Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755665Ab1DGRkv (ORCPT ); Thu, 7 Apr 2011 13:40:51 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:39207 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752624Ab1DGRku (ORCPT ); Thu, 7 Apr 2011 13:40:50 -0400 Date: Thu, 7 Apr 2011 18:39:53 +0100 From: Russell King - ARM Linux To: Huang Ying Cc: Len Brown , linux-kernel@vger.kernel.org, Andi Kleen , Tony Luck , linux-acpi@vger.kernel.org, Richard Henderson , Mikael Starvik , David Howells , Yoshinori Sato , Hirokazu Takata , Geert Uytterhoeven , Michal Simek , Ralf Baechle , Kyle McMartin , Martin Schwidefsky , Chen Liqin , "David S. Miller" , Ingo Molnar , Chris Zankel Subject: Re: [PATCH -v2 1/4] Add Kconfig option ARCH_HAVE_NMI_SAFE_CMPXCHG Message-ID: <20110407173953.GB17049@n2100.arm.linux.org.uk> References: <1302139746-1030-1-git-send-email-ying.huang@intel.com> <1302139746-1030-2-git-send-email-ying.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1302139746-1030-2-git-send-email-ying.huang@intel.com> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1037 Lines: 21 On Thu, Apr 07, 2011 at 09:29:03AM +0800, Huang Ying wrote: > 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). As this no longer touches any ARM code, I thinky you can drop me from the CC list. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/