* [PATCH] basic_mmio_gpio: convert to non-__raw* accessors
@ 2011-04-11 16:11 Jamie Iles
2011-04-11 16:35 ` Anton Vorontsov
2011-05-03 19:42 ` Grant Likely
0 siblings, 2 replies; 3+ messages in thread
From: Jamie Iles @ 2011-04-11 16:11 UTC (permalink / raw)
To: linux-kernel; +Cc: linus.walleij, Jamie Iles, Anton Vorontsov, Grant Likely
The __raw_* accessors don't include memory barriers and can cause
problems when writes get stuck in write buffers.
Suggested-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Anton Vorontsov <cbouatmailru@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
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(-)
diff --git a/drivers/gpio/basic_mmio_gpio.c b/drivers/gpio/basic_mmio_gpio.c
index f4afd96..b2ec45f 100644
--- a/drivers/gpio/basic_mmio_gpio.c
+++ b/drivers/gpio/basic_mmio_gpio.c
@@ -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 */
--
1.7.4.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] basic_mmio_gpio: convert to non-__raw* accessors
2011-04-11 16:11 [PATCH] basic_mmio_gpio: convert to non-__raw* accessors Jamie Iles
@ 2011-04-11 16:35 ` Anton Vorontsov
2011-05-03 19:42 ` Grant Likely
1 sibling, 0 replies; 3+ messages in thread
From: Anton Vorontsov @ 2011-04-11 16:35 UTC (permalink / raw)
To: Jamie Iles; +Cc: linux-kernel, linus.walleij, Grant Likely
On Mon, Apr 11, 2011 at 05:11:26PM +0100, Jamie Iles wrote:
> The __raw_* accessors don't include memory barriers and can cause
> problems when writes get stuck in write buffers.
>
> Suggested-by: Linus Walleij <linus.walleij@linaro.org>
> Cc: Anton Vorontsov <cbouatmailru@gmail.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Thanks!
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] basic_mmio_gpio: convert to non-__raw* accessors
2011-04-11 16:11 [PATCH] basic_mmio_gpio: convert to non-__raw* accessors Jamie Iles
2011-04-11 16:35 ` Anton Vorontsov
@ 2011-05-03 19:42 ` Grant Likely
1 sibling, 0 replies; 3+ messages in thread
From: Grant Likely @ 2011-05-03 19:42 UTC (permalink / raw)
To: Jamie Iles; +Cc: linux-kernel, linus.walleij, Anton Vorontsov
On Mon, Apr 11, 2011 at 05:11:26PM +0100, Jamie Iles wrote:
> The __raw_* accessors don't include memory barriers and can cause
> problems when writes get stuck in write buffers.
>
> Suggested-by: Linus Walleij <linus.walleij@linaro.org>
> Cc: Anton Vorontsov <cbouatmailru@gmail.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Merged, thanks.
g.
> ---
>
> 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(-)
>
> diff --git a/drivers/gpio/basic_mmio_gpio.c b/drivers/gpio/basic_mmio_gpio.c
> index f4afd96..b2ec45f 100644
> --- a/drivers/gpio/basic_mmio_gpio.c
> +++ b/drivers/gpio/basic_mmio_gpio.c
> @@ -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 */
>
> --
> 1.7.4.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-03 19:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-11 16:11 [PATCH] basic_mmio_gpio: convert to non-__raw* accessors Jamie Iles
2011-04-11 16:35 ` Anton Vorontsov
2011-05-03 19:42 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox