diff mbox series

[RFC,v12,65/65] target/arm: remove v7m stub function for !CONFIG_TCG

Message ID 20210326193701.5981-66-cfontana@suse.de
State New
Headers show
Series arm cleanup experiment for kvm-only build | expand

Commit Message

Claudio Fontana March 26, 2021, 7:37 p.m. UTC
it is needed just once, so just move the CONFIG_TCG check in place.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
---
 target/arm/cpu-mmu.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Richard Henderson March 28, 2021, 7:17 p.m. UTC | #1
On 3/26/21 1:37 PM, Claudio Fontana wrote:
> +#ifdef CONFIG_TCG
>       if (arm_feature(env, ARM_FEATURE_M)) {
>           return arm_v7m_mmu_idx_for_secstate(env, env->v7m.secure);
>       }
> +#endif /* CONFIG_TCG */

Better done with tcg_enabled.


r~
diff mbox series

Patch

diff --git a/target/arm/cpu-mmu.c b/target/arm/cpu-mmu.c
index c6ac90a61e..9969bc9d30 100644
--- a/target/arm/cpu-mmu.c
+++ b/target/arm/cpu-mmu.c
@@ -155,21 +155,16 @@  int arm_mmu_idx_to_el(ARMMMUIdx mmu_idx)
     }
 }
 
-#ifndef CONFIG_TCG
-ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate)
-{
-    g_assert_not_reached();
-}
-#endif
-
 ARMMMUIdx arm_mmu_idx_el(CPUARMState *env, int el)
 {
     ARMMMUIdx idx;
     uint64_t hcr;
 
+#ifdef CONFIG_TCG
     if (arm_feature(env, ARM_FEATURE_M)) {
         return arm_v7m_mmu_idx_for_secstate(env, env->v7m.secure);
     }
+#endif /* CONFIG_TCG */
 
     /* See ARM pseudo-function ELIsInHost.  */
     switch (el) {