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
f9c79bf4
Commit
f9c79bf4
authored
22 years ago
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Make ARM work with rmap
ARM can use the generic rmap.h. It doesn't need its own version.
parent
c28ac96b
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
52 deletions
+1
-52
include/asm-arm/proc-armv/rmap.h
include/asm-arm/proc-armv/rmap.h
+0
-51
include/asm-arm/rmap.h
include/asm-arm/rmap.h
+1
-1
No files found.
include/asm-arm/proc-armv/rmap.h
deleted
100644 → 0
View file @
c28ac96b
#ifndef _ARMV_RMAP_H
#define _ARMV_RMAP_H
/*
* linux/include/asm-arm/proc-armv/rmap.h
*
* Architecture dependant parts of the reverse mapping code,
*
* ARM is different since hardware page tables are smaller than
* the page size and Linux uses a "duplicate" one with extra info.
* For rmap this means that the first 2 kB of a page are the hardware
* page tables and the last 2 kB are the software page tables.
*/
static
inline
void
pgtable_add_rmap
(
pte_t
*
ptep
,
struct
mm_struct
*
mm
,
unsigned
long
address
)
{
struct
page
*
page
=
virt_to_page
(
ptep
);
page
->
mm
=
mm
;
page
->
index
=
address
&
~
((
PTRS_PER_PTE
*
PAGE_SIZE
)
-
1
);
inc_page_state
(
nr_page_table_pages
);
}
static
inline
void
pgtable_remove_rmap
(
pte_t
*
ptep
)
{
struct
page
*
page
=
virt_to_page
(
ptep
);
page
->
mm
=
NULL
;
page
->
index
=
0
;
dec_page_state
(
nr_page_table_pages
);
}
static
inline
struct
mm_struct
*
ptep_to_mm
(
pte_t
*
ptep
)
{
struct
page
*
page
=
virt_to_page
(
ptep
);
return
page
->
mm
;
}
/* The page table takes half of the page */
#define PTE_MASK ((PAGE_SIZE / 2) - 1)
static
inline
unsigned
long
ptep_to_address
(
pte_t
*
ptep
)
{
struct
page
*
page
=
virt_to_page
(
ptep
);
unsigned
long
low_bits
;
low_bits
=
((
unsigned
long
)
ptep
&
PTE_MASK
)
*
PTRS_PER_PTE
;
return
page
->
index
+
low_bits
;
}
#endif
/* _ARMV_RMAP_H */
This diff is collapsed.
Click to expand it.
include/asm-arm/rmap.h
View file @
f9c79bf4
#ifndef _ARM_RMAP_H
#ifndef _ARM_RMAP_H
#define _ARM_RMAP_H
#define _ARM_RMAP_H
#include <asm
/pro
c/rmap.h>
#include <asm
-generi
c/rmap.h>
#endif
/* _ARM_RMAP_H */
#endif
/* _ARM_RMAP_H */
This diff is collapsed.
Click to expand it.
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