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
25d46418
Commit
25d46418
authored
Oct 05, 2015
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARC: mm: PAE40: tlbex.S: Explicitify the size of pte_t
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
28b4af72
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
arch/arc/mm/tlbex.S
arch/arc/mm/tlbex.S
+12
-9
No files found.
arch/arc/mm/tlbex.S
View file @
25d46418
...
...
@@ -221,12 +221,15 @@ ex_saved_reg1:
; Get the PTE entry: The idea is
; (1) x = addr >> PAGE_SHIFT -> masks page-off bits from @fault-addr
; (2) y = x & (PTRS_PER_PTE - 1) -> to get index
; (3) z = pgtbl[y]
; To avoid the multiply by in end, we do the -2, <<2 below
; (3) z = (pgtbl + y * 4)
lsr
r0
,
r2
,
(
PAGE_SHIFT
-
2
)
and
r0
,
r0
,
(
(
PTRS_PER_PTE
-
1
)
<<
2
)
ld.aw
r0
,
[
r1
,
r0
]
; get PTE and PTE ptr for fault addr
#define PTE_SIZE_LOG 2 /* 4 == 2 ^ 2 */
; multiply in step (3) above avoided by shifting lesser in step (1)
lsr
r0
,
r2
,
(
PAGE_SHIFT
-
PTE_SIZE_LOG
)
and
r0
,
r0
,
(
(
PTRS_PER_PTE
-
1
)
<<
PTE_SIZE_LOG
)
ld.aw
r0
,
[
r1
,
r0
]
; r0: PTE
; r1: PTE ptr
2
:
...
...
@@ -248,14 +251,14 @@ ex_saved_reg1:
.
macro
CONV_PTE_TO_TLB
and
r3
,
r0
,
PTE_BITS_RWX
; r w x
lsl
r2
,
r3
,
3
;
r w x 0 0
0 (GLOBAL, kernel only)
lsl
r2
,
r3
,
3
;
Kr Kw Kx 0 0
0 (GLOBAL, kernel only)
and.f
0
,
r0
,
_PAGE_GLOBAL
or.z
r2
,
r2
,
r3
;
r w x r w
x (!GLOBAL, user page)
or.z
r2
,
r2
,
r3
;
Kr Kw Kx Ur Uw U
x (!GLOBAL, user page)
and
r3
,
r0
,
PTE_BITS_NON_RWX_IN_PD1
; Extract PFN+cache bits from PTE
or
r3
,
r3
,
r2
sr
r3
,
[
ARC_REG_TLBPD1
]
;
these go in PD1
sr
r3
,
[
ARC_REG_TLBPD1
]
;
paddr[31..13] | Kr Kw Kx Ur Uw Ux | C
and
r2
,
r0
,
PTE_BITS_IN_PD0
; Extract other PTE flags: (V)alid, (G)lb
...
...
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