Skip to contentSkip to conversation

basic_mmio_gpio: convert to non-__raw* accessors

PATCH Applied Jamie Iles 3 participants 3 messages Apr 11, 2011 – May 3, 2011 GPIO

lore
Share & tools
lore

Jamie Iles

author
#0 lore raw

PATCH 1/1 basic_mmio_gpio: convert to non-__raw* accessors

The __raw_* accessors don't include memory barriers and can cause problems when writes get stuck in write buffers.

---

Note: This patch is based on top of my other series to extend basic_mmio_gpio.

 drivers/gpio/basic_mmio_gpio.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpio/basic_mmio_gpio.c +8 -8
index f4afd96..b2ec45f 100644
@@ -101,43 +101,43 @@ static struct bgpio_chip *to_bgpio_chip(struct gpio_chip *gc)
 
 static void bgpio_write8(void __iomem *reg, unsigned long data)
 {
-	__raw_writeb(data, reg);
+	writeb(data, reg);
 }
 
 static unsigned long bgpio_read8(void __iomem *reg)
 {
-	return __raw_readb(reg);
+	return readb(reg);
 }
 
 static void bgpio_write16(void __iomem *reg, unsigned long data)
 {
-	__raw_writew(data, reg);
+	writew(data, reg);
 }
 
 static unsigned long bgpio_read16(void __iomem *reg)
 {
-	return __raw_readw(reg);
+	return readw(reg);
 }
 
 static void bgpio_write32(void __iomem *reg, unsigned long data)
 {
-	__raw_writel(data, reg);
+	writel(data, reg);
 }
 
 static unsigned long bgpio_read32(void __iomem *reg)
 {
-	return __raw_readl(reg);
+	return readl(reg);
 }
 
 #if BITS_PER_LONG >= 64
 static void bgpio_write64(void __iomem *reg, unsigned long data)
 {
-	__raw_writeq(data, reg);
+	writeq(data, reg);
 }
 
 static unsigned long bgpio_read64(void __iomem *reg)
 {
-	return __raw_readq(reg);
+	return readq(reg);
 }
 #endif /* BITS_PER_LONG >= 64 */
 
Signature · 1 line
1.7.4.2
Applied
#2 lore raw
In reply to Jamie Iles
Quoted 7 lines · Jamie Iles

The __raw_* accessors don't include memory barriers and can cause problems when writes get stuck in write buffers.

Merged, thanks.

g.

Quoted 67 lines

---

Note: This patch is based on top of my other series to extend basic_mmio_gpio.

 drivers/gpio/basic_mmio_gpio.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpio/basic_mmio_gpio.c +8 -8
index f4afd96..b2ec45f 100644
@@ -101,43 +101,43 @@ static struct bgpio_chip *to_bgpio_chip(struct gpio_chip *gc)
 
 static void bgpio_write8(void __iomem *reg, unsigned long data)
 {
-	__raw_writeb(data, reg);
+	writeb(data, reg);
 }
 
 static unsigned long bgpio_read8(void __iomem *reg)
 {
-	return __raw_readb(reg);
+	return readb(reg);
 }
 
 static void bgpio_write16(void __iomem *reg, unsigned long data)
 {
-	__raw_writew(data, reg);
+	writew(data, reg);
 }
 
 static unsigned long bgpio_read16(void __iomem *reg)
 {
-	return __raw_readw(reg);
+	return readw(reg);
 }
 
 static void bgpio_write32(void __iomem *reg, unsigned long data)
 {
-	__raw_writel(data, reg);
+	writel(data, reg);
 }
 
 static unsigned long bgpio_read32(void __iomem *reg)
 {
-	return __raw_readl(reg);
+	return readl(reg);
 }
 
 #if BITS_PER_LONG >= 64
 static void bgpio_write64(void __iomem *reg, unsigned long data)
 {
-	__raw_writeq(data, reg);
+	writeq(data, reg);
 }
 
 static unsigned long bgpio_read64(void __iomem *reg)
 {
-	return __raw_readq(reg);
+	return readq(reg);
 }
 #endif /* BITS_PER_LONG >= 64 */
 
Signature · 1 line
1.7.4.2