diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-05-19 06:21:03 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-06-22 09:53:18 -0400 |
commit | 29b93c68bf81d2aad1030e989d844cff9f3ba99a (patch) | |
tree | 2bd558302a88ad54c3a35311f73cadd1ed8467bc /arch/arc/mm | |
parent | 2f9e99618f5c858b769fa4455adaa6a4aef9bafd (diff) |
ARC: [mm] Zero page optimization
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/mm')
-rw-r--r-- | arch/arc/mm/tlb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c index f60807c2683d..1c91dbc8ddd8 100644 --- a/arch/arc/mm/tlb.c +++ b/arch/arc/mm/tlb.c | |||
@@ -433,9 +433,14 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned, | |||
433 | { | 433 | { |
434 | unsigned long vaddr = vaddr_unaligned & PAGE_MASK; | 434 | unsigned long vaddr = vaddr_unaligned & PAGE_MASK; |
435 | unsigned long paddr = pte_val(*ptep) & PAGE_MASK; | 435 | unsigned long paddr = pte_val(*ptep) & PAGE_MASK; |
436 | struct page *page = pfn_to_page(pte_pfn(*ptep)); | ||
436 | 437 | ||
437 | create_tlb(vma, vaddr, ptep); | 438 | create_tlb(vma, vaddr, ptep); |
438 | 439 | ||
440 | if (page == ZERO_PAGE(0)) { | ||
441 | return; | ||
442 | } | ||
443 | |||
439 | /* | 444 | /* |
440 | * Exec page : Independent of aliasing/page-color considerations, | 445 | * Exec page : Independent of aliasing/page-color considerations, |
441 | * since icache doesn't snoop dcache on ARC, any dirty | 446 | * since icache doesn't snoop dcache on ARC, any dirty |
@@ -447,7 +452,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned, | |||
447 | */ | 452 | */ |
448 | if ((vma->vm_flags & VM_EXEC) || | 453 | if ((vma->vm_flags & VM_EXEC) || |
449 | addr_not_cache_congruent(paddr, vaddr)) { | 454 | addr_not_cache_congruent(paddr, vaddr)) { |
450 | struct page *page = pfn_to_page(pte_pfn(*ptep)); | ||
451 | 455 | ||
452 | int dirty = test_and_clear_bit(PG_arch_1, &page->flags); | 456 | int dirty = test_and_clear_bit(PG_arch_1, &page->flags); |
453 | if (dirty) { | 457 | if (dirty) { |