Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
d2f755e0
Commit
d2f755e0
authored
Aug 16, 2005
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reindent dump_tlb.c.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
3fd5646c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
34 deletions
+49
-34
arch/mips/lib-32/dump_tlb.c
arch/mips/lib-32/dump_tlb.c
+49
-34
No files found.
arch/mips/lib-32/dump_tlb.c
View file @
d2f755e0
...
@@ -20,16 +20,25 @@
...
@@ -20,16 +20,25 @@
static
inline
const
char
*
msk2str
(
unsigned
int
mask
)
static
inline
const
char
*
msk2str
(
unsigned
int
mask
)
{
{
switch
(
mask
)
{
switch
(
mask
)
{
case
PM_4K
:
return
"4kb"
;
case
PM_4K
:
case
PM_16K
:
return
"16kb"
;
return
"4kb"
;
case
PM_64K
:
return
"64kb"
;
case
PM_16K
:
case
PM_256K
:
return
"256kb"
;
return
"16kb"
;
case
PM_64K
:
return
"64kb"
;
case
PM_256K
:
return
"256kb"
;
#ifndef CONFIG_CPU_VR41XX
#ifndef CONFIG_CPU_VR41XX
case
PM_1M
:
return
"1Mb"
;
case
PM_1M
:
case
PM_4M
:
return
"4Mb"
;
return
"1Mb"
;
case
PM_16M
:
return
"16Mb"
;
case
PM_4M
:
case
PM_64M
:
return
"64Mb"
;
return
"4Mb"
;
case
PM_256M
:
return
"256Mb"
;
case
PM_16M
:
return
"16Mb"
;
case
PM_64M
:
return
"64Mb"
;
case
PM_256M
:
return
"256Mb"
;
#endif
#endif
}
}
...
@@ -47,7 +56,7 @@ void dump_tlb(int first, int last)
...
@@ -47,7 +56,7 @@ void dump_tlb(int first, int last)
unsigned
int
pagemask
,
c0
,
c1
,
asid
;
unsigned
int
pagemask
,
c0
,
c1
,
asid
;
unsigned
long
long
entrylo0
,
entrylo1
;
unsigned
long
long
entrylo0
,
entrylo1
;
unsigned
long
entryhi
;
unsigned
long
entryhi
;
int
i
;
int
i
;
asid
=
read_c0_entryhi
()
&
0xff
;
asid
=
read_c0_entryhi
()
&
0xff
;
...
@@ -58,7 +67,7 @@ void dump_tlb(int first, int last)
...
@@ -58,7 +67,7 @@ void dump_tlb(int first, int last)
tlb_read
();
tlb_read
();
BARRIER
();
BARRIER
();
pagemask
=
read_c0_pagemask
();
pagemask
=
read_c0_pagemask
();
entryhi
=
read_c0_entryhi
();
entryhi
=
read_c0_entryhi
();
entrylo0
=
read_c0_entrylo0
();
entrylo0
=
read_c0_entrylo0
();
entrylo1
=
read_c0_entrylo1
();
entrylo1
=
read_c0_entrylo1
();
...
@@ -78,13 +87,11 @@ void dump_tlb(int first, int last)
...
@@ -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
"
,
printk
(
"
\t\t\t
[pa=%08Lx c=%d d=%d v=%d g=%Ld]
\n
"
,
(
entrylo0
<<
6
)
&
PAGE_MASK
,
c0
,
(
entrylo0
<<
6
)
&
PAGE_MASK
,
c0
,
(
entrylo0
&
4
)
?
1
:
0
,
(
entrylo0
&
4
)
?
1
:
0
,
(
entrylo0
&
2
)
?
1
:
0
,
(
entrylo0
&
2
)
?
1
:
0
,
(
entrylo0
&
1
));
(
entrylo0
&
1
));
printk
(
"
\t\t\t
[pa=%08Lx c=%d d=%d v=%d g=%Ld]
\n
"
,
printk
(
"
\t\t\t
[pa=%08Lx c=%d d=%d v=%d g=%Ld]
\n
"
,
(
entrylo1
<<
6
)
&
PAGE_MASK
,
c1
,
(
entrylo1
<<
6
)
&
PAGE_MASK
,
c1
,
(
entrylo1
&
4
)
?
1
:
0
,
(
entrylo1
&
4
)
?
1
:
0
,
(
entrylo1
&
2
)
?
1
:
0
,
(
entrylo1
&
2
)
?
1
:
0
,
(
entrylo1
&
1
));
(
entrylo1
&
1
));
printk
(
"
\n
"
);
printk
(
"
\n
"
);
}
}
}
}
...
@@ -99,7 +106,7 @@ void dump_tlb_all(void)
...
@@ -99,7 +106,7 @@ void dump_tlb_all(void)
void
dump_tlb_wired
(
void
)
void
dump_tlb_wired
(
void
)
{
{
int
wired
;
int
wired
;
wired
=
read_c0_wired
();
wired
=
read_c0_wired
();
printk
(
"Wired: %d"
,
wired
);
printk
(
"Wired: %d"
,
wired
);
...
@@ -138,10 +145,10 @@ void dump_tlb_nonwired(void)
...
@@ -138,10 +145,10 @@ void dump_tlb_nonwired(void)
void
dump_list_process
(
struct
task_struct
*
t
,
void
*
address
)
void
dump_list_process
(
struct
task_struct
*
t
,
void
*
address
)
{
{
pgd_t
*
page_dir
,
*
pgd
;
pgd_t
*
page_dir
,
*
pgd
;
pud_t
*
pud
;
pud_t
*
pud
;
pmd_t
*
pmd
;
pmd_t
*
pmd
;
pte_t
*
pte
,
page
;
pte_t
*
pte
,
page
;
unsigned
long
addr
,
val
;
unsigned
long
addr
,
val
;
addr
=
(
unsigned
long
)
address
;
addr
=
(
unsigned
long
)
address
;
...
@@ -180,14 +187,22 @@ void dump_list_process(struct task_struct *t, void *address)
...
@@ -180,14 +187,22 @@ void dump_list_process(struct task_struct *t, void *address)
#endif
#endif
val
=
pte_val
(
page
);
val
=
pte_val
(
page
);
if
(
val
&
_PAGE_PRESENT
)
printk
(
"present "
);
if
(
val
&
_PAGE_PRESENT
)
if
(
val
&
_PAGE_READ
)
printk
(
"read "
);
printk
(
"present "
);
if
(
val
&
_PAGE_WRITE
)
printk
(
"write "
);
if
(
val
&
_PAGE_READ
)
if
(
val
&
_PAGE_ACCESSED
)
printk
(
"accessed "
);
printk
(
"read "
);
if
(
val
&
_PAGE_MODIFIED
)
printk
(
"modified "
);
if
(
val
&
_PAGE_WRITE
)
if
(
val
&
_PAGE_R4KBUG
)
printk
(
"r4kbug "
);
printk
(
"write "
);
if
(
val
&
_PAGE_GLOBAL
)
printk
(
"global "
);
if
(
val
&
_PAGE_ACCESSED
)
if
(
val
&
_PAGE_VALID
)
printk
(
"valid "
);
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
"
);
printk
(
"
\n
"
);
}
}
...
@@ -198,10 +213,10 @@ void dump_list_current(void *address)
...
@@ -198,10 +213,10 @@ void dump_list_current(void *address)
unsigned
int
vtop
(
void
*
address
)
unsigned
int
vtop
(
void
*
address
)
{
{
pgd_t
*
pgd
;
pgd_t
*
pgd
;
pud_t
*
pud
;
pud_t
*
pud
;
pmd_t
*
pmd
;
pmd_t
*
pmd
;
pte_t
*
pte
;
pte_t
*
pte
;
unsigned
int
addr
,
paddr
;
unsigned
int
addr
,
paddr
;
addr
=
(
unsigned
long
)
address
;
addr
=
(
unsigned
long
)
address
;
...
@@ -220,9 +235,9 @@ void dump16(unsigned long *p)
...
@@ -220,9 +235,9 @@ void dump16(unsigned long *p)
int
i
;
int
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
printk
(
"*%08lx == %08lx, "
,
(
unsigned
long
)
p
,
*
p
);
printk
(
"*%08lx == %08lx, "
,
(
unsigned
long
)
p
,
*
p
);
p
++
;
p
++
;
printk
(
"*%08lx == %08lx
\n
"
,
(
unsigned
long
)
p
,
*
p
);
printk
(
"*%08lx == %08lx
\n
"
,
(
unsigned
long
)
p
,
*
p
);
p
++
;
p
++
;
}
}
}
}
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