From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH -v2 1/4] Add Kconfig option ARCH_HAVE_NMI_SAFE_CMPXCHG Date: Thu, 7 Apr 2011 18:39:53 +0100 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 Return-path: Content-Disposition: inline In-Reply-To: <1302139746-1030-2-git-send-email-ying.huang@intel.com> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-acpi@vger.kernel.org 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.