[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 44/75] target/s390x/cpu: Restrict cpu_get_tb_cpu_state() definitio
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 44/75] target/s390x/cpu: Restrict cpu_get_tb_cpu_state() definition to TCG |
Date: |
Tue, 7 Nov 2023 13:24:34 +0100 |
cpu_get_tb_cpu_state() is TCG specific. Another accelerator
calling it would be a bug, so restrict the definition to TCG,
along with "tcg_s390x.h" header inclusion.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20231106114500.5269-4-philmd@linaro.org>
---
target/s390x/cpu.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index 38d7197f4c..110902fa3c 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -29,7 +29,6 @@
#include "cpu_models.h"
#include "exec/cpu-defs.h"
#include "qemu/cpu-float.h"
-#include "tcg/tcg_s390x.h"
#include "qapi/qapi-types-machine-common.h"
#define ELF_MACHINE_UNAME "S390X"
@@ -383,6 +382,10 @@ static inline int cpu_mmu_index(CPUS390XState *env, bool
ifetch)
#endif
}
+#ifdef CONFIG_TCG
+
+#include "tcg/tcg_s390x.h"
+
static inline void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc,
uint64_t *cs_base, uint32_t *flags)
{
@@ -405,6 +408,8 @@ static inline void cpu_get_tb_cpu_state(CPUS390XState *env,
vaddr *pc,
}
}
+#endif /* CONFIG_TCG */
+
/* PER bits from control register 9 */
#define PER_CR9_EVENT_BRANCH 0x80000000
#define PER_CR9_EVENT_IFETCH 0x40000000
--
2.41.0
- [PULL 00/75] Misc HW/UI patches for 2023-11-07, Philippe Mathieu-Daudé, 2023/11/07
- [PULL 37/75] target/ppc: Move ppc_cpu_class_by_name() declaration to 'cpu.h', Philippe Mathieu-Daudé, 2023/11/07
- [PULL 36/75] target/ppc: Define powerpc_pm_insn_t in 'internal.h', Philippe Mathieu-Daudé, 2023/11/07
- [PULL 38/75] target/ppc: Move PowerPCCPUClass definition to 'cpu.h', Philippe Mathieu-Daudé, 2023/11/07
- [PULL 40/75] target/ppc: Move powerpc_mmu_t definition to 'cpu.h', Philippe Mathieu-Daudé, 2023/11/07
- [PULL 39/75] target/ppc: Move powerpc_excp_t definition to 'cpu.h', Philippe Mathieu-Daudé, 2023/11/07
- [PULL 41/75] target/ppc: Move powerpc_input_t definition to 'cpu.h', Philippe Mathieu-Daudé, 2023/11/07
- [PULL 45/75] target/s390x/cpu: Restrict CPUS390XState declaration to 'cpu.h', Philippe Mathieu-Daudé, 2023/11/07
- [PULL 43/75] hw/s390x/sclp: Have sclp_service_call[_protected]() take S390CPU*, Philippe Mathieu-Daudé, 2023/11/07
- [PULL 42/75] hw/s390x/css: Have css_do_sic() take S390CPU instead of CPUS390XState, Philippe Mathieu-Daudé, 2023/11/07
- [PULL 44/75] target/s390x/cpu: Restrict cpu_get_tb_cpu_state() definition to TCG,
Philippe Mathieu-Daudé <=
- [PULL 51/75] hw/cpu: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/11/07
- [PULL 47/75] target: Move ArchCPUClass definition to 'cpu.h', Philippe Mathieu-Daudé, 2023/11/07
- [PULL 72/75] MAINTAINERS: Add include/hw/xtensa/mx_pic.h to the XTFPGA machine section, Philippe Mathieu-Daudé, 2023/11/07
- [PULL 68/75] hw/sd: Declare QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2023/11/07
- [PULL 73/75] MAINTAINERS: Add more guest-agent related files to the corresponding section, Philippe Mathieu-Daudé, 2023/11/07
- [PULL 75/75] dump: Add close fd on error return to avoid resource leak, Philippe Mathieu-Daudé, 2023/11/07
- Re: [PULL 00/75] Misc HW/UI patches for 2023-11-07, Stefan Hajnoczi, 2023/11/08