public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regmap: Warn on raw I/O as well as bulk reads that bypass cache
@ 2011-10-09 13:38 Mark Brown
  2011-10-10  9:01 ` Dimitris Papastamos
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-10-09 13:38 UTC (permalink / raw)
  To: dp; +Cc: patches, linux-kernel, Mark Brown

As with the bulk reads we really should be able to make these play
nicely with the cache but warn for now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/base/regmap/regmap.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index d786ddc..85bffdd 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -377,6 +377,8 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
 {
 	int ret;
 
+	WARN_ON(map->cache_type != REGCACHE_NONE);
+
 	mutex_lock(&map->lock);
 
 	ret = _regmap_raw_write(map, reg, val, val_len);
@@ -481,6 +483,8 @@ int regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
 {
 	int ret;
 
+	WARN_ON(map->cache_type != REGCACHE_NONE);
+
 	mutex_lock(&map->lock);
 
 	ret = _regmap_raw_read(map, reg, val, val_len);
-- 
1.7.6.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regmap: Warn on raw I/O as well as bulk reads that bypass cache
  2011-10-09 13:38 [PATCH] regmap: Warn on raw I/O as well as bulk reads that bypass cache Mark Brown
@ 2011-10-10  9:01 ` Dimitris Papastamos
  0 siblings, 0 replies; 2+ messages in thread
From: Dimitris Papastamos @ 2011-10-10  9:01 UTC (permalink / raw)
  To: Mark Brown; +Cc: patches, linux-kernel

On Sun, Oct 09, 2011 at 02:38:54PM +0100, Mark Brown wrote:
> As with the bulk reads we really should be able to make these play
> nicely with the cache but warn for now.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  drivers/base/regmap/regmap.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index d786ddc..85bffdd 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -377,6 +377,8 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
>  {
>  	int ret;
>  
> +	WARN_ON(map->cache_type != REGCACHE_NONE);
> +
>  	mutex_lock(&map->lock);
>  
>  	ret = _regmap_raw_write(map, reg, val, val_len);
> @@ -481,6 +483,8 @@ int regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
>  {
>  	int ret;
>  
> +	WARN_ON(map->cache_type != REGCACHE_NONE);
> +
>  	mutex_lock(&map->lock);
>  
>  	ret = _regmap_raw_read(map, reg, val, val_len);
> -- 
> 1.7.6.3

All of them look good.

Acked-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-10  9:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-09 13:38 [PATCH] regmap: Warn on raw I/O as well as bulk reads that bypass cache Mark Brown
2011-10-10  9:01 ` Dimitris Papastamos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox