feat(rmm): simplify ipa_is_empty()

Use s2tte_is_unassigned_empty() and
s2tte_is_assigned_empty() functions to
simplify ipa_is_empty() implementation.

Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: I385ec9ef6ef7bfcb89417665992f12acaab285e6
diff --git a/runtime/core/exit.c b/runtime/core/exit.c
index cd42e20..763aab2 100644
--- a/runtime/core/exit.c
+++ b/runtime/core/exit.c
@@ -91,7 +91,6 @@
 {
 	unsigned long s2tte, *ll_table;
 	struct rtt_walk wi;
-	enum ripas ripas_val;
 	bool ret;
 
 	assert(GRANULE_ALIGNED(ipa));
@@ -109,14 +108,9 @@
 	ll_table = granule_map(wi.g_llt, SLOT_RTT);
 	s2tte = s2tte_read(&ll_table[wi.index]);
 
-	if (s2tte_is_destroyed(s2tte)) {
-		ret = false;
-		goto out_unmap_ll_table;
-	}
-	ripas_val = s2tte_get_ripas(s2tte);
-	ret = (ripas_val == RIPAS_EMPTY);
+	ret = s2tte_is_unassigned_empty(s2tte) ||
+		s2tte_is_assigned_empty(s2tte, wi.last_level);
 
-out_unmap_ll_table:
 	buffer_unmap(ll_table);
 	granule_unlock(wi.g_llt);
 	return ret;