diff mbox series

[RFC,2/2] hw/mips/jazz: Remove confusing ifdef'ry

Message ID 20210226132723.3969650-3-f4bug@amsat.org
State New
Headers show
Series hw/mips: Restrict emulated machines to TCG | expand

Commit Message

Philippe Mathieu-Daudé Feb. 26, 2021, 1:27 p.m. UTC
The jazz machine is not used under user emulation and
does not support KVM. Simplify the ifdef'ry.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/mips/jazz.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Richard Henderson Feb. 26, 2021, 10:21 p.m. UTC | #1
On 2/26/21 5:27 AM, Philippe Mathieu-Daudé wrote:
> @@ -211,10 +209,8 @@ static void mips_jazz_init(MachineState *machine,
>       * memory region that catches all memory accesses, as we do on Malta.
>       */
>      cc = CPU_GET_CLASS(cpu);
> -#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
>      real_do_transaction_failed = cc->tcg_ops->do_transaction_failed;
>      cc->tcg_ops->do_transaction_failed = mips_jazz_do_transaction_failed;
> -#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */

Ah, I wondered what you were after with that first patch,
and this is it.

Series:
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index 83c80860626..cd24e8778b1 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -120,7 +120,6 @@  static const MemoryRegionOps dma_dummy_ops = {
 #define MAGNUM_BIOS_SIZE                                                       \
         (BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX)
 
-#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
 static void (*real_do_transaction_failed)(CPUState *cpu, hwaddr physaddr,
                                           vaddr addr, unsigned size,
                                           MMUAccessType access_type,
@@ -142,7 +141,6 @@  static void mips_jazz_do_transaction_failed(CPUState *cs, hwaddr physaddr,
     (*real_do_transaction_failed)(cs, physaddr, addr, size, access_type,
                                   mmu_idx, attrs, response, retaddr);
 }
-#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
 
 static void mips_jazz_init(MachineState *machine,
                            enum jazz_model_e jazz_model)
@@ -211,10 +209,8 @@  static void mips_jazz_init(MachineState *machine,
      * memory region that catches all memory accesses, as we do on Malta.
      */
     cc = CPU_GET_CLASS(cpu);
-#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
     real_do_transaction_failed = cc->tcg_ops->do_transaction_failed;
     cc->tcg_ops->do_transaction_failed = mips_jazz_do_transaction_failed;
-#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
 
     /* allocate RAM */
     memory_region_add_subregion(address_space, 0, machine->ram);