xen/arm: mm: Don't open-code Xen PT update in remove_early_mappings()
authorJulien Grall <julien.grall@arm.com>
Fri, 20 May 2022 12:09:25 +0000 (13:09 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 8 Jun 2022 10:04:53 +0000 (11:04 +0100)
commit6eb5a9396413896a696c4d6dda2e26c4c94589bf
tree5e9a57a23c284810b1369c9bb2b8a84e12b82f5a
parent07d11f63d03ee919038e707e6618846cf4e6df0f
xen/arm: mm: Don't open-code Xen PT update in remove_early_mappings()

Now that xen_pt_update_entry() is able to deal with different mapping
size, we can replace the open-coding of the page-tables update by a call
to modify_xen_mappings().

As the function is not meant to fail, a BUG_ON() is added to check the
return.

Note that we don't use destroy_xen_mappings() because the helper doesn't
allow us to pass a flags. In theory we could add an extra parameter to
the function, however there are no other expected users. Hence why
modify_xen_mappings() is used.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Hongda Deng <Hongda.Heng@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/mm.c