Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
129cbed5
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
129cbed5
编写于
12月 05, 2013
作者:
V
Vineet Gupta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARC: mm: pte flags comsetic cleanups, comments
No semantical changes Signed-off-by:
N
Vineet Gupta
<
vgupta@synopsys.com
>
上级
e8a75963
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
22 deletion
+17
-22
arch/arc/include/asm/pgtable.h
arch/arc/include/asm/pgtable.h
+16
-21
arch/arc/mm/tlbex.S
arch/arc/mm/tlbex.S
+1
-1
未找到文件。
arch/arc/include/asm/pgtable.h
浏览文件 @
129cbed5
...
...
@@ -60,7 +60,7 @@
#define _PAGE_EXECUTE (1<<3)
/* Page has user execute perm (H) */
#define _PAGE_WRITE (1<<4)
/* Page has user write perm (H) */
#define _PAGE_READ (1<<5)
/* Page has user read perm (H) */
#define _PAGE_
MODIFIED
(1<<6)
/* Page modified (dirty) (S) */
#define _PAGE_
DIRTY
(1<<6)
/* Page modified (dirty) (S) */
#define _PAGE_GLOBAL (1<<8)
/* Page is global (H) */
#define _PAGE_PRESENT (1<<10)
/* TLB entry is valid (H) */
...
...
@@ -71,7 +71,7 @@
#define _PAGE_WRITE (1<<2)
/* Page has user write perm (H) */
#define _PAGE_READ (1<<3)
/* Page has user read perm (H) */
#define _PAGE_ACCESSED (1<<4)
/* Page is accessed (S) */
#define _PAGE_
MODIFIED
(1<<5)
/* Page modified (dirty) (S) */
#define _PAGE_
DIRTY
(1<<5)
/* Page modified (dirty) (S) */
#if (CONFIG_ARC_MMU_VER >= 4)
#define _PAGE_WTHRU (1<<7)
/* Page cache mode write-thru (H) */
...
...
@@ -92,21 +92,16 @@
#define _K_PAGE_PERMS (_PAGE_EXECUTE | _PAGE_WRITE | _PAGE_READ | \
_PAGE_GLOBAL | _PAGE_PRESENT)
#ifdef CONFIG_ARC_CACHE_PAGES
#define _PAGE_DEF_CACHEABLE _PAGE_CACHEABLE
#else
#define _PAGE_DEF_CACHEABLE (0)
#ifndef CONFIG_ARC_CACHE_PAGES
#undef _PAGE_CACHEABLE
#define _PAGE_CACHEABLE 0
#endif
/* Helper for every "user" page
* -kernel can R/W/X
* -by default cached, unless config otherwise
* -present in memory
*/
#define ___DEF (_PAGE_PRESENT | _PAGE_DEF_CACHEABLE)
/* Defaults for every user page */
#define ___DEF (_PAGE_PRESENT | _PAGE_CACHEABLE)
/* Set of bits not changed in pte_modify */
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_
MODIFIED
)
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_
DIRTY
)
/* More Abbrevaited helpers */
#define PAGE_U_NONE __pgprot(___DEF)
...
...
@@ -122,7 +117,7 @@
* user vaddr space - visible in all addr spaces, but kernel mode only
* Thus Global, all-kernel-access, no-user-access, cached
*/
#define PAGE_KERNEL __pgprot(_K_PAGE_PERMS | _PAGE_
DEF_
CACHEABLE)
#define PAGE_KERNEL __pgprot(_K_PAGE_PERMS | _PAGE_CACHEABLE)
/* ioremap */
#define PAGE_KERNEL_NO_CACHE __pgprot(_K_PAGE_PERMS)
...
...
@@ -191,16 +186,16 @@
/* Optimal Sizing of Pg Tbl - based on MMU page size */
#if defined(CONFIG_ARC_PAGE_SIZE_8K)
#define BITS_FOR_PTE 8
#define BITS_FOR_PTE 8
/* 11:8:13 */
#elif defined(CONFIG_ARC_PAGE_SIZE_16K)
#define BITS_FOR_PTE 8
#define BITS_FOR_PTE 8
/* 10:8:14 */
#elif defined(CONFIG_ARC_PAGE_SIZE_4K)
#define BITS_FOR_PTE 9
#define BITS_FOR_PTE 9
/* 11:9:12 */
#endif
#define BITS_FOR_PGD (32 - BITS_FOR_PTE - BITS_IN_PAGE)
#define PGDIR_SHIFT (
BITS_FOR_PTE + BITS_IN_PAGE
)
#define PGDIR_SHIFT (
32 - BITS_FOR_PGD
)
#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
/* vaddr span, not PDG sz */
#define PGDIR_MASK (~(PGDIR_SIZE-1))
...
...
@@ -295,7 +290,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
/* Zoo of pte_xxx function */
#define pte_read(pte) (pte_val(pte) & _PAGE_READ)
#define pte_write(pte) (pte_val(pte) & _PAGE_WRITE)
#define pte_dirty(pte) (pte_val(pte) & _PAGE_
MODIFIED
)
#define pte_dirty(pte) (pte_val(pte) & _PAGE_
DIRTY
)
#define pte_young(pte) (pte_val(pte) & _PAGE_ACCESSED)
#define pte_special(pte) (0)
...
...
@@ -304,8 +299,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
PTE_BIT_FUNC
(
wrprotect
,
&=
~
(
_PAGE_WRITE
));
PTE_BIT_FUNC
(
mkwrite
,
|=
(
_PAGE_WRITE
));
PTE_BIT_FUNC
(
mkclean
,
&=
~
(
_PAGE_
MODIFIED
));
PTE_BIT_FUNC
(
mkdirty
,
|=
(
_PAGE_
MODIFIED
));
PTE_BIT_FUNC
(
mkclean
,
&=
~
(
_PAGE_
DIRTY
));
PTE_BIT_FUNC
(
mkdirty
,
|=
(
_PAGE_
DIRTY
));
PTE_BIT_FUNC
(
mkold
,
&=
~
(
_PAGE_ACCESSED
));
PTE_BIT_FUNC
(
mkyoung
,
|=
(
_PAGE_ACCESSED
));
PTE_BIT_FUNC
(
exprotect
,
&=
~
(
_PAGE_EXECUTE
));
...
...
arch/arc/mm/tlbex.S
浏览文件 @
129cbed5
...
...
@@ -365,7 +365,7 @@ ENTRY(EV_TLBMissD)
lr
r3
,
[
ecr
]
or
r0
,
r0
,
_PAGE_ACCESSED
; Accessed bit always
btst_s
r3
,
ECR_C_BIT_DTLB_ST_MISS
; See if it was a Write Access ?
or.nz
r0
,
r0
,
_PAGE_
MODIFIED
; if Write, set Dirty bit as well
or.nz
r0
,
r0
,
_PAGE_
DIRTY
; if Write, set Dirty bit as well
st_s
r0
,
[
r1
]
; Write back PTE
CONV_PTE_TO_TLB
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录