Commit 8d164bc6 authored by Antonio Nino Diaz's avatar Antonio Nino Diaz
Browse files

xlat v2: Remove unused tlbi helper



xlat_arch_tlbi_va_regime() isn't used, so it has been renamed to
xlat_arch_tlbi_va() and the previous implementation has been removed.

Change-Id: Ic118bed3fb68234748d86b2e9e95b25650289276
Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
parent 468e2382
...@@ -55,18 +55,7 @@ uint64_t xlat_arch_regime_get_xn_desc(int xlat_regime __unused) ...@@ -55,18 +55,7 @@ uint64_t xlat_arch_regime_get_xn_desc(int xlat_regime __unused)
return UPPER_ATTRS(XN); return UPPER_ATTRS(XN);
} }
void xlat_arch_tlbi_va(uintptr_t va) void xlat_arch_tlbi_va(uintptr_t va, int xlat_regime __unused)
{
/*
* Ensure the translation table write has drained into memory before
* invalidating the TLB entry.
*/
dsbishst();
tlbimvaais(TLBI_ADDR(va));
}
void xlat_arch_tlbi_va_regime(uintptr_t va, int xlat_regime __unused)
{ {
/* /*
* Ensure the translation table write has drained into memory before * Ensure the translation table write has drained into memory before
......
...@@ -123,18 +123,7 @@ uint64_t xlat_arch_regime_get_xn_desc(int xlat_regime) ...@@ -123,18 +123,7 @@ uint64_t xlat_arch_regime_get_xn_desc(int xlat_regime)
} }
} }
void xlat_arch_tlbi_va(uintptr_t va) void xlat_arch_tlbi_va(uintptr_t va, int xlat_regime)
{
#if IMAGE_EL == 1
assert(IS_IN_EL(1));
xlat_arch_tlbi_va_regime(va, EL1_EL0_REGIME);
#elif IMAGE_EL == 3
assert(IS_IN_EL(3));
xlat_arch_tlbi_va_regime(va, EL3_REGIME);
#endif
}
void xlat_arch_tlbi_va_regime(uintptr_t va, int xlat_regime)
{ {
/* /*
* Ensure the translation table write has drained into memory before * Ensure the translation table write has drained into memory before
......
...@@ -310,7 +310,7 @@ static void xlat_tables_unmap_region(xlat_ctx_t *ctx, mmap_region_t *mm, ...@@ -310,7 +310,7 @@ static void xlat_tables_unmap_region(xlat_ctx_t *ctx, mmap_region_t *mm,
if (action == ACTION_WRITE_BLOCK_ENTRY) { if (action == ACTION_WRITE_BLOCK_ENTRY) {
table_base[table_idx] = INVALID_DESC; table_base[table_idx] = INVALID_DESC;
xlat_arch_tlbi_va_regime(table_idx_va, ctx->xlat_regime); xlat_arch_tlbi_va(table_idx_va, ctx->xlat_regime);
} else if (action == ACTION_RECURSE_INTO_TABLE) { } else if (action == ACTION_RECURSE_INTO_TABLE) {
...@@ -326,8 +326,8 @@ static void xlat_tables_unmap_region(xlat_ctx_t *ctx, mmap_region_t *mm, ...@@ -326,8 +326,8 @@ static void xlat_tables_unmap_region(xlat_ctx_t *ctx, mmap_region_t *mm,
*/ */
if (xlat_table_is_empty(ctx, subtable)) { if (xlat_table_is_empty(ctx, subtable)) {
table_base[table_idx] = INVALID_DESC; table_base[table_idx] = INVALID_DESC;
xlat_arch_tlbi_va_regime(table_idx_va, xlat_arch_tlbi_va(table_idx_va,
ctx->xlat_regime); ctx->xlat_regime);
} }
} else { } else {
......
...@@ -45,18 +45,14 @@ uint64_t xlat_arch_regime_get_xn_desc(int xlat_regime); ...@@ -45,18 +45,14 @@ uint64_t xlat_arch_regime_get_xn_desc(int xlat_regime);
* Invalidate all TLB entries that match the given virtual address. This * Invalidate all TLB entries that match the given virtual address. This
* operation applies to all PEs in the same Inner Shareable domain as the PE * operation applies to all PEs in the same Inner Shareable domain as the PE
* that executes this function. This functions must be called for every * that executes this function. This functions must be called for every
* translation table entry that is modified. * translation table entry that is modified. It only affects the specified
* * translation regime.
* xlat_arch_tlbi_va() applies the invalidation to the exception level of the
* current translation regime, whereas xlat_arch_tlbi_va_regime() applies it to
* the given translation regime.
* *
* Note, however, that it is architecturally UNDEFINED to invalidate TLB entries * Note, however, that it is architecturally UNDEFINED to invalidate TLB entries
* pertaining to a higher exception level, e.g. invalidating EL3 entries from * pertaining to a higher exception level, e.g. invalidating EL3 entries from
* S-EL1. * S-EL1.
*/ */
void xlat_arch_tlbi_va(uintptr_t va); void xlat_arch_tlbi_va(uintptr_t va, int xlat_regime);
void xlat_arch_tlbi_va_regime(uintptr_t va, int xlat_regime);
/* /*
* This function has to be called at the end of any code that uses the function * This function has to be called at the end of any code that uses the function
......
...@@ -543,7 +543,7 @@ int change_mem_attributes(xlat_ctx_t *ctx, ...@@ -543,7 +543,7 @@ int change_mem_attributes(xlat_ctx_t *ctx,
*entry = INVALID_DESC; *entry = INVALID_DESC;
/* Invalidate any cached copy of this mapping in the TLBs. */ /* Invalidate any cached copy of this mapping in the TLBs. */
xlat_arch_tlbi_va_regime(base_va, ctx->xlat_regime); xlat_arch_tlbi_va(base_va, ctx->xlat_regime);
/* Ensure completion of the invalidation. */ /* Ensure completion of the invalidation. */
xlat_arch_tlbi_va_sync(); xlat_arch_tlbi_va_sync();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment