When toolstack requests flushing the caches, flush_page_to_ram() is
called for each page of the requested domain. This needs to unnecessary
icache invalidation operations.
Let's take the responsibility of performing icache operations and use
the recently introduced flag to prevent redundant icache operations by
flush_page_to_ram().
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
(cherry picked from commit
1a0c3e3e28d6cd072734990efcaaec608bf152b1)
/* XXX: Implement preemption */
while ( gfn_x(start) < gfn_x(next_gfn) )
{
- flush_page_to_ram(mfn_x(mfn), true);
+ flush_page_to_ram(mfn_x(mfn), false);
start = gfn_add(start, 1);
mfn = mfn_add(mfn, 1);
}
}
+ invalidate_icache();
+
p2m_read_unlock(p2m);
return 0;