diff mbox series

[PULL,07/31] accel/tcg: Reduce 'exec/tb-context.h' inclusion

Message ID 20210526234710.125396-8-richard.henderson@linaro.org
State New
Headers show
Series tcg patch queue | expand

Commit Message

Richard Henderson May 26, 2021, 11:46 p.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>


Only 2 headers require "exec/tb-context.h". Instead of having
all files including "exec/exec-all.h" also including it, directly
include it where it is required:
- accel/tcg/cpu-exec.c
- accel/tcg/translate-all.c

For plugins/plugin.h, we were implicitly relying on
  exec/exec-all.h -> exec/tb-context.h -> qemu/qht.h
which is now included directly.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Message-Id: <20210524170453.3791436-2-f4bug@amsat.org>
[rth: Fix plugins/plugin.h compilation]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 include/exec/exec-all.h   | 1 -
 include/tcg/tcg.h         | 1 -
 plugins/plugin.h          | 1 +
 accel/tcg/cpu-exec.c      | 1 +
 accel/tcg/translate-all.c | 1 +
 5 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.25.1

Comments

Philippe Mathieu-Daudé May 28, 2021, 3:44 p.m. UTC | #1
On 5/27/21 1:46 AM, Richard Henderson wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>

> 

> Only 2 headers require "exec/tb-context.h". Instead of having

> all files including "exec/exec-all.h" also including it, directly

> include it where it is required:

> - accel/tcg/cpu-exec.c

> - accel/tcg/translate-all.c

> 

> For plugins/plugin.h, we were implicitly relying on

>   exec/exec-all.h -> exec/tb-context.h -> qemu/qht.h

> which is now included directly.

> 

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Message-Id: <20210524170453.3791436-2-f4bug@amsat.org>

> [rth: Fix plugins/plugin.h compilation]


Ah, I see you squashed:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg810344.html
I was hoping it goes via Alex's testing-next tree or trivial first,
so this wouldn't be a problem when you apply this patch.
Thanks anyway :)
Phil.

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>  include/exec/exec-all.h   | 1 -

>  include/tcg/tcg.h         | 1 -

>  plugins/plugin.h          | 1 +

>  accel/tcg/cpu-exec.c      | 1 +

>  accel/tcg/translate-all.c | 1 +

>  5 files changed, 3 insertions(+), 2 deletions(-)


> diff --git a/plugins/plugin.h b/plugins/plugin.h

> index 1aa29dcadd..55017e3581 100644

> --- a/plugins/plugin.h

> +++ b/plugins/plugin.h

> @@ -13,6 +13,7 @@

>  #define _PLUGIN_INTERNAL_H_

>  

>  #include <gmodule.h>

> +#include "qemu/qht.h"

>  

>  #define QEMU_PLUGIN_MIN_VERSION 0
diff mbox series

Patch

diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 8021adf38f..754f4130c9 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -21,7 +21,6 @@ 
 #define EXEC_ALL_H
 
 #include "cpu.h"
-#include "exec/tb-context.h"
 #ifdef CONFIG_TCG
 #include "exec/cpu_ldst.h"
 #endif
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index 0f0695e90d..74cb345308 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -27,7 +27,6 @@ 
 
 #include "cpu.h"
 #include "exec/memop.h"
-#include "exec/tb-context.h"
 #include "qemu/bitops.h"
 #include "qemu/plugin.h"
 #include "qemu/queue.h"
diff --git a/plugins/plugin.h b/plugins/plugin.h
index 1aa29dcadd..55017e3581 100644
--- a/plugins/plugin.h
+++ b/plugins/plugin.h
@@ -13,6 +13,7 @@ 
 #define _PLUGIN_INTERNAL_H_
 
 #include <gmodule.h>
+#include "qemu/qht.h"
 
 #define QEMU_PLUGIN_MIN_VERSION 0
 
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 0dc5271715..10e11f27bb 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -31,6 +31,7 @@ 
 #include "qemu/rcu.h"
 #include "exec/tb-hash.h"
 #include "exec/tb-lookup.h"
+#include "exec/tb-context.h"
 #include "exec/log.h"
 #include "qemu/main-loop.h"
 #if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 640ff6e3e7..e9f4de5190 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -48,6 +48,7 @@ 
 
 #include "exec/cputlb.h"
 #include "exec/tb-hash.h"
+#include "exec/tb-context.h"
 #include "exec/translate-all.h"
 #include "qemu/bitmap.h"
 #include "qemu/error-report.h"