From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "smtp.linux-foundation.org", Issuer "CA Cert Signing Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id BA365DE14A for ; Thu, 12 Jun 2008 00:46:41 +1000 (EST) Date: Wed, 11 Jun 2008 07:46:03 -0700 (PDT) From: Linus Torvalds To: Nick Piggin Subject: Re: MMIO and gcc re-ordering issue In-Reply-To: <200806111500.30789.nickpiggin@yahoo.com.au> Message-ID: References: <1211852026.3286.36.camel@pasglop> <200806101656.51211.nickpiggin@yahoo.com.au> <18511.21025.978328.596571@cargo.ozlabs.ibm.com> <200806111500.30789.nickpiggin@yahoo.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: linux-arch@vger.kernel.org, Russell King , Matthew Wilcox , linux-kernel@vger.kernel.org, Trent Piepho , linuxppc-dev@ozlabs.org, Paul Mackerras , scottwood@freescale.com, David Miller , alan@lxorguk.ukuu.org.uk List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 11 Jun 2008, Nick Piggin wrote: > > I can't actually find the definitive statement in the Intel manuals > saying UC is strongly ordered also WRT WB. Linus? Definitive? Dunno. But look in the Architecture manual, volume 3A, 10.3 "Methods of Caching Available", and then under the bullet about Write Combining (WC), it says the writes may be delayed until the next occurrence of a serializing event; such as, an SFENCE of MFENCE instruction, CPUID execution, a read or write to uncached memory, an interrupt occurrence, or a LOCK instruction execution. However, it's worth noting that - documentation can be wrong, or even if right, can be Intel-specific. - the above is expressly _only_ about the WC buffer, not about regular memory writes. Cached memory accesses are different from WC accesses. so in the end, the thing that matters is how things actually work. Linus