diff mbox

[Discussion,09/10] exec: remove the unnecessary include of "exec-all.h"

Message ID 1393901250-3922-10-git-send-email-xbing6@gmail.com
State New
Headers show

Commit Message

Xuebing Wang March 4, 2014, 2:47 a.m. UTC
include/exec/exec-all.h should ONLY be included in target-xxx/*
-   'git grep -nw exec-all.h' confirms this

Signed-off-by: Xuebing Wang <xbing6@gmail.com>
---
 cputlb.c   |    1 -
 tcg/README |    2 +-
 tci.c      |    2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

Comments

Paolo Bonzini March 4, 2014, 10:27 a.m. UTC | #1
Il 04/03/2014 03:47, Xuebing Wang ha scritto:
> include/exec/exec-all.h should ONLY be included in target-xxx/*
> -   'git grep -nw exec-all.h' confirms this

Ok.

Paolo

> Signed-off-by: Xuebing Wang <xbing6@gmail.com>
> ---
>  cputlb.c   |    1 -
>  tcg/README |    2 +-
>  tci.c      |    2 +-
>  3 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/cputlb.c b/cputlb.c
> index 724bdda..f1458a6 100644
> --- a/cputlb.c
> +++ b/cputlb.c
> @@ -23,7 +23,6 @@
>  #include "cpu.h" /* target-xxx/cpu.h, required for CPUArchState etc */
>
>  #include "config.h"
> -#include "exec/exec-all.h"
>  #include "exec/memory.h"
>
>  #include "exec/cputlb.h"
> diff --git a/tcg/README b/tcg/README
> index f178212..0788bdc 100644
> --- a/tcg/README
> +++ b/tcg/README
> @@ -530,7 +530,7 @@ register.
>    inline TCG may still be faster for longer sequences.
>
>  - The hard limit on the number of TCG instructions you can generate
> -  per guest instruction is set by MAX_OP_PER_INSTR in exec-all.h --
> +  per guest instruction is set by MAX_OP_PER_INSTR in translate.h --
>    you cannot exceed this without risking a buffer overrun.
>
>  - Use the 'discard' instruction if you know that TCG won't be able to
> diff --git a/tci.c b/tci.c
> index 0202ed9..7b9d0af 100644
> --- a/tci.c
> +++ b/tci.c
> @@ -25,7 +25,7 @@
>  #endif
>
>  #include "qemu-common.h"
> -#include "exec/exec-all.h"           /* MAX_OPC_PARAM_IARGS */
> +#include "exec/translate.h"           /* MAX_OPC_PARAM_IARGS */
>  #include "tcg-op.h"
>
>  /* Marker for missing code. */
>
Peter Maydell March 4, 2014, 11:11 a.m. UTC | #2
On 4 March 2014 02:47, Xuebing Wang <xbing6@gmail.com> wrote:
> include/exec/exec-all.h should ONLY be included in target-xxx/*

Why?

This header file defines a number of functions and types
that are used outside target-xxx/. At the moment we implicitly
rely on cpu.h pulling them in. Maybe it would be nice to split
out the things that only the target frontends care about from
APIs used by other parts of QEMU, but that's not what this patch
is doing.

thanks
-- PMM
Peter Maydell March 4, 2014, 11:16 a.m. UTC | #3
On 4 March 2014 11:11, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 4 March 2014 02:47, Xuebing Wang <xbing6@gmail.com> wrote:
>> include/exec/exec-all.h should ONLY be included in target-xxx/*
>
> Why?
>
> This header file defines a number of functions and types
> that are used outside target-xxx/. At the moment we implicitly
> rely on cpu.h pulling them in.

My question still stands, but this bit is wrong:

> Maybe it would be nice to split
> out the things that only the target frontends care about from
> APIs used by other parts of QEMU, but that's not what this patch
> is doing.

...because that is what patch 8 does. Sorry, read those out of order.

thanks
-- PMM
diff mbox

Patch

diff --git a/cputlb.c b/cputlb.c
index 724bdda..f1458a6 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -23,7 +23,6 @@ 
 #include "cpu.h" /* target-xxx/cpu.h, required for CPUArchState etc */
 
 #include "config.h"
-#include "exec/exec-all.h"
 #include "exec/memory.h"
 
 #include "exec/cputlb.h"
diff --git a/tcg/README b/tcg/README
index f178212..0788bdc 100644
--- a/tcg/README
+++ b/tcg/README
@@ -530,7 +530,7 @@  register.
   inline TCG may still be faster for longer sequences.
 
 - The hard limit on the number of TCG instructions you can generate
-  per guest instruction is set by MAX_OP_PER_INSTR in exec-all.h --
+  per guest instruction is set by MAX_OP_PER_INSTR in translate.h --
   you cannot exceed this without risking a buffer overrun.
 
 - Use the 'discard' instruction if you know that TCG won't be able to
diff --git a/tci.c b/tci.c
index 0202ed9..7b9d0af 100644
--- a/tci.c
+++ b/tci.c
@@ -25,7 +25,7 @@ 
 #endif
 
 #include "qemu-common.h"
-#include "exec/exec-all.h"           /* MAX_OPC_PARAM_IARGS */
+#include "exec/translate.h"           /* MAX_OPC_PARAM_IARGS */
 #include "tcg-op.h"
 
 /* Marker for missing code. */