[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/7] sysemu/tcg: Restrict tcg_exec_init() to CONFIG_TCG
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 1/7] sysemu/tcg: Restrict tcg_exec_init() to CONFIG_TCG |
Date: |
Tue, 2 Mar 2021 11:27:31 +0100 |
Invert the #ifdef'ry to easily restrict tcg_exec_init() declaration
to CONFIG_TCG.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/sysemu/tcg.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/sysemu/tcg.h b/include/sysemu/tcg.h
index 00349fb18a7..fddde2b6b9a 100644
--- a/include/sysemu/tcg.h
+++ b/include/sysemu/tcg.h
@@ -8,13 +8,15 @@
#ifndef SYSEMU_TCG_H
#define SYSEMU_TCG_H
+#ifndef CONFIG_TCG
+#define tcg_enabled() 0
+#else
+
void tcg_exec_init(unsigned long tb_size, int splitwx);
-#ifdef CONFIG_TCG
extern bool tcg_allowed;
#define tcg_enabled() (tcg_allowed)
-#else
-#define tcg_enabled() 0
-#endif
+
+#endif /* CONFIG_TCG */
#endif
--
2.26.2
- [RFC PATCH 0/7] cpu: Move CPUClass::has_work() to TCGCPUOps, Philippe Mathieu-Daudé, 2021/03/02
- [PATCH 1/7] sysemu/tcg: Restrict tcg_exec_init() to CONFIG_TCG,
Philippe Mathieu-Daudé <=
- [PATCH 2/7] sysemu/tcg: Restrict qemu_tcg_mttcg_enabled() to TCG, Philippe Mathieu-Daudé, 2021/03/02
- [PATCH 3/7] target/arm: Directly use arm_cpu_has_work instead of CPUClass::has_work, Philippe Mathieu-Daudé, 2021/03/02
- [PATCH 4/7] target/s390x: Move s390_cpu_has_work to excp_helper.c, Philippe Mathieu-Daudé, 2021/03/02
- [RFC PATCH 5/7] cpu: Declare cpu_has_work() in 'sysemu/tcg.h', Philippe Mathieu-Daudé, 2021/03/02
- [RFC PATCH 6/7] cpu: Move CPUClass::has_work() to TCGCPUOps, Philippe Mathieu-Daudé, 2021/03/02
- [PATCH 7/7] target/arm: Restrict arm_cpu_has_work() to TCG, Philippe Mathieu-Daudé, 2021/03/02