Re: [PATCH 13/26] ARM: pxa: use correct __iomem annotations

From: Russell King - ARM Linux
Date: Fri Oct 07 2011 - 04:51:37 EST

On Fri, Oct 07, 2011 at 04:11:01PM +0800, Eric Miao wrote:
> To be honest, I'd really like to keep the *_VIRT_BASE definitions to be
> type independent.
> And have the actual register definitions to be casted to void __iomem *
> when being defined, e.g.
> #define APBC_REG(x) IOMEM(APBC_VIRT_BASE + (x))
> #define APBC_UART1 APBC_REG(0x000)
> Arnd, do we have some standard guidelines on this for all SoCs
> to follow? As I know, it's currently still being a mess.

It makes much more sense for the base address to be correctly typed (even
though it does mean a cast in the map_desc tables). It avoids type
problems if someone does readl(APBC_VIRT_BASE + reg) somewhere, and
also avoids type problems should someone decide to pass the base address
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at