OSDN Git Service

target/ppc: Restrict 'qapi-commands-machine.h' to system emulation
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 23 Feb 2023 15:55:40 +0000 (16:55 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 2 Mar 2023 06:51:33 +0000 (07:51 +0100)
commit0f3fea217164e3925db91d46f21fc9fa11708e66
tree7a34f9b494596f7d94bb628fc66679a40f15e93f
parent381b43f85508e7283442c13fb31728103b0b4d2b
target/ppc: Restrict 'qapi-commands-machine.h' to system emulation

Since commit a0e61807a3 ("qapi: Remove QMP events and commands from
user-mode builds") we don't generate the "qapi-commands-machine.h"
header in a user-emulation-only build.

Move the QMP functions from cpu_init.c (which is always compiled)
to monitor.c (which is only compiled when system-emulation
is selected).  Rename monitor.c to arm-qmp-cmds.c.

Note ppc_cpu_class_by_name() is used by both file units, so we
expose its prototype in "cpu-qom.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20230223155540.30370-5-philmd@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
target/ppc/cpu-qom.h
target/ppc/cpu_init.c
target/ppc/meson.build
target/ppc/ppc-qmp-cmds.c [moved from target/ppc/monitor.c with 78% similarity]