Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
59e618a6
Commit
59e618a6
authored
Jun 03, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regmap/fix/cache' into regmap-linus
parents
d683b96b
f3284f91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
drivers/base/regmap/regcache-rbtree.c
drivers/base/regmap/regcache-rbtree.c
+2
-4
drivers/base/regmap/regcache.c
drivers/base/regmap/regcache.c
+10
-10
No files found.
drivers/base/regmap/regcache-rbtree.c
View file @
59e618a6
...
...
@@ -143,7 +143,7 @@ static int rbtree_show(struct seq_file *s, void *ignored)
int
registers
=
0
;
int
this_registers
,
average
;
map
->
lock
(
map
);
map
->
lock
(
map
->
lock_arg
);
mem_size
=
sizeof
(
*
rbtree_ctx
);
mem_size
+=
BITS_TO_LONGS
(
map
->
cache_present_nbits
)
*
sizeof
(
long
);
...
...
@@ -170,7 +170,7 @@ static int rbtree_show(struct seq_file *s, void *ignored)
seq_printf
(
s
,
"%d nodes, %d registers, average %d registers, used %zu bytes
\n
"
,
nodes
,
registers
,
average
,
mem_size
);
map
->
unlock
(
map
);
map
->
unlock
(
map
->
lock_arg
);
return
0
;
}
...
...
@@ -391,8 +391,6 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
for
(
node
=
rb_first
(
&
rbtree_ctx
->
root
);
node
;
node
=
rb_next
(
node
))
{
rbnode
=
rb_entry
(
node
,
struct
regcache_rbtree_node
,
node
);
if
(
rbnode
->
base_reg
<
min
)
continue
;
if
(
rbnode
->
base_reg
>
max
)
break
;
if
(
rbnode
->
base_reg
+
rbnode
->
blklen
<
min
)
...
...
drivers/base/regmap/regcache.c
View file @
59e618a6
...
...
@@ -270,7 +270,7 @@ int regcache_sync(struct regmap *map)
BUG_ON
(
!
map
->
cache_ops
||
!
map
->
cache_ops
->
sync
);
map
->
lock
(
map
);
map
->
lock
(
map
->
lock_arg
);
/* Remember the initial bypass state */
bypass
=
map
->
cache_bypass
;
dev_dbg
(
map
->
dev
,
"Syncing %s cache
\n
"
,
...
...
@@ -306,7 +306,7 @@ int regcache_sync(struct regmap *map)
trace_regcache_sync
(
map
->
dev
,
name
,
"stop"
);
/* Restore the bypass state */
map
->
cache_bypass
=
bypass
;
map
->
unlock
(
map
);
map
->
unlock
(
map
->
lock_arg
);
return
ret
;
}
...
...
@@ -333,7 +333,7 @@ int regcache_sync_region(struct regmap *map, unsigned int min,
BUG_ON
(
!
map
->
cache_ops
||
!
map
->
cache_ops
->
sync
);
map
->
lock
(
map
);
map
->
lock
(
map
->
lock_arg
);
/* Remember the initial bypass state */
bypass
=
map
->
cache_bypass
;
...
...
@@ -352,7 +352,7 @@ int regcache_sync_region(struct regmap *map, unsigned int min,
trace_regcache_sync
(
map
->
dev
,
name
,
"stop region"
);
/* Restore the bypass state */
map
->
cache_bypass
=
bypass
;
map
->
unlock
(
map
);
map
->
unlock
(
map
->
lock_arg
);
return
ret
;
}
...
...
@@ -372,11 +372,11 @@ EXPORT_SYMBOL_GPL(regcache_sync_region);
*/
void
regcache_cache_only
(
struct
regmap
*
map
,
bool
enable
)
{
map
->
lock
(
map
);
map
->
lock
(
map
->
lock_arg
);
WARN_ON
(
map
->
cache_bypass
&&
enable
);
map
->
cache_only
=
enable
;
trace_regmap_cache_only
(
map
->
dev
,
enable
);
map
->
unlock
(
map
);
map
->
unlock
(
map
->
lock_arg
);
}
EXPORT_SYMBOL_GPL
(
regcache_cache_only
);
...
...
@@ -391,9 +391,9 @@ EXPORT_SYMBOL_GPL(regcache_cache_only);
*/
void
regcache_mark_dirty
(
struct
regmap
*
map
)
{
map
->
lock
(
map
);
map
->
lock
(
map
->
lock_arg
);
map
->
cache_dirty
=
true
;
map
->
unlock
(
map
);
map
->
unlock
(
map
->
lock_arg
);
}
EXPORT_SYMBOL_GPL
(
regcache_mark_dirty
);
...
...
@@ -410,11 +410,11 @@ EXPORT_SYMBOL_GPL(regcache_mark_dirty);
*/
void
regcache_cache_bypass
(
struct
regmap
*
map
,
bool
enable
)
{
map
->
lock
(
map
);
map
->
lock
(
map
->
lock_arg
);
WARN_ON
(
map
->
cache_only
&&
enable
);
map
->
cache_bypass
=
enable
;
trace_regmap_cache_bypass
(
map
->
dev
,
enable
);
map
->
unlock
(
map
);
map
->
unlock
(
map
->
lock_arg
);
}
EXPORT_SYMBOL_GPL
(
regcache_cache_bypass
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment