On Mon, 2013-02-11 at 16:57 +0100, Michal Simek wrote:
> But it reminds me that maybe the easiest solution is not to use endian
> accessors just use two simple macros which should work on all systems.
>
> #define <name>_readreg(offset) ({__raw_readl(offset); rmb(); })
> #define <name>_writereg(offset, val) ({wmb(); __raw_writel(val, offset); })
>
> which is probably the faster solution which add minimum additional code
> to driver and can also remove endian detection code.
Except that rmb & wmb might not be the right barriers for IOs ...
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/