mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 20:56:23 +00:00
[SPARC64] mm: simpler tlb_flush_mmu
Minor simplification to the sparc64 tlb_flush_mmu: tlb_remove_page set need_flush only after handling the tlb_fast_mode case, then tlb_flush_mmu need not consider whether it's tlb_fast_mode. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
261b033afc
commit
59871bcd11
1 changed files with 3 additions and 5 deletions
|
@ -58,11 +58,9 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, unsigned i
|
|||
static inline void tlb_flush_mmu(struct mmu_gather *mp)
|
||||
{
|
||||
if (mp->need_flush) {
|
||||
free_pages_and_swap_cache(mp->pages, mp->pages_nr);
|
||||
mp->pages_nr = 0;
|
||||
mp->need_flush = 0;
|
||||
if (!tlb_fast_mode(mp)) {
|
||||
free_pages_and_swap_cache(mp->pages, mp->pages_nr);
|
||||
mp->pages_nr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -91,11 +89,11 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un
|
|||
|
||||
static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page)
|
||||
{
|
||||
mp->need_flush = 1;
|
||||
if (tlb_fast_mode(mp)) {
|
||||
free_page_and_swap_cache(page);
|
||||
return;
|
||||
}
|
||||
mp->need_flush = 1;
|
||||
mp->pages[mp->pages_nr++] = page;
|
||||
if (mp->pages_nr >= FREE_PTE_NR)
|
||||
tlb_flush_mmu(mp);
|
||||
|
|
Loading…
Reference in a new issue