Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
40b552d9
Commit
40b552d9
authored
Feb 13, 2015
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARC: compress cpuinfo_arc_mmu (mainly save page size in KB)
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
5b9bd178
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
arch/arc/include/asm/arcregs.h
arch/arc/include/asm/arcregs.h
+2
-1
arch/arc/mm/tlb.c
arch/arc/mm/tlb.c
+4
-4
No files found.
arch/arc/include/asm/arcregs.h
View file @
40b552d9
...
...
@@ -299,7 +299,8 @@ struct bcr_generic {
*/
struct
cpuinfo_arc_mmu
{
unsigned
int
ver
,
pg_sz
,
sets
,
ways
,
u_dtlb
,
u_itlb
,
num_tlb
;
unsigned
int
ver
:
4
,
pg_sz_k
:
8
,
pad
:
8
,
u_dtlb
:
6
,
u_itlb
:
6
;
unsigned
int
num_tlb
:
16
,
sets
:
12
,
ways
:
4
;
};
struct
cpuinfo_arc_cache
{
...
...
arch/arc/mm/tlb.c
View file @
40b552d9
...
...
@@ -587,14 +587,14 @@ void read_decode_mmu_bcr(void)
if
(
mmu
->
ver
<=
2
)
{
mmu2
=
(
struct
bcr_mmu_1_2
*
)
&
tmp
;
mmu
->
pg_sz
=
PAGE_SIZE
;
mmu
->
pg_sz
_k
=
TO_KB
(
PAGE_SIZE
)
;
mmu
->
sets
=
1
<<
mmu2
->
sets
;
mmu
->
ways
=
1
<<
mmu2
->
ways
;
mmu
->
u_dtlb
=
mmu2
->
u_dtlb
;
mmu
->
u_itlb
=
mmu2
->
u_itlb
;
}
else
{
mmu3
=
(
struct
bcr_mmu_3
*
)
&
tmp
;
mmu
->
pg_sz
=
512
<<
mmu3
->
pg_sz
;
mmu
->
pg_sz
_k
=
1
<<
(
mmu3
->
pg_sz
-
1
)
;
mmu
->
sets
=
1
<<
mmu3
->
sets
;
mmu
->
ways
=
1
<<
mmu3
->
ways
;
mmu
->
u_dtlb
=
mmu3
->
u_dtlb
;
...
...
@@ -611,7 +611,7 @@ char *arc_mmu_mumbojumbo(int cpu_id, char *buf, int len)
n
+=
scnprintf
(
buf
+
n
,
len
-
n
,
"MMU [v%x]
\t
: %dk PAGE, JTLB %d (%dx%d), uDTLB %d, uITLB %d %s
\n
"
,
p_mmu
->
ver
,
TO_KB
(
p_mmu
->
pg_sz
)
,
p_mmu
->
ver
,
p_mmu
->
pg_sz_k
,
p_mmu
->
num_tlb
,
p_mmu
->
sets
,
p_mmu
->
ways
,
p_mmu
->
u_dtlb
,
p_mmu
->
u_itlb
,
IS_ENABLED
(
CONFIG_ARC_MMU_SASID
)
?
",SASID"
:
""
);
...
...
@@ -639,7 +639,7 @@ void arc_mmu_init(void)
mmu
->
ver
,
CONFIG_ARC_MMU_VER
);
}
if
(
mmu
->
pg_sz
!=
PAGE_SIZE
)
if
(
mmu
->
pg_sz
_k
!=
TO_KB
(
PAGE_SIZE
)
)
panic
(
"MMU pg size != PAGE_SIZE (%luk)
\n
"
,
TO_KB
(
PAGE_SIZE
));
/* Enable the MMU */
...
...
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