From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932121AbWGGKZE (ORCPT ); Fri, 7 Jul 2006 06:25:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932122AbWGGKZE (ORCPT ); Fri, 7 Jul 2006 06:25:04 -0400 Received: from liaag2ag.mx.compuserve.com ([149.174.40.158]:49061 "EHLO liaag2ag.mx.compuserve.com") by vger.kernel.org with ESMTP id S932121AbWGGKZC (ORCPT ); Fri, 7 Jul 2006 06:25:02 -0400 Date: Fri, 7 Jul 2006 06:21:17 -0400 From: Chuck Ebbert <76306.1226@compuserve.com> Subject: Re: [patch] spinlocks: remove 'volatile' To: Linus Torvalds Cc: linux-kernel , Ingo Molnar , Arjan van de Ven Message-ID: <200607070623_MC3-1-C45A-2429@compuserve.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org In-Reply-To: On Thu, 6 Jul 2006 13:34:14 -0700, Linus Torvalds wrote: > > So I _think_ that we should change the "=m" to the much more correct "+m" > > at the same time (or before - it's really a bug-fix regardless) as > > removing the "volatile". > > Here's a first cut (UNTESTED!) for x86. I didn't check any other > architectures, I bet they have similar problems. > #define __raw_spin_unlock_string \ > "movb $1,%0" \ > - :"=m" (lock->slock) : : "memory" > + :"+m" (lock->slock) : : "memory" This really is just an overwrite of whatever is there. OTOH I can't see how this change could hurt anything.. -- Chuck "You can't read a newspaper if you can't read." --George W. Bush