Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752995AbZI3UVs (ORCPT ); Wed, 30 Sep 2009 16:21:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752204AbZI3UVr (ORCPT ); Wed, 30 Sep 2009 16:21:47 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:54512 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbZI3UVr (ORCPT ); Wed, 30 Sep 2009 16:21:47 -0400 Date: Wed, 30 Sep 2009 13:20:58 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Eric Dumazet cc: Ingo Molnar , Arjan van de Ven , Martin Schwidefsky , Thomas Gleixner , John Stultz , Linux Kernel Mailing List , Peter Zijlstra Subject: Re: Linux 2.6.32-rc1 In-Reply-To: <4AC3BC89.2050404@gmail.com> Message-ID: References: <4AC060AE.1090401@gmail.com> <20090928191506.40b61793@mschwide.boeblingen.de.ibm.com> <4AC10365.7090802@gmail.com> <4AC2712C.4080901@gmail.com> <20090929232248.735bf4df@infradead.org> <20090930170754.0886ff2e@infradead.org> <20090930193204.GA16350@elte.hu> <4AC3BC89.2050404@gmail.com> User-Agent: Alpine 2.01 (LFD 1184 2008-12-16) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 869 Lines: 26 On Wed, 30 Sep 2009, Eric Dumazet wrote: > > +#define cmpxchg64(ptr, o, n) \ > > +({ \ > > + __typeof__(*(ptr)) __ret; \ > > + __typeof__(*(ptr)) __old = (o); \ > > + __typeof__(*(ptr)) __new = (n); \ > > + alternative_io("call cmpxchg8b_emu", \ > > + "lock; cmpxchg8b (%%esi)" , \ > > + X86_FEATURE_CX8, \ > > + "=A" (__ret), \ > > + "S" ((ptr)), "0" (__old), \ > > + "b" ((unsigned int)__new), \ > > + "c" ((unsigned int)(__new>>32))); \ > > probably a "memory" clobber is needed, alternative_io() doesnt provide it. Yeah, good catch. Linus -- 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/