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
f74710a0
Commit
f74710a0
authored
Feb 06, 2004
by
Benjamin Herrenschmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc32: Flush the Hash PTE in ptep_test_and_clear_young()
Without this, page aging is broken on ppc32
parent
c380a048
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
arch/ppc/mm/tlb.c
arch/ppc/mm/tlb.c
+20
-0
include/asm-ppc/pgtable.h
include/asm-ppc/pgtable.h
+13
-1
No files found.
arch/ppc/mm/tlb.c
View file @
f74710a0
...
...
@@ -46,6 +46,26 @@ void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, unsigned long addr)
}
}
/*
* Called by ptep_test_and_clear_young()
*/
void
flush_hash_one_pte
(
pte_t
*
ptep
)
{
struct
page
*
ptepage
;
struct
mm_struct
*
mm
;
unsigned
long
ptephys
;
unsigned
long
addr
;
if
(
Hash
==
0
)
return
;
ptepage
=
virt_to_page
(
ptep
);
mm
=
(
struct
mm_struct
*
)
ptepage
->
mapping
;
ptephys
=
__pa
(
ptep
)
&
PAGE_MASK
;
addr
=
ptepage
->
index
+
(((
unsigned
long
)
ptep
&
~
PAGE_MASK
)
<<
9
);
flush_hash_pages
(
mm
->
context
,
addr
,
ptephys
,
1
);
}
/*
* Called at the end of a mmu_gather operation to make sure the
* TLB flush is completely done.
...
...
include/asm-ppc/pgtable.h
View file @
f74710a0
...
...
@@ -511,9 +511,21 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
#endif
}
extern
void
flush_hash_one_pte
(
pte_t
*
ptep
);
/*
* 2.6 calles this without flushing the TLB entry, this is wrong
* for our hash-based implementation, we fix that up here
*/
static
inline
int
ptep_test_and_clear_young
(
pte_t
*
ptep
)
{
return
(
pte_update
(
ptep
,
_PAGE_ACCESSED
,
0
)
&
_PAGE_ACCESSED
)
!=
0
;
unsigned
long
old
;
old
=
(
pte_update
(
ptep
,
_PAGE_ACCESSED
,
0
)
&
_PAGE_ACCESSED
);
#if _PAGE_HASHPTE != 0
if
(
old
&
_PAGE_HASHPTE
)
flush_hash_one_pte
(
ptep
);
#endif
return
old
!=
0
;
}
static
inline
int
ptep_test_and_clear_dirty
(
pte_t
*
ptep
)
...
...
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