Skip to content

Commit

Permalink
accel/tcg: Make monitor.c a target-agnostic unit
Browse files Browse the repository at this point in the history
Move target-agnostic declarations from "internal-target.h"
to a new "internal-common.h" header.
monitor.c now don't include target specific headers and can
be compiled once in system_ss[].

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20230914185718.76241-10-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
philmd authored and rth7680 committed Oct 4, 2023
1 parent 4c268d6 commit 5934660
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
1 change: 1 addition & 0 deletions accel/tcg/cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "tb-jmp-cache.h"
#include "tb-hash.h"
#include "tb-context.h"
#include "internal-common.h"
#include "internal-target.h"

/* -icount align implementation. */
Expand Down
17 changes: 17 additions & 0 deletions accel/tcg/internal-common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Internal execution defines for qemu (target agnostic)
*
* Copyright (c) 2003 Fabrice Bellard
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/

#ifndef ACCEL_TCG_INTERNAL_COMMON_H
#define ACCEL_TCG_INTERNAL_COMMON_H

extern int64_t max_delay;
extern int64_t max_advance;

void dump_exec_info(GString *buf);

#endif
5 changes: 0 additions & 5 deletions accel/tcg/internal-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ static inline bool cpu_in_serial_context(CPUState *cs)
return !(cs->tcg_cflags & CF_PARALLEL) || cpu_in_exclusive_context(cs);
}

extern int64_t max_delay;
extern int64_t max_advance;

void dump_exec_info(GString *buf);

extern bool one_insn_per_tb;

/**
Expand Down
3 changes: 3 additions & 0 deletions accel/tcg/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)

specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
'cputlb.c',
))

system_ss.add(when: ['CONFIG_TCG'], if_true: files(
'monitor.c',
))

Expand Down
2 changes: 1 addition & 1 deletion accel/tcg/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "sysemu/cpu-timers.h"
#include "sysemu/tcg.h"
#include "tcg/tcg.h"
#include "internal-target.h"
#include "internal-common.h"


static void dump_drift_info(GString *buf)
Expand Down
1 change: 1 addition & 0 deletions accel/tcg/translate-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#include "tb-jmp-cache.h"
#include "tb-hash.h"
#include "tb-context.h"
#include "internal-common.h"
#include "internal-target.h"
#include "perf.h"
#include "tcg/insn-start-words.h"
Expand Down

0 comments on commit 5934660

Please sign in to comment.