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
d7afc82b
Commit
d7afc82b
authored
May 24, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/net-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
8583974f
87050fae
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
include/asm-generic/pgtable.h
include/asm-generic/pgtable.h
+7
-2
include/asm-i386/pgtable.h
include/asm-i386/pgtable.h
+10
-0
include/asm-s390/pgtable.h
include/asm-s390/pgtable.h
+2
-1
mm/memory.c
mm/memory.c
+3
-3
No files found.
include/asm-generic/pgtable.h
View file @
d7afc82b
...
...
@@ -2,6 +2,11 @@
#define _ASM_GENERIC_PGTABLE_H
#ifndef __HAVE_ARCH_PTEP_ESTABLISH
#ifndef ptep_update_dirty_accessed
#define ptep_update_dirty_accessed(__ptep, __entry, __dirty) set_pte(__ptep, __entry)
#endif
/*
* Establish a new mapping:
* - flush the old one
...
...
@@ -10,9 +15,9 @@
*
* We hold the mm semaphore for reading and vma->vm_mm->page_table_lock
*/
#define ptep_establish(__vma, __address, __ptep, __entry
)
\
#define ptep_establish(__vma, __address, __ptep, __entry
, __dirty)
\
do { \
set_pte(__ptep, __entry);
\
ptep_update_dirty_accessed(__ptep, __entry, __dirty);
\
flush_tlb_page(__vma, __address); \
} while (0)
#endif
...
...
include/asm-i386/pgtable.h
View file @
d7afc82b
...
...
@@ -317,8 +317,18 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
/*
* The i386 doesn't have any external MMU info: the kernel page
* tables contain all the necessary information.
*
* Also, we only update the dirty/accessed state if we set
* the dirty bit by hand in the kernel, since the hardware
* will do the accessed bit for us, and we don't want to
* race with other CPU's that might be updating the dirty
* bit at the same time.
*/
#define update_mmu_cache(vma,address,pte) do { } while (0)
#define ptep_update_dirty_accessed(__ptep, __entry, __dirty) \
do { \
if (__dirty) set_pte(__ptep, __entry); \
} while (0)
/* Encode and de-code a swap entry */
#define __swp_type(x) (((x).val >> 1) & 0x1f)
...
...
include/asm-s390/pgtable.h
View file @
d7afc82b
...
...
@@ -580,7 +580,8 @@ static inline void ptep_mkdirty(pte_t *ptep)
static
inline
void
ptep_establish
(
struct
vm_area_struct
*
vma
,
unsigned
long
address
,
pte_t
*
ptep
,
pte_t
entry
)
unsigned
long
address
,
pte_t
*
ptep
,
pte_t
entry
,
int
dirty
)
{
ptep_clear_flush
(
vma
,
address
,
ptep
);
set_pte
(
ptep
,
entry
);
...
...
mm/memory.c
View file @
d7afc82b
...
...
@@ -1004,7 +1004,7 @@ static inline void break_cow(struct vm_area_struct * vma, struct page * new_page
flush_cache_page
(
vma
,
address
);
entry
=
maybe_mkwrite
(
pte_mkdirty
(
mk_pte
(
new_page
,
vma
->
vm_page_prot
)),
vma
);
ptep_establish
(
vma
,
address
,
page_table
,
entry
);
ptep_establish
(
vma
,
address
,
page_table
,
entry
,
1
);
update_mmu_cache
(
vma
,
address
,
entry
);
}
...
...
@@ -1056,7 +1056,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct * vma,
flush_cache_page
(
vma
,
address
);
entry
=
maybe_mkwrite
(
pte_mkyoung
(
pte_mkdirty
(
pte
)),
vma
);
ptep_establish
(
vma
,
address
,
page_table
,
entry
);
ptep_establish
(
vma
,
address
,
page_table
,
entry
,
1
);
update_mmu_cache
(
vma
,
address
,
entry
);
pte_unmap
(
page_table
);
spin_unlock
(
&
mm
->
page_table_lock
);
...
...
@@ -1646,7 +1646,7 @@ static inline int handle_pte_fault(struct mm_struct *mm,
entry
=
pte_mkdirty
(
entry
);
}
entry
=
pte_mkyoung
(
entry
);
ptep_establish
(
vma
,
address
,
pte
,
entry
);
ptep_establish
(
vma
,
address
,
pte
,
entry
,
write_access
);
update_mmu_cache
(
vma
,
address
,
entry
);
pte_unmap
(
pte
);
spin_unlock
(
&
mm
->
page_table_lock
);
...
...
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