Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756638AbXELFcr (ORCPT ); Sat, 12 May 2007 01:32:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754538AbXELFck (ORCPT ); Sat, 12 May 2007 01:32:40 -0400 Received: from terminus.zytor.com ([192.83.249.54]:34648 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754614AbXELFcj (ORCPT ); Sat, 12 May 2007 01:32:39 -0400 Message-ID: <46455168.6080904@zytor.com> Date: Fri, 11 May 2007 22:32:24 -0700 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.0 (X11/20070419) MIME-Version: 1.0 To: pradeep singh CC: Jan Engelhardt , Jonathan Corbet , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, Jesper Juhl , Randy Dunlap , Heikki Orsila , Satyam Sharma Subject: Re: [PATCH] "volatile considered harmful", take 2 References: <6143.1178828419@lwn.net> <46439284.6080901@zytor.com> <4644E469.8000603@zytor.com> <64026d4a0705112157p75d76956g40455c7402b096d6@mail.gmail.com> In-Reply-To: <64026d4a0705112157p75d76956g40455c7402b096d6@mail.gmail.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 902 Lines: 22 pradeep singh wrote: > > Sorry, for my misunderstanding but i hope Jonathan actually means > volatile harmful only in C and not while using extended asm with gcc? Or > does you all consider volatile while using extended asm as harmful too? > Incidentally i came to know that using volatile in such cases may be > still be optimized by the gcc. And the correct way is to fake a side > effect to the gcc, which can be done using "memory" clobbering directive > in the correct place and not "m" or "+m". > > Does this means to exclude volatile from extended asm also, while using > them in kernel? > We were talking about "register", not "volatile". -hpa - 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/