/** * mn10300_icache_inv_page - Globally invalidate a page of instruction cache * @start: The address of the page of memory to be invalidated. * * Invalidate a range of addresses in the instruction cache on all CPUs * covering the page that includes the given address. */ void mn10300_icache_inv_page(unsigned long start) { unsigned long flags; start &= ~(PAGE_SIZE-1); flags = smp_lock_cache(); mn10300_local_icache_inv_page(start); smp_cache_call(SMP_ICACHE_INV_RANGE, start, start + PAGE_SIZE); smp_unlock_cache(flags); }
/** * flush_icache_page - Flush a page from the dcache and invalidate the icache * @vma: The VMA the page is part of. * @page: The page to be flushed. * * Write a page back from the dcache and invalidate the icache so that we can * run code from it that we've just written into it */ void flush_icache_page(struct vm_area_struct *vma, struct page *page) { unsigned long start = page_to_phys(page); unsigned long flags; flags = smp_lock_cache(); mn10300_local_dcache_flush_page(start); mn10300_local_icache_inv_page(start); smp_cache_call(SMP_IDCACHE_INV_FLUSH_RANGE, start, start + PAGE_SIZE); smp_unlock_cache(flags); }