diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-04-04 17:48:28 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-06 05:47:34 -0400 |
commit | bacdbe077342ecc9e7b3e374cc5a41995116706a (patch) | |
tree | b5cf9547a0ab4a7fba287a3d654d132869057afa /drivers/base/regmap/regcache-rbtree.c | |
parent | 0135bbcc7a0cc056f0203ff839466236b8e3dc19 (diff) |
regmap: introduce fast_io busses, and use a spinlock for them
Some bus types have very fast IO. For these, acquiring a mutex for every
IO operation is a significant overhead. Allow busses to indicate their IO
is fast, and enhance regmap to use a spinlock for those busses.
[Currently limited to native endian registers -- broonie]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/regcache-rbtree.c')
-rw-r--r-- | drivers/base/regmap/regcache-rbtree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c index 5157fa04c2f0..cca46007d969 100644 --- a/drivers/base/regmap/regcache-rbtree.c +++ b/drivers/base/regmap/regcache-rbtree.c | |||
@@ -139,7 +139,7 @@ static int rbtree_show(struct seq_file *s, void *ignored) | |||
139 | int nodes = 0; | 139 | int nodes = 0; |
140 | int registers = 0; | 140 | int registers = 0; |
141 | 141 | ||
142 | mutex_lock(&map->lock); | 142 | map->lock(map); |
143 | 143 | ||
144 | for (node = rb_first(&rbtree_ctx->root); node != NULL; | 144 | for (node = rb_first(&rbtree_ctx->root); node != NULL; |
145 | node = rb_next(node)) { | 145 | node = rb_next(node)) { |
@@ -155,7 +155,7 @@ static int rbtree_show(struct seq_file *s, void *ignored) | |||
155 | seq_printf(s, "%d nodes, %d registers, average %d registers\n", | 155 | seq_printf(s, "%d nodes, %d registers, average %d registers\n", |
156 | nodes, registers, registers / nodes); | 156 | nodes, registers, registers / nodes); |
157 | 157 | ||
158 | mutex_unlock(&map->lock); | 158 | map->unlock(map); |
159 | 159 | ||
160 | return 0; | 160 | return 0; |
161 | } | 161 | } |