xen/arm: p2m: Introduce p2m_tlb_flush_sync, export it and use it
authorJulien Grall <julien.grall@linaro.org>
Tue, 12 Dec 2017 19:02:08 +0000 (19:02 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 12 Dec 2017 20:11:45 +0000 (12:11 -0800)
commit5127824b70ec3dd386e620ae0d4ca057f612d1e9
treee8a182a5ab1a2182763277d8ee2210df346c2f2e
parenta817299749c47a5247d9099b14fb829a65fb9dd9
xen/arm: p2m: Introduce p2m_tlb_flush_sync, export it and use it

Multiple places in the code requires to flush the TLBs only when
p2m->need_flush is set.

Rather than open-coding it, introduce a new helper p2m_tlb_flush_sync to
do it.

Note that p2m_tlb_flush_sync is exported as it might be used by other
part of Xen.

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