Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
2ed21dae
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
2ed21dae
编写于
5月 13, 2013
作者:
V
Vineet Gupta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARC: [mm] Assume pagecache page dirty by default
Similar to ARM/SH Signed-off-by:
N
Vineet Gupta
<
vgupta@synopsys.com
>
上级
fedf5b9b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
7 deletion
+14
-7
arch/arc/include/asm/cacheflush.h
arch/arc/include/asm/cacheflush.h
+7
-0
arch/arc/mm/cache_arc700.c
arch/arc/mm/cache_arc700.c
+6
-6
arch/arc/mm/tlb.c
arch/arc/mm/tlb.c
+1
-1
未找到文件。
arch/arc/include/asm/cacheflush.h
浏览文件 @
2ed21dae
...
@@ -80,6 +80,13 @@ void flush_anon_page(struct vm_area_struct *vma,
...
@@ -80,6 +80,13 @@ void flush_anon_page(struct vm_area_struct *vma,
#endif
/* CONFIG_ARC_CACHE_VIPT_ALIASING */
#endif
/* CONFIG_ARC_CACHE_VIPT_ALIASING */
/*
* A new pagecache page has PG_arch_1 clear - thus dcache dirty by default
* This works around some PIO based drivers which don't call flush_dcache_page
* to record that they dirtied the dcache
*/
#define PG_dc_clean PG_arch_1
/*
/*
* Simple wrapper over config option
* Simple wrapper over config option
* Bootup code ensures that hardware matches kernel configuration
* Bootup code ensures that hardware matches kernel configuration
...
...
arch/arc/mm/cache_arc700.c
浏览文件 @
2ed21dae
...
@@ -512,7 +512,7 @@ void flush_dcache_page(struct page *page)
...
@@ -512,7 +512,7 @@ void flush_dcache_page(struct page *page)
struct
address_space
*
mapping
;
struct
address_space
*
mapping
;
if
(
!
cache_is_vipt_aliasing
())
{
if
(
!
cache_is_vipt_aliasing
())
{
set_bit
(
PG_arch_1
,
&
page
->
flags
);
clear_bit
(
PG_dc_clean
,
&
page
->
flags
);
return
;
return
;
}
}
...
@@ -526,7 +526,7 @@ void flush_dcache_page(struct page *page)
...
@@ -526,7 +526,7 @@ void flush_dcache_page(struct page *page)
* Make a note that K-mapping is dirty
* Make a note that K-mapping is dirty
*/
*/
if
(
!
mapping_mapped
(
mapping
))
{
if
(
!
mapping_mapped
(
mapping
))
{
set_bit
(
PG_arch_1
,
&
page
->
flags
);
clear_bit
(
PG_dc_clean
,
&
page
->
flags
);
}
else
if
(
page_mapped
(
page
))
{
}
else
if
(
page_mapped
(
page
))
{
/* kernel reading from page with U-mapping */
/* kernel reading from page with U-mapping */
...
@@ -734,7 +734,7 @@ void copy_user_highpage(struct page *to, struct page *from,
...
@@ -734,7 +734,7 @@ void copy_user_highpage(struct page *to, struct page *from,
* non copied user pages (e.g. read faults which wire in pagecache page
* non copied user pages (e.g. read faults which wire in pagecache page
* directly).
* directly).
*/
*/
set_bit
(
PG_arch_1
,
&
to
->
flags
);
clear_bit
(
PG_dc_clean
,
&
to
->
flags
);
/*
/*
* if SRC was already usermapped and non-congruent to kernel mapping
* if SRC was already usermapped and non-congruent to kernel mapping
...
@@ -742,16 +742,16 @@ void copy_user_highpage(struct page *to, struct page *from,
...
@@ -742,16 +742,16 @@ void copy_user_highpage(struct page *to, struct page *from,
*/
*/
if
(
clean_src_k_mappings
)
{
if
(
clean_src_k_mappings
)
{
__flush_dcache_page
(
kfrom
,
kfrom
);
__flush_dcache_page
(
kfrom
,
kfrom
);
clear_bit
(
PG_arch_1
,
&
from
->
flags
);
set_bit
(
PG_dc_clean
,
&
from
->
flags
);
}
else
{
}
else
{
set_bit
(
PG_arch_1
,
&
from
->
flags
);
clear_bit
(
PG_dc_clean
,
&
from
->
flags
);
}
}
}
}
void
clear_user_page
(
void
*
to
,
unsigned
long
u_vaddr
,
struct
page
*
page
)
void
clear_user_page
(
void
*
to
,
unsigned
long
u_vaddr
,
struct
page
*
page
)
{
{
clear_page
(
to
);
clear_page
(
to
);
set_bit
(
PG_arch_1
,
&
page
->
flags
);
clear_bit
(
PG_dc_clean
,
&
page
->
flags
);
}
}
...
...
arch/arc/mm/tlb.c
浏览文件 @
2ed21dae
...
@@ -453,7 +453,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned,
...
@@ -453,7 +453,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned,
if
((
vma
->
vm_flags
&
VM_EXEC
)
||
if
((
vma
->
vm_flags
&
VM_EXEC
)
||
addr_not_cache_congruent
(
paddr
,
vaddr
))
{
addr_not_cache_congruent
(
paddr
,
vaddr
))
{
int
dirty
=
test_and_clear_bit
(
PG_arch_1
,
&
page
->
flags
);
int
dirty
=
!
test_and_set_bit
(
PG_dc_clean
,
&
page
->
flags
);
if
(
dirty
)
{
if
(
dirty
)
{
/* wback + inv dcache lines */
/* wback + inv dcache lines */
__flush_dcache_page
(
paddr
,
paddr
);
__flush_dcache_page
(
paddr
,
paddr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录