[PATCH v3 1/3] ARM: Introduce *_relaxed() I/O accessors
Catalin Marinas
catalin.marinas at arm.com
Wed Jul 14 11:24:39 EDT 2010
On Wed, 2010-07-14 at 16:15 +0100, Giuseppe Calderaro wrote:
> +#define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c)))
> +#define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \
> + cpu_to_le16(v),__mem_pci(c)))
> +#define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \
>
> Adding the cast here means that someone could use the __raw_writeb/w/l
> macros and still get the side effect.
> What about adding the same cast to the __raw_* defines as well?
Those macros were too long already :). Those macros have a different
construct with a comma inside the brackets. I'm not sure about the
resulting type.
But anyway, we've had the __raw_ accessors for a long time and haven't
seen any problem.
--
Catalin
More information about the linux-arm-kernel
mailing list