···8181#endif /* CONFIG_ARC_CACHE_VIPT_ALIASING */82828383/*8484+ * A new pagecache page has PG_arch_1 clear - thus dcache dirty by default8585+ * This works around some PIO based drivers which don't call flush_dcache_page8686+ * to record that they dirtied the dcache8787+ */8888+#define PG_dc_clean PG_arch_18989+9090+/*8491 * Simple wrapper over config option8592 * Bootup code ensures that hardware matches kernel configuration8693 */
+6-6
arch/arc/mm/cache_arc700.c
···512512 struct address_space *mapping;513513514514 if (!cache_is_vipt_aliasing()) {515515- set_bit(PG_arch_1, &page->flags);515515+ clear_bit(PG_dc_clean, &page->flags);516516 return;517517 }518518···526526 * Make a note that K-mapping is dirty527527 */528528 if (!mapping_mapped(mapping)) {529529- set_bit(PG_arch_1, &page->flags);529529+ clear_bit(PG_dc_clean, &page->flags);530530 } else if (page_mapped(page)) {531531532532 /* kernel reading from page with U-mapping */···734734 * non copied user pages (e.g. read faults which wire in pagecache page735735 * directly).736736 */737737- set_bit(PG_arch_1, &to->flags);737737+ clear_bit(PG_dc_clean, &to->flags);738738739739 /*740740 * if SRC was already usermapped and non-congruent to kernel mapping···742742 */743743 if (clean_src_k_mappings) {744744 __flush_dcache_page(kfrom, kfrom);745745- clear_bit(PG_arch_1, &from->flags);745745+ set_bit(PG_dc_clean, &from->flags);746746 } else {747747- set_bit(PG_arch_1, &from->flags);747747+ clear_bit(PG_dc_clean, &from->flags);748748 }749749}750750751751void clear_user_page(void *to, unsigned long u_vaddr, struct page *page)752752{753753 clear_page(to);754754- set_bit(PG_arch_1, &page->flags);754754+ clear_bit(PG_dc_clean, &page->flags);755755}756756757757
+1-1
arch/arc/mm/tlb.c
···453453 if ((vma->vm_flags & VM_EXEC) ||454454 addr_not_cache_congruent(paddr, vaddr)) {455455456456- int dirty = test_and_clear_bit(PG_arch_1, &page->flags);456456+ int dirty = !test_and_set_bit(PG_dc_clean, &page->flags);457457 if (dirty) {458458 /* wback + inv dcache lines */459459 __flush_dcache_page(paddr, paddr);