xen/arm: p2m: Re-implement relinquish_p2m_mapping using p2m_{get,set}_entry
authorJulien Grall <julien.grall@arm.com>
Thu, 15 Sep 2016 11:28:34 +0000 (12:28 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 28 Sep 2016 01:14:12 +0000 (18:14 -0700)
commit438c5fe4f0c193cac3ee57419a29e45033515189
tree575f8143f4c6764405120710d525c5e3617f7fb5
parent2ef3e36ec796a16c8839355c23eb119e72dc27fb
xen/arm: p2m: Re-implement relinquish_p2m_mapping using p2m_{get,set}_entry

The function relinquish_p2m_mapping can be re-implemented using
p2m_{get,set}_entry by iterating over the range mapped and using the
mapping order given by the callee.

Given that the preemption was chosen arbitrarily, it is now done on every
512 iterations. Meaning that Xen may check more often if the function is
preempted when there are no mappings.

Finally drop the operation RELINQUISH in apply_* as nobody is using it
anymore. Note that the functions could have been dropped in one go at
the end, however I find easier to drop the operations one by one
avoiding a big deletion in the patch that remove the last operation.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/arch/arm/p2m.c