qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Cameron Esfahani" <dirty@apple.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	haxm-team@intel.com, "Roman Bolshakov" <r.bolshakov@yadro.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Wenchao Wang" <wenchao.wang@intel.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 4/5] target/i386: Remove x86_cpu_dump_local_apic_state() dead stub
Date: Fri, 16 Dec 2022 23:01:57 +0100	[thread overview]
Message-ID: <20221216220158.6317-5-philmd@linaro.org> (raw)
In-Reply-To: <20221216220158.6317-1-philmd@linaro.org>

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>
---
 target/i386/cpu-dump.c | 5 +----
 target/i386/cpu.h      | 4 ++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/target/i386/cpu-dump.c b/target/i386/cpu-dump.c
index 08ac957e99..40697064d9 100644
--- a/target/i386/cpu-dump.c
+++ b/target/i386/cpu-dump.c
@@ -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
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 9824b7f8f2..32d048f326 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -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);
 
-- 
2.38.1



  parent reply	other threads:[~2022-12-16 22:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 22:01 [PATCH 0/5] target/i386: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
2022-12-16 22:01 ` [PATCH 1/5] target/i386: Remove NEED_CPU_H guard from target-specific headers Philippe Mathieu-Daudé
2022-12-17  0:21   ` Richard Henderson
2022-12-16 22:01 ` [PATCH 2/5] target/i386/cpu: Remove dead helper_lock() declaration Philippe Mathieu-Daudé
2022-12-17  0:21   ` Richard Henderson
2022-12-16 22:01 ` [PATCH 3/5] target/i386/ops_sse: Include missing "cpu.h" header Philippe Mathieu-Daudé
2022-12-17  0:23   ` Richard Henderson
2022-12-16 22:01 ` Philippe Mathieu-Daudé [this message]
2022-12-17  0:24   ` [PATCH 4/5] target/i386: Remove x86_cpu_dump_local_apic_state() dead stub Richard Henderson
2022-12-16 22:01 ` [PATCH 5/5] hw/i386/x86: Reduce init_topo_info() scope Philippe Mathieu-Daudé
2022-12-17  0:25   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221216220158.6317-5-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=dirty@apple.com \
    --cc=eduardo@habkost.net \
    --cc=haxm-team@intel.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.com \
    --cc=richard.henderson@linaro.org \
    --cc=wenchao.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).