Skip to contentSkip to conversation

exec/cpu-defs: Remove TCG backends dependency

PATCH Superseded Philippe Mathieu-Daudé 2 participants 4 messages Feb 4, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 exec/cpu-defs: Remove TCG backends dependency

"exec/cpu-defs.h" contains common CPU definitions for accelerators, which is not related to the TCG backends. See tcg/README description:

4) Backend

tcg-target.h contains the target specific definitions. tcg-target.c.inc contains the target specific code; it is #included by tcg/tcg.c, rather than being a standalone C file.

So far only "tcg/tcg.h" requires these headers.

Remove the "target-tcg.h" header dependency on accelerators.

---
 include/exec/cpu-defs.h | 3 ---
 1 file changed, 3 deletions(-)
include/exec/cpu-defs.h +0 -3
index d1f5e3fc3d8..ba3cd32a1ec 100644
@@ -25,9 +25,6 @@
 
 #include "qemu/host-utils.h"
 #include "qemu/thread.h"
-#ifdef CONFIG_TCG
-#include "tcg-target.h"
-#endif
 #ifndef CONFIG_USER_ONLY
 #include "exec/hwaddr.h"
 #endif
Signature · 1 line
2.26.2
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Philippe Mathieu-Daudé

"exec/cpu-defs.h" contains common CPU definitions for accelerators, which is not related to the TCG backends. See tcg/README description:

Most of the definitions are actually for TCG, not for all accelerators (the TLB mostly).

However, they're indeed unrelated to the backends, so

I'll let the TCG people pick it up.

Paolo

Quoted 30 lines

4) Backend

tcg-target.h contains the target specific definitions. tcg-target.c.inc contains the target specific code; it is #included by tcg/tcg.c, rather than being a standalone C file.

So far only "tcg/tcg.h" requires these headers.

Remove the "target-tcg.h" header dependency on accelerators.

---
  include/exec/cpu-defs.h | 3 ---
  1 file changed, 3 deletions(-)
include/exec/cpu-defs.h +0 -3
index d1f5e3fc3d8..ba3cd32a1ec 100644
@@ -25,9 +25,6 @@
 
  #include "qemu/host-utils.h"
  #include "qemu/thread.h"
-#ifdef CONFIG_TCG
-#include "tcg-target.h"
-#endif
  #ifndef CONFIG_USER_ONLY
  #include "exec/hwaddr.h"
  #endif
#2 lore raw
Quoted 7 lines · Paolo Bonzini
Quoted 3 lines · Philippe Mathieu-Daudé

"exec/cpu-defs.h" contains common CPU definitions for accelerators, which is not related to the TCG backends. See tcg/README description:

Most of the definitions are actually for TCG, not for all accelerators (the TLB mostly).

Ah ok. Richard, could you update the description or do you want me to respin?

Quoted 3 lines

However, they're indeed unrelated to the backends, so

Thanks, this avoids rebuilding the whole tree when doing a single change in these headers (I'll send a quick mail about it later, proven useful while bisecting).

#3 lore raw

Il gio 4 feb 2021, 19:41 Philippe Mathieu-Daudé <[email protected]> ha scritto:

Quoted 12 lines · Paolo Bonzini
Quoted 7 lines · Philippe Mathieu-Daudé
Quoted 3 lines

"exec/cpu-defs.h" contains common CPU definitions for accelerators, which is not related to the TCG backends. See tcg/README description:

Most of the definitions are actually for TCG, not for all accelerators (the TLB mostly).

Ah ok. Richard, could you update the description or do you want me to respin?

Quoted 9 lines
Quoted 3 lines

However, they're indeed unrelated to the backends, so

Thanks, this avoids rebuilding the whole tree when doing a single change in these headers (I'll send a quick mail about it later, proven useful while
bisecting).

You could respin and include this info as well.

Paolo

Quoted 1 line