target/i386: Remove x86_cpu_dump_local_apic_state() dead stub
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 16 Dec 2022 12:39:32 +0000 (13:39 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 27 Feb 2023 21:29:01 +0000 (22:29 +0100)
x86_cpu_dump_local_apic_state() is called from monitor.c which
is only compiled for system emulation since commit bf95728400
("monitor: remove target-specific code from monitor.c").

Interestingly this stub was added few weeks later in commit
1f871d49e3 ("hmp: added local apic dump state") and was not
necessary by that time.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20221216220158.6317-5-philmd@linaro.org>

target/i386/cpu-dump.c
target/i386/cpu.h

index 08ac957e99cf39cf8eb58dd53be0970937d24a56..40697064d92ec6584720c49c0cd48b3a82ff691f 100644 (file)
@@ -335,10 +335,7 @@ void x86_cpu_dump_local_apic_state(CPUState *cs, int flags)
     }
     qemu_printf(" PPR 0x%02x\n", apic_get_ppr(s));
 }
-#else
-void x86_cpu_dump_local_apic_state(CPUState *cs, int flags)
-{
-}
+
 #endif /* !CONFIG_USER_ONLY */
 
 #define DUMP_CODE_BYTES_TOTAL    50
index 9824b7f8f230e7f4c66c1d3a5c7c906ea213c32c..32d048f326aedace6a2716161110325e0f861891 100644 (file)
@@ -2355,12 +2355,16 @@ typedef int X86CPUVersion;
  */
 void x86_cpu_set_default_version(X86CPUVersion version);
 
+#ifndef CONFIG_USER_ONLY
+
 #define APIC_DEFAULT_ADDRESS 0xfee00000
 #define APIC_SPACE_SIZE      0x100000
 
 /* cpu-dump.c */
 void x86_cpu_dump_local_apic_state(CPUState *cs, int flags);
 
+#endif
+
 /* cpu.c */
 bool cpu_is_bsp(X86CPU *cpu);