[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46455394.6020302@zytor.com>
Date: Fri, 11 May 2007 22:41:40 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Satyam Sharma <satyam.sharma@...il.com>
CC: Jonathan Corbet <corbet@....net>, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, Johannes Stezenbach <js@...uxtv.org>,
Jesper Juhl <jesper.juhl@...il.com>,
Randy Dunlap <randy.dunlap@...cle.com>,
Heikki Orsila <shdl@...alwe.fi>,
jimmy bahuleyan <knight.camelot@...il.com>,
Stefan Richter <stefanr@...6.in-berlin.de>
Subject: Re: [PATCH] "volatile considered harmful", take 3
H. Peter Anvin wrote:
>
> I don't see why Alan's way is necessarily better; it should work but is
> more heavy-handed as it's disabling *all* optimization such as loop
> invariants across the barrier.
>
To expand on this further: the way this probably *should* be handled,
Linux-style, is with internally-volatile versions of le32_to_cpup() and
friends. That obeys the concept that the volatility should be
associated with an operation, not a data structure, and, being related
to an I/O device, should have its endianness explicitly declared.
Right now those macros don't exist, however.
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists