Skip to content

Commit

Permalink
ARC: [mm] Zero page optimization
Browse files Browse the repository at this point in the history
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Vineet Gupta committed Jun 22, 2013
1 parent 2f9e996 commit 29b93c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/arc/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,14 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned,
{
unsigned long vaddr = vaddr_unaligned & PAGE_MASK;
unsigned long paddr = pte_val(*ptep) & PAGE_MASK;
struct page *page = pfn_to_page(pte_pfn(*ptep));

create_tlb(vma, vaddr, ptep);

if (page == ZERO_PAGE(0)) {
return;
}

/*
* Exec page : Independent of aliasing/page-color considerations,
* since icache doesn't snoop dcache on ARC, any dirty
Expand All @@ -447,7 +452,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned,
*/
if ((vma->vm_flags & VM_EXEC) ||
addr_not_cache_congruent(paddr, vaddr)) {
struct page *page = pfn_to_page(pte_pfn(*ptep));

int dirty = test_and_clear_bit(PG_arch_1, &page->flags);
if (dirty) {
Expand Down

0 comments on commit 29b93c6

Please sign in to comment.