xen/arm: p2m: Fold p2m_tlb_flush into p2m_force_tlb_flush_sync
authorJulien Grall <julien.grall@linaro.org>
Tue, 12 Dec 2017 19:02:09 +0000 (19:02 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 12 Dec 2017 20:11:49 +0000 (12:11 -0800)
commit7d66b02639fd2189de310e481e402d2c9d73e5f1
tree82b846155032864efd4487647f197d36dfbb49b2
parent5127824b70ec3dd386e620ae0d4ca057f612d1e9
xen/arm: p2m: Fold p2m_tlb_flush into p2m_force_tlb_flush_sync

p2m_tlb_flush is called in 2 places: p2m_alloc_table and
p2m_force_tlb_flush_sync.

p2m_alloc_table is called when the domain is initialized and could be
replace by a call to p2m_force_tlb_flush_sync with the P2M write locked.

This seems a bit pointless but would allow to have a single API for
flushing and avoid misusage in the P2M code.

So update p2m_alloc_table to use p2m_force_tlb_flush_sync and fold
p2m_tlb_flush in p2m_force_tlb_flush_sync.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/p2m.c