Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
59e618a6
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
59e618a6
编写于
6月 03, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'regmap/fix/cache' into regmap-linus
上级
d683b96b
f3284f91
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
14 deletion
+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
未找到文件。
drivers/base/regmap/regcache-rbtree.c
浏览文件 @
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
浏览文件 @
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
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录