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
Kirill Smelkov
linux
Commits
12fb5de4
Commit
12fb5de4
authored
Jul 25, 2003
by
Geert Uytterhoeven
Committed by
Jens Axboe
Jul 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Sun-3 pte_file
Sun-3: pte_file fixes for sun-3 MMUs (from Sam Creasey)
parent
a2f51824
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
include/asm-m68k/sun3_pgtable.h
include/asm-m68k/sun3_pgtable.h
+15
-0
No files found.
include/asm-m68k/sun3_pgtable.h
View file @
12fb5de4
...
...
@@ -38,6 +38,8 @@
#define _PAGE_PRESENT (SUN3_PAGE_VALID)
#define _PAGE_ACCESSED (SUN3_PAGE_ACCESSED)
#define PTE_FILE_MAX_BITS 28
/* Compound page protection values. */
//todo: work out which ones *should* have SUN3_PAGE_NOCACHE and fix...
// is it just PAGE_KERNEL and PAGE_SHARED?
...
...
@@ -160,6 +162,7 @@ extern inline int pte_write(pte_t pte) { return pte_val(pte) & SUN3_PAGE_WRITEA
extern
inline
int
pte_exec
(
pte_t
pte
)
{
return
1
;
}
extern
inline
int
pte_dirty
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
SUN3_PAGE_MODIFIED
;
}
extern
inline
int
pte_young
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
SUN3_PAGE_ACCESSED
;
}
extern
inline
int
pte_file
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
SUN3_PAGE_ACCESSED
;
}
extern
inline
pte_t
pte_wrprotect
(
pte_t
pte
)
{
pte_val
(
pte
)
&=
~
SUN3_PAGE_WRITEABLE
;
return
pte
;
}
extern
inline
pte_t
pte_rdprotect
(
pte_t
pte
)
{
return
pte
;
}
...
...
@@ -195,6 +198,18 @@ extern inline pmd_t *pmd_offset (pgd_t *pgd, unsigned long address)
return
(
pmd_t
*
)
pgd
;
}
static
inline
unsigned
long
pte_to_pgoff
(
pte_t
pte
)
{
return
pte
.
pte
&
SUN3_PAGE_PGNUM_MASK
;
}
static
inline
pte_t
pgoff_to_pte
(
inline
unsigned
off
)
{
pte_t
pte
=
{
off
+
SUN3_PAGE_ACCESSED
};
return
pte
;
}
/* Find an entry in the third-level pagetable. */
#define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE-1))
#define pte_offset_kernel(pmd, address) ((pte_t *) __pmd_page(*pmd) + pte_index(address))
...
...
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