aboutsummaryrefslogtreecommitdiff
path: root/target/arm/mte_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-10-04 15:40:22 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-10-26 11:11:28 +1000
commit8269c01417a3e0bdb444b1bdac1d9b6c8bc9e667 (patch)
tree2b4f78b28762cc3939822cd6c4ac0b3af724b12e /target/arm/mte_helper.c
parent0fe6108432ebbabbe12e53fba462770acb858a87 (diff)
accel/tcg: Simplify page_get/alloc_target_data
Since the only user, Arm MTE, always requires allocation, merge the get and alloc functions to always produce a non-null result. Also assume that the user has already checked page validity. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/arm/mte_helper.c')
-rw-r--r--target/arm/mte_helper.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c
index a9c5fc2cb2..86b3754838 100644
--- a/target/arm/mte_helper.c
+++ b/target/arm/mte_helper.c
@@ -95,10 +95,6 @@ static uint8_t *allocation_tag_mem(CPUARMState *env, int ptr_mmu_idx,
}
tags = page_get_target_data(clean_ptr);
- if (tags == NULL) {
- tags = page_alloc_target_data(clean_ptr);
- assert(tags != NULL);
- }
index = extract32(ptr, LOG2_TAG_GRANULE + 1,
TARGET_PAGE_BITS - LOG2_TAG_GRANULE - 1);