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
dd6c83a6
Commit
dd6c83a6
authored
Nov 04, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Preserve cache/side-effect PTE bits in pte_modify().
Bug noticed by Russell King.
parent
48916012
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
include/asm-sparc64/pgtable.h
include/asm-sparc64/pgtable.h
+7
-7
No files found.
include/asm-sparc64/pgtable.h
View file @
dd6c83a6
...
...
@@ -156,7 +156,7 @@
#define __ACCESS_BITS (_PAGE_ACCESSED | _PAGE_READ | _PAGE_R)
#define __PRIV_BITS _PAGE_P
#define PAGE_NONE __pgprot (_PAGE_PRESENT | _PAGE_ACCESSED)
#define PAGE_NONE __pgprot (_PAGE_PRESENT | _PAGE_ACCESSED
| _PAGE_CACHE
)
/* Don't set the TTE _PAGE_W bit here, else the dirty bit never gets set. */
#define PAGE_SHARED __pgprot (_PAGE_PRESENT | _PAGE_VALID | _PAGE_CACHE | \
...
...
@@ -171,12 +171,8 @@
#define PAGE_KERNEL __pgprot (_PAGE_PRESENT | _PAGE_VALID | _PAGE_CACHE | \
__PRIV_BITS | __ACCESS_BITS | __DIRTY_BITS)
#define PAGE_INVALID __pgprot (0)
#define _PFN_MASK _PAGE_PADDR
#define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_MODIFIED | _PAGE_ACCESSED | _PAGE_PRESENT | _PAGE_SZBITS)
#define pg_iobits (_PAGE_VALID | _PAGE_PRESENT | __DIRTY_BITS | __ACCESS_BITS | _PAGE_E)
#define __P000 PAGE_NONE
...
...
@@ -224,9 +220,13 @@ extern struct page *mem_map_zero;
static
inline
pte_t
pte_modify
(
pte_t
orig_pte
,
pgprot_t
new_prot
)
{
pte_t
__pte
;
const
unsigned
long
preserve_mask
=
(
_PFN_MASK
|
_PAGE_MODIFIED
|
_PAGE_ACCESSED
|
_PAGE_CACHE
|
_PAGE_E
|
_PAGE_PRESENT
|
_PAGE_SZBITS
);
pte_val
(
__pte
)
=
(
pte_val
(
orig_pte
)
&
_PAGE_CHG_MASK
)
|
pgprot_val
(
new_prot
);
pte_val
(
__pte
)
=
(
pte_val
(
orig_pte
)
&
preserve_mask
)
|
(
pgprot_val
(
new_prot
)
&
~
preserve_mask
);
return
__pte
;
}
...
...
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