All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] accel/tcg: Reduce headers inclusion
@ 2021-05-24 17:04 Philippe Mathieu-Daudé
  2021-05-24 17:04 ` [PATCH 1/2] accel/tcg: Reduce 'exec/tb-context.h' inclusion Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-24 17:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Richard Henderson, Philippe Mathieu-Daudé

Trivial series, restricting accel/tcg/ specific headers to TCG.

Philippe Mathieu-Daudé (2):
  accel/tcg: Reduce 'exec/tb-context.h' inclusion
  accel/tcg: Keep TranslationBlock headers local to TCG

 {include/exec => accel/tcg}/tb-context.h | 0
 {include/exec => accel/tcg}/tb-hash.h    | 0
 {include/exec => accel/tcg}/tb-lookup.h  | 2 +-
 include/exec/exec-all.h                  | 1 -
 include/tcg/tcg.h                        | 1 -
 accel/tcg/cpu-exec.c                     | 5 +++--
 accel/tcg/cputlb.c                       | 2 +-
 accel/tcg/tcg-runtime.c                  | 2 +-
 accel/tcg/translate-all.c                | 3 ++-
 MAINTAINERS                              | 1 -
 10 files changed, 8 insertions(+), 9 deletions(-)
 rename {include/exec => accel/tcg}/tb-context.h (100%)
 rename {include/exec => accel/tcg}/tb-hash.h (100%)
 rename {include/exec => accel/tcg}/tb-lookup.h (98%)

-- 
2.26.3



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] accel/tcg: Reduce 'exec/tb-context.h' inclusion
  2021-05-24 17:04 [PATCH 0/2] accel/tcg: Reduce headers inclusion Philippe Mathieu-Daudé
@ 2021-05-24 17:04 ` Philippe Mathieu-Daudé
  2021-05-24 17:04 ` [PATCH 2/2] accel/tcg: Keep TranslationBlock headers local to TCG Philippe Mathieu-Daudé
  2021-05-24 17:23 ` [PATCH 0/2] accel/tcg: Reduce headers inclusion Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-24 17:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Richard Henderson, Philippe Mathieu-Daudé

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

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/exec/exec-all.h   | 1 -
 include/tcg/tcg.h         | 1 -
 accel/tcg/cpu-exec.c      | 1 +
 accel/tcg/translate-all.c | 1 +
 4 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 6b036cae8f6..657e756ba44 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 0f0695e90da..74cb3453083 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/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 0dc5271715e..10e11f27bbe 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 640ff6e3e70..e9f4de5190d 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"
-- 
2.26.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] accel/tcg: Keep TranslationBlock headers local to TCG
  2021-05-24 17:04 [PATCH 0/2] accel/tcg: Reduce headers inclusion Philippe Mathieu-Daudé
  2021-05-24 17:04 ` [PATCH 1/2] accel/tcg: Reduce 'exec/tb-context.h' inclusion Philippe Mathieu-Daudé
@ 2021-05-24 17:04 ` Philippe Mathieu-Daudé
  2021-05-24 17:23 ` [PATCH 0/2] accel/tcg: Reduce headers inclusion Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-24 17:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Richard Henderson, Philippe Mathieu-Daudé

Only the TCG accelerator uses the TranslationBlock API.
Move the tb-context.h / tb-hash.h / tb-lookup.h from the
global namespace to the TCG one (in accel/tcg).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 {include/exec => accel/tcg}/tb-context.h | 0
 {include/exec => accel/tcg}/tb-hash.h    | 0
 {include/exec => accel/tcg}/tb-lookup.h  | 2 +-
 accel/tcg/cpu-exec.c                     | 6 +++---
 accel/tcg/cputlb.c                       | 2 +-
 accel/tcg/tcg-runtime.c                  | 2 +-
 accel/tcg/translate-all.c                | 4 ++--
 MAINTAINERS                              | 1 -
 8 files changed, 8 insertions(+), 9 deletions(-)
 rename {include/exec => accel/tcg}/tb-context.h (100%)
 rename {include/exec => accel/tcg}/tb-hash.h (100%)
 rename {include/exec => accel/tcg}/tb-lookup.h (98%)

diff --git a/include/exec/tb-context.h b/accel/tcg/tb-context.h
similarity index 100%
rename from include/exec/tb-context.h
rename to accel/tcg/tb-context.h
diff --git a/include/exec/tb-hash.h b/accel/tcg/tb-hash.h
similarity index 100%
rename from include/exec/tb-hash.h
rename to accel/tcg/tb-hash.h
diff --git a/include/exec/tb-lookup.h b/accel/tcg/tb-lookup.h
similarity index 98%
rename from include/exec/tb-lookup.h
rename to accel/tcg/tb-lookup.h
index 29d61ceb340..9c9e0079dad 100644
--- a/include/exec/tb-lookup.h
+++ b/accel/tcg/tb-lookup.h
@@ -14,7 +14,7 @@
 #endif
 
 #include "exec/exec-all.h"
-#include "exec/tb-hash.h"
+#include "tb-hash.h"
 
 /* Might cause an exception, so have a longjmp destination ready */
 static inline TranslationBlock *tb_lookup(CPUState *cpu, target_ulong pc,
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 10e11f27bbe..ad1279d2ed7 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -29,9 +29,6 @@
 #include "qemu/compiler.h"
 #include "qemu/timer.h"
 #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)
@@ -41,6 +38,9 @@
 #include "exec/cpu-all.h"
 #include "sysemu/cpu-timers.h"
 #include "sysemu/replay.h"
+#include "tb-hash.h"
+#include "tb-lookup.h"
+#include "tb-context.h"
 #include "internal.h"
 
 /* -icount align implementation. */
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 84e7d91a5ca..8f4925680c1 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -24,7 +24,6 @@
 #include "exec/memory.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cputlb.h"
-#include "exec/tb-hash.h"
 #include "exec/memory-internal.h"
 #include "exec/ram_addr.h"
 #include "tcg/tcg.h"
@@ -36,6 +35,7 @@
 #include "exec/translate-all.h"
 #include "trace/trace-root.h"
 #include "trace/mem.h"
+#include "tb-hash.h"
 #include "internal.h"
 #ifdef CONFIG_PLUGIN
 #include "qemu/plugin-memory.h"
diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c
index 49f5de37e87..66ac830e2f2 100644
--- a/accel/tcg/tcg-runtime.c
+++ b/accel/tcg/tcg-runtime.c
@@ -30,7 +30,7 @@
 #include "disas/disas.h"
 #include "exec/log.h"
 #include "tcg/tcg.h"
-#include "exec/tb-lookup.h"
+#include "tb-lookup.h"
 
 /* 32-bit helpers */
 
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index e9f4de5190d..1eefe6ea8d4 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -47,8 +47,6 @@
 #endif
 
 #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"
@@ -61,6 +59,8 @@
 #include "sysemu/tcg.h"
 #include "qapi/error.h"
 #include "hw/core/tcg-cpu-ops.h"
+#include "tb-hash.h"
+#include "tb-context.h"
 #include "internal.h"
 
 /* #define DEBUG_TB_INVALIDATE */
diff --git a/MAINTAINERS b/MAINTAINERS
index a77f2465694..5f55404f2fa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -128,7 +128,6 @@ F: docs/devel/decodetree.rst
 F: include/exec/cpu*.h
 F: include/exec/exec-all.h
 F: include/exec/helper*.h
-F: include/exec/tb-hash.h
 F: include/sysemu/cpus.h
 F: include/sysemu/tcg.h
 F: include/hw/core/tcg-cpu-ops.h
-- 
2.26.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] accel/tcg: Reduce headers inclusion
  2021-05-24 17:04 [PATCH 0/2] accel/tcg: Reduce headers inclusion Philippe Mathieu-Daudé
  2021-05-24 17:04 ` [PATCH 1/2] accel/tcg: Reduce 'exec/tb-context.h' inclusion Philippe Mathieu-Daudé
  2021-05-24 17:04 ` [PATCH 2/2] accel/tcg: Keep TranslationBlock headers local to TCG Philippe Mathieu-Daudé
@ 2021-05-24 17:23 ` Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2021-05-24 17:23 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini

On 5/24/21 10:04 AM, Philippe Mathieu-Daudé wrote:
> Trivial series, restricting accel/tcg/ specific headers to TCG.
> 
> Philippe Mathieu-Daudé (2):
>    accel/tcg: Reduce 'exec/tb-context.h' inclusion
>    accel/tcg: Keep TranslationBlock headers local to TCG
> 
>   {include/exec => accel/tcg}/tb-context.h | 0
>   {include/exec => accel/tcg}/tb-hash.h    | 0
>   {include/exec => accel/tcg}/tb-lookup.h  | 2 +-
>   include/exec/exec-all.h                  | 1 -
>   include/tcg/tcg.h                        | 1 -
>   accel/tcg/cpu-exec.c                     | 5 +++--
>   accel/tcg/cputlb.c                       | 2 +-
>   accel/tcg/tcg-runtime.c                  | 2 +-
>   accel/tcg/translate-all.c                | 3 ++-
>   MAINTAINERS                              | 1 -
>   10 files changed, 8 insertions(+), 9 deletions(-)
>   rename {include/exec => accel/tcg}/tb-context.h (100%)
>   rename {include/exec => accel/tcg}/tb-hash.h (100%)
>   rename {include/exec => accel/tcg}/tb-lookup.h (98%)

Thanks, queued to tcg-next.

r~



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-24 17:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 17:04 [PATCH 0/2] accel/tcg: Reduce headers inclusion Philippe Mathieu-Daudé
2021-05-24 17:04 ` [PATCH 1/2] accel/tcg: Reduce 'exec/tb-context.h' inclusion Philippe Mathieu-Daudé
2021-05-24 17:04 ` [PATCH 2/2] accel/tcg: Keep TranslationBlock headers local to TCG Philippe Mathieu-Daudé
2021-05-24 17:23 ` [PATCH 0/2] accel/tcg: Reduce headers inclusion Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.