/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2009, Wind River Systems Inc * Implemented by fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com
*/
__flush_dcache(start, end); if (vma->vm_flags & VM_EXEC)
__flush_icache(start, end);
}
staticvoid __flush_dcache_folio(struct folio *folio)
{ /* * Writeback any data associated with the kernel mapping of this * page. This ensures that data in the physical page is mutually * coherent with the kernels mapping.
*/ unsignedlong start = (unsignedlong)folio_address(folio);
/* * The zero page is never written to, so never has any dirty * cache lines, and therefore never needs to be flushed.
*/ if (is_zero_pfn(folio_pfn(folio))) return;
mapping = folio_flush_mapping(folio);
/* Flush this page if there are aliases. */ if (mapping && !mapping_mapped(mapping)) {
clear_bit(PG_dcache_clean, &folio->flags);
} else {
__flush_dcache_folio(folio); if (mapping) { unsignedlong start = (unsignedlong)folio_address(folio);
flush_aliases(mapping, folio);
flush_icache_range(start, start + folio_size(folio));
}
set_bit(PG_dcache_clean, &folio->flags);
}
}
EXPORT_SYMBOL(flush_dcache_folio);
/* * The zero page is never written to, so never has any dirty * cache lines, and therefore never needs to be flushed.
*/ if (is_zero_pfn(pfn)) return;
folio = page_folio(pfn_to_page(pfn)); if (!test_and_set_bit(PG_dcache_clean, &folio->flags))
__flush_dcache_folio(folio);
mapping = folio_flush_mapping(folio); if (mapping) {
flush_aliases(mapping, folio); if (vma->vm_flags & VM_EXEC)
flush_icache_pages(vma, &folio->page,
folio_nr_pages(folio));
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.