Re: Should io(read|write)(8|16|32)_rep take (const|) volatile u(8|16|32) __iomem *addr?

Jeff Garzik
2007-02-02T11:07:58Z

H. Peter Anvin wrote:
> Jeff Garzik wrote:
>> Volatile is usually reserved for a specific need on a specific arch.
>> I doubt it is correct to force it on all arches.
>
> They already are volatile; the issue is adding "const".
>
> All io(read|write)* pointers are volatile, IIRC.

No, none are volatile, hence my comment.

> [jgarzik@pretzel linux-2.6]$ grep volatile lib/iomap.c include/asm-generic/iomap.h
> [jgarzik@pretzel linux-2.6]$

Maybe you were thinking about writel() and friends, whose implementation
(not prototype!) includes use of volatile.

Regards,

Jeff