memory-barriers.txt has been updated with the following requirement.
"When using writel(), a prior wmb() is not needed to guarantee that the
cache coherent memory writes have completed before writing to the MMIO
region."
Current writeX() and iowriteX() implementations on alpha are not
satisfying this requirement as the barrier is after the register write.
Move mb() in writeX() and iowriteX() functions to guarantee that HW
observes memory changes before performing register operations.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Matt Turner <mattst88@gmail.com>
extern inline void iowrite8(u8 b, void __iomem *addr)
{
extern inline void iowrite8(u8 b, void __iomem *addr)
{
- IO_CONCAT(__IO_PREFIX,iowrite8)(b, addr);
+ IO_CONCAT(__IO_PREFIX, iowrite8)(b, addr);
}
extern inline void iowrite16(u16 b, void __iomem *addr)
{
}
extern inline void iowrite16(u16 b, void __iomem *addr)
{
- IO_CONCAT(__IO_PREFIX,iowrite16)(b, addr);
+ IO_CONCAT(__IO_PREFIX, iowrite16)(b, addr);
}
extern inline u8 inb(unsigned long port)
}
extern inline u8 inb(unsigned long port)
extern inline void iowrite32(u32 b, void __iomem *addr)
{
extern inline void iowrite32(u32 b, void __iomem *addr)
{
- IO_CONCAT(__IO_PREFIX,iowrite32)(b, addr);
+ IO_CONCAT(__IO_PREFIX, iowrite32)(b, addr);
}
extern inline u32 inl(unsigned long port)
}
extern inline u32 inl(unsigned long port)
extern inline void writeb(u8 b, volatile void __iomem *addr)
{
extern inline void writeb(u8 b, volatile void __iomem *addr)
{
}
extern inline void writew(u16 b, volatile void __iomem *addr)
{
}
extern inline void writew(u16 b, volatile void __iomem *addr)
{
extern inline void writel(u32 b, volatile void __iomem *addr)
{
extern inline void writel(u32 b, volatile void __iomem *addr)
{
}
extern inline void writeq(u64 b, volatile void __iomem *addr)
{
}
extern inline void writeq(u64 b, volatile void __iomem *addr)
{