Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d2f755e0
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看板
提交
d2f755e0
编写于
8月 16, 2005
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reindent dump_tlb.c.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
3fd5646c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
49 addition
and
34 deletion
+49
-34
arch/mips/lib-32/dump_tlb.c
arch/mips/lib-32/dump_tlb.c
+49
-34
未找到文件。
arch/mips/lib-32/dump_tlb.c
浏览文件 @
d2f755e0
...
...
@@ -20,16 +20,25 @@
static
inline
const
char
*
msk2str
(
unsigned
int
mask
)
{
switch
(
mask
)
{
case
PM_4K
:
return
"4kb"
;
case
PM_16K
:
return
"16kb"
;
case
PM_64K
:
return
"64kb"
;
case
PM_256K
:
return
"256kb"
;
case
PM_4K
:
return
"4kb"
;
case
PM_16K
:
return
"16kb"
;
case
PM_64K
:
return
"64kb"
;
case
PM_256K
:
return
"256kb"
;
#ifndef CONFIG_CPU_VR41XX
case
PM_1M
:
return
"1Mb"
;
case
PM_4M
:
return
"4Mb"
;
case
PM_16M
:
return
"16Mb"
;
case
PM_64M
:
return
"64Mb"
;
case
PM_256M
:
return
"256Mb"
;
case
PM_1M
:
return
"1Mb"
;
case
PM_4M
:
return
"4Mb"
;
case
PM_16M
:
return
"16Mb"
;
case
PM_64M
:
return
"64Mb"
;
case
PM_256M
:
return
"256Mb"
;
#endif
}
...
...
@@ -47,7 +56,7 @@ void dump_tlb(int first, int last)
unsigned
int
pagemask
,
c0
,
c1
,
asid
;
unsigned
long
long
entrylo0
,
entrylo1
;
unsigned
long
entryhi
;
int
i
;
int
i
;
asid
=
read_c0_entryhi
()
&
0xff
;
...
...
@@ -58,7 +67,7 @@ void dump_tlb(int first, int last)
tlb_read
();
BARRIER
();
pagemask
=
read_c0_pagemask
();
entryhi
=
read_c0_entryhi
();
entryhi
=
read_c0_entryhi
();
entrylo0
=
read_c0_entrylo0
();
entrylo1
=
read_c0_entrylo1
();
...
...
@@ -78,13 +87,11 @@ void dump_tlb(int first, int last)
printk
(
"
\t\t\t
[pa=%08Lx c=%d d=%d v=%d g=%Ld]
\n
"
,
(
entrylo0
<<
6
)
&
PAGE_MASK
,
c0
,
(
entrylo0
&
4
)
?
1
:
0
,
(
entrylo0
&
2
)
?
1
:
0
,
(
entrylo0
&
1
));
(
entrylo0
&
2
)
?
1
:
0
,
(
entrylo0
&
1
));
printk
(
"
\t\t\t
[pa=%08Lx c=%d d=%d v=%d g=%Ld]
\n
"
,
(
entrylo1
<<
6
)
&
PAGE_MASK
,
c1
,
(
entrylo1
&
4
)
?
1
:
0
,
(
entrylo1
&
2
)
?
1
:
0
,
(
entrylo1
&
1
));
(
entrylo1
&
2
)
?
1
:
0
,
(
entrylo1
&
1
));
printk
(
"
\n
"
);
}
}
...
...
@@ -99,7 +106,7 @@ void dump_tlb_all(void)
void
dump_tlb_wired
(
void
)
{
int
wired
;
int
wired
;
wired
=
read_c0_wired
();
printk
(
"Wired: %d"
,
wired
);
...
...
@@ -138,10 +145,10 @@ void dump_tlb_nonwired(void)
void
dump_list_process
(
struct
task_struct
*
t
,
void
*
address
)
{
pgd_t
*
page_dir
,
*
pgd
;
pud_t
*
pud
;
pmd_t
*
pmd
;
pte_t
*
pte
,
page
;
pgd_t
*
page_dir
,
*
pgd
;
pud_t
*
pud
;
pmd_t
*
pmd
;
pte_t
*
pte
,
page
;
unsigned
long
addr
,
val
;
addr
=
(
unsigned
long
)
address
;
...
...
@@ -180,14 +187,22 @@ void dump_list_process(struct task_struct *t, void *address)
#endif
val
=
pte_val
(
page
);
if
(
val
&
_PAGE_PRESENT
)
printk
(
"present "
);
if
(
val
&
_PAGE_READ
)
printk
(
"read "
);
if
(
val
&
_PAGE_WRITE
)
printk
(
"write "
);
if
(
val
&
_PAGE_ACCESSED
)
printk
(
"accessed "
);
if
(
val
&
_PAGE_MODIFIED
)
printk
(
"modified "
);
if
(
val
&
_PAGE_R4KBUG
)
printk
(
"r4kbug "
);
if
(
val
&
_PAGE_GLOBAL
)
printk
(
"global "
);
if
(
val
&
_PAGE_VALID
)
printk
(
"valid "
);
if
(
val
&
_PAGE_PRESENT
)
printk
(
"present "
);
if
(
val
&
_PAGE_READ
)
printk
(
"read "
);
if
(
val
&
_PAGE_WRITE
)
printk
(
"write "
);
if
(
val
&
_PAGE_ACCESSED
)
printk
(
"accessed "
);
if
(
val
&
_PAGE_MODIFIED
)
printk
(
"modified "
);
if
(
val
&
_PAGE_R4KBUG
)
printk
(
"r4kbug "
);
if
(
val
&
_PAGE_GLOBAL
)
printk
(
"global "
);
if
(
val
&
_PAGE_VALID
)
printk
(
"valid "
);
printk
(
"
\n
"
);
}
...
...
@@ -198,10 +213,10 @@ void dump_list_current(void *address)
unsigned
int
vtop
(
void
*
address
)
{
pgd_t
*
pgd
;
pud_t
*
pud
;
pmd_t
*
pmd
;
pte_t
*
pte
;
pgd_t
*
pgd
;
pud_t
*
pud
;
pmd_t
*
pmd
;
pte_t
*
pte
;
unsigned
int
addr
,
paddr
;
addr
=
(
unsigned
long
)
address
;
...
...
@@ -220,9 +235,9 @@ void dump16(unsigned long *p)
int
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
printk
(
"*%08lx == %08lx, "
,
(
unsigned
long
)
p
,
*
p
);
printk
(
"*%08lx == %08lx, "
,
(
unsigned
long
)
p
,
*
p
);
p
++
;
printk
(
"*%08lx == %08lx
\n
"
,
(
unsigned
long
)
p
,
*
p
);
printk
(
"*%08lx == %08lx
\n
"
,
(
unsigned
long
)
p
,
*
p
);
p
++
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录