[PATCH v2 0/2] Split out tcg init functions to tcg/startup.h

Richard Henderson posted 2 patches 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230930031114.1042913-1-richard.henderson@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Laurent Vivier <laurent@vivier.eu>
include/tcg/startup.h           | 58 +++++++++++++++++++++++++++++++++
include/tcg/tcg.h               |  3 --
accel/tcg/tcg-accel-ops-mttcg.c |  2 +-
accel/tcg/tcg-accel-ops-rr.c    |  2 +-
accel/tcg/tcg-all.c             |  4 +--
bsd-user/main.c                 |  4 +--
linux-user/main.c               |  4 +--
linux-user/syscall.c            |  2 +-
tcg/tcg.c                       |  4 ++-
9 files changed, 70 insertions(+), 13 deletions(-)
create mode 100644 include/tcg/startup.h
[PATCH v2 0/2] Split out tcg init functions to tcg/startup.h
Posted by Richard Henderson 7 months ago
Supercedes: <20230923130843.3708899-1-peter.maydell@linaro.org>
("[PATCH] tcg.h: Split out runtime-only functions into tcg/runtime.h")

I thought "startup.h" was perhaps a better name than "runtime.h",
at least for the functions moved, since it's about starting up
either tcg or tcg within a new thread.

By removing the argument to tcg_prologue_init(), we can simplify
the users even further, since they no longer require TCGContext.

Adding tcg_init() seems to match the other two as a startup-y
function and allows tcg-all.c to avoid "tcg.h" as well.


r~


Richard Henderson (2):
  tcg: Remove argument to tcg_prologue_init
  tcg: Split out tcg init functions to tcg/startup.h

 include/tcg/startup.h           | 58 +++++++++++++++++++++++++++++++++
 include/tcg/tcg.h               |  3 --
 accel/tcg/tcg-accel-ops-mttcg.c |  2 +-
 accel/tcg/tcg-accel-ops-rr.c    |  2 +-
 accel/tcg/tcg-all.c             |  4 +--
 bsd-user/main.c                 |  4 +--
 linux-user/main.c               |  4 +--
 linux-user/syscall.c            |  2 +-
 tcg/tcg.c                       |  4 ++-
 9 files changed, 70 insertions(+), 13 deletions(-)
 create mode 100644 include/tcg/startup.h

-- 
2.34.1
Re: [PATCH v2 0/2] Split out tcg init functions to tcg/startup.h
Posted by Philippe Mathieu-Daudé 7 months ago
On 30/9/23 05:11, Richard Henderson wrote:
> Supercedes: <20230923130843.3708899-1-peter.maydell@linaro.org>
> ("[PATCH] tcg.h: Split out runtime-only functions into tcg/runtime.h")
> 
> I thought "startup.h" was perhaps a better name than "runtime.h",
> at least for the functions moved, since it's about starting up
> either tcg or tcg within a new thread.
> 
> By removing the argument to tcg_prologue_init(), we can simplify
> the users even further, since they no longer require TCGContext.
> 
> Adding tcg_init() seems to match the other two as a startup-y
> function and allows tcg-all.c to avoid "tcg.h" as well.
> 
> 
> r~
> 
> 
> Richard Henderson (2):
>    tcg: Remove argument to tcg_prologue_init
>    tcg: Split out tcg init functions to tcg/startup.h

Series:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>