Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29b93c68 authored by Vineet Gupta's avatar Vineet Gupta
Browse files

ARC: [mm] Zero page optimization

parent 2f9e9961
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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
@@ -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) {