qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org,
	 Richard Henderson <richard.henderson@linaro.org>,
	 Pierrick Bouvier <pierrick.bouvier@linaro.org>
Subject: Re: [RFC PATCH 09/19] accel: Factor accel_cpu_realize() out
Date: Wed, 11 Jun 2025 14:46:01 +0100	[thread overview]
Message-ID: <87plfajsrq.fsf@draig.linaro.org> (raw)
In-Reply-To: <20250606164418.98655-10-philmd@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Fri, 6 Jun 2025 18:44:08 +0200")

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> Factor accel_cpu_realize() out of accel_cpu_common_realize()
> for re-use.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  accel/accel-internal.h |  2 ++
>  include/qemu/accel.h   |  2 ++
>  accel/accel-common.c   | 15 ++++++++++++---
>  3 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/accel/accel-internal.h b/accel/accel-internal.h
> index d3a4422cbf7..b541377c349 100644
> --- a/accel/accel-internal.h
> +++ b/accel/accel-internal.h
> @@ -14,4 +14,6 @@
>  
>  void accel_init_ops_interfaces(AccelClass *ac);
>  
> +bool accel_cpu_realize(AccelState *accel, CPUState *cpu, Error **errp);
> +
>  #endif /* ACCEL_SYSTEM_H */
> diff --git a/include/qemu/accel.h b/include/qemu/accel.h
> index c660c5f4b11..3c9aaf9523c 100644
> --- a/include/qemu/accel.h
> +++ b/include/qemu/accel.h
> @@ -91,6 +91,8 @@ void accel_setup_post(MachineState *ms);
>   */
>  void accel_cpu_instance_init(CPUState *cpu);
>  
> +bool accel_cpu_realize(AccelState *accel, CPUState *cpu, Error **errp);
> +

Duplicate forward declarations:

  FAILED: libuser.a.p/accel_accel-user.c.o 
  cc -m64 -Ilibuser.a.p -I. -I../.. -I../../common-user/host/x86_64 -I../../linux-user/include/host/x86_64 -I../../linux-user/include -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -fstack-protector-strong -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit-fallthrough=2 -Winit-self -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls -Wshadow=local -Wstrict-prototypes -Wtype-limits -Wundef -Wvla -Wwrite-strings -Wno-missing-include-dirs -Wno-psabi -Wno-shift-negative-value -isystem /home/alex/lsrc/qemu.git/linux-headers -isystem linux-headers -iquote . -iquote /home/alex/lsrc/qemu.git -iquote /home/alex/lsrc/qemu.git/include -iquote /home/alex/lsrc/qemu.git/host/include/x86_64 -iquote /home/alex/lsrc/qemu.git/host/include/generic -iquote /home/alex/lsrc/qemu.git/tcg/i386 -pthread -mcx16 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -ftrivial-auto-var-init=zero -fzero-call-used-regs=used-gpr -gsplit-dwarf -fPIE -DCONFIG_USER_ONLY -DCOMPILING_SYSTEM_VS_USER -MD -MQ libuser.a.p/accel_accel-user.c.o -MF libuser.a.p/accel_accel-user.c.o.d -o libuser.a.p/accel_accel-user.c.o -c ../../accel/accel-user.c
  In file included from ../../accel/accel-user.c:12:
  ../../accel/accel-internal.h:17:6: error: redundant redeclaration of ‘accel_cpu_realize’ [-Werror=redundant-decls]
     17 | bool accel_cpu_realize(AccelState *accel, CPUState *cpu, Error **errp);
        |      ^~~~~~~~~~~~~~~~~
  In file included from ../../accel/accel-user.c:11:
  /home/alex/lsrc/qemu.git/include/qemu/accel.h:94:6: note: previous declaration of ‘accel_cpu_realize’ with type ‘_Bool(AccelState *, CPUState *, Error **)’
     94 | bool accel_cpu_realize(AccelState *accel, CPUState *cpu, Error **errp);
        |      ^~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2025-06-11 13:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06 16:43 [RFC PATCH 00/19] accel: Preparatory cleanups for split-accel Philippe Mathieu-Daudé
2025-06-06 16:44 ` [RFC PATCH 01/19] hw/arm/virt: Only require TCG || QTest to use virtualization extension Philippe Mathieu-Daudé
2025-06-07 13:18   ` Richard Henderson
2025-06-11 13:37   ` Alex Bennée
2025-06-11 13:45   ` Miguel Luis
2025-06-11 14:31     ` Alex Bennée
2025-06-11 14:38       ` Miguel Luis
2025-06-06 16:44 ` [RFC PATCH 02/19] system/cpus: Only kick running vCPUs Philippe Mathieu-Daudé
2025-06-07 13:23   ` Richard Henderson
2025-06-16  8:21     ` Philippe Mathieu-Daudé
2025-06-17  9:42       ` Alex Bennée
2025-06-06 16:44 ` [RFC PATCH 03/19] accel: Keep reference to AccelOpsClass in AccelClass Philippe Mathieu-Daudé
2025-06-07 13:35   ` Richard Henderson
2025-06-11 13:42   ` Alex Bennée
2025-06-06 16:44 ` [RFC PATCH 04/19] accel: Propagate AccelState to AccelClass::init_machine() Philippe Mathieu-Daudé
2025-06-07 13:31   ` Richard Henderson
2025-06-11 13:42   ` Alex Bennée
2025-06-06 16:44 ` [RFC PATCH 05/19] accel/kvm: Prefer local AccelState over global MachineState::accel Philippe Mathieu-Daudé
2025-06-07 13:30   ` Richard Henderson
2025-06-06 16:44 ` [RFC PATCH 06/19] accel/hvf: Fix TYPE_HVF_ACCEL instance size Philippe Mathieu-Daudé
2025-06-07 13:29   ` Richard Henderson
2025-06-06 16:44 ` [RFC PATCH 07/19] accel/hvf: Re-use QOM allocated state Philippe Mathieu-Daudé
2025-06-07 13:30   ` Richard Henderson
2025-06-06 16:44 ` [RFC PATCH 08/19] accel/tcg: Prefer local AccelState over global current_accel() Philippe Mathieu-Daudé
2025-06-07 13:37   ` Richard Henderson
2025-06-06 16:44 ` [RFC PATCH 09/19] accel: Factor accel_cpu_realize() out Philippe Mathieu-Daudé
2025-06-11 13:46   ` Alex Bennée [this message]
2025-06-06 16:44 ` [RFC PATCH 10/19] accel/dummy: Factor dummy_thread_precreate() out Philippe Mathieu-Daudé
2025-06-06 16:44 ` [RFC PATCH 11/19] accel/dummy: Factor tcg_vcpu_thread_precreate() out Philippe Mathieu-Daudé
2025-06-06 16:44 ` [RFC PATCH 12/19] accel: Factor accel_create_vcpu_thread() out Philippe Mathieu-Daudé
2025-06-06 16:44 ` [RFC PATCH 13/19] accel: Introduce AccelOpsClass::cpu_thread_routine handler Philippe Mathieu-Daudé
2025-06-11 14:09   ` Alex Bennée
2025-06-06 16:44 ` [RFC PATCH 14/19] accel/dummy: Convert to AccelOpsClass::cpu_thread_routine Philippe Mathieu-Daudé
2025-06-06 16:44 ` [RFC PATCH 15/19] accel/tcg: " Philippe Mathieu-Daudé
2025-06-06 16:44 ` [RFC PATCH 16/19] accel/hvf: " Philippe Mathieu-Daudé
2025-06-06 16:44 ` [RFC PATCH 17/19] accel/kvm: " Philippe Mathieu-Daudé
2025-06-06 16:44 ` [RFC PATCH 18/19] accel/nvmm: " Philippe Mathieu-Daudé
2025-06-06 16:44 ` [RFC PATCH 19/19] accel/whpx: " Philippe Mathieu-Daudé
2025-06-11 14:00 ` [RFC PATCH 00/19] accel: Preparatory cleanups for split-accel Alex Bennée

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=87plfajsrq.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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).