Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755474AbXJBPcd (ORCPT ); Tue, 2 Oct 2007 11:32:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752726AbXJBPcZ (ORCPT ); Tue, 2 Oct 2007 11:32:25 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:51961 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752422AbXJBPcY (ORCPT ); Tue, 2 Oct 2007 11:32:24 -0400 Date: Tue, 2 Oct 2007 08:28:56 -0700 From: Arjan van de Ven To: Kirill Korotaev Cc: Andrew Morton , Andi Kleen , Linux Kernel Mailing List , devel@openvz.org Subject: Re: [PATCH] mark read_crX() asm code as volatile Message-ID: <20071002082856.3c478e66@laptopd505.fenrus.org> In-Reply-To: <470250E0.5090706@openvz.org> References: <470250E0.5090706@openvz.org> Organization: Intel X-Mailer: Claws Mail 3.0.1 (GTK+ 2.12.0; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 698 Lines: 19 On Tue, 02 Oct 2007 18:08:32 +0400 Kirill Korotaev wrote: > Some gcc versions (I checked at least 4.1.1 from RHEL5 & 4.1.2 from > gentoo) can generate incorrect code with read_crX()/write_crX() > functions mix up, due to cached results of read_crX(). > I'm not so sure volatile is the right answer, as compared to giving the asm more strict contraints.... asm volatile tends to mean something else than "the result has changed".... - 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/