Marc Zyngier 94d30f476f arm64: Reduce PT size estimation complexity
count_required_pts()'s complexity is high if mappings are not using the
largest possible block size (due to some other requirement such as tracking
dirty pages, for example).

Let's switch to a method that follows the pattern established with
the add_map() helper, and make it almost instantaneous instead of
taking a large amount of time if 2MB mappings are in use instead of
1GB.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
[ Paul: pick from the Android tree. Fixup Pierre's commit. Rebase to the
  upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Link: 5d756d147e
Link: 6be9330601
2023-03-06 17:03:56 -05:00
..
2023-03-06 17:03:55 -05:00
2023-03-06 17:03:55 -05:00
2022-04-01 16:56:53 -04:00
2023-01-31 15:46:39 +01:00
2023-01-18 11:49:13 -07:00
2023-03-06 17:03:55 -05:00
2023-02-07 14:33:49 -05:00
2023-01-31 15:46:39 +01:00