diff mbox series

[PATCH-for-8.0,2/2] hw: Reduce "qemu/accel.h" inclusion

Message ID 20221130135641.85328-3-philmd@linaro.org
State New
Headers show
Series hw: Reduce "qemu/accel.h" inclusion | expand

Commit Message

Philippe Mathieu-Daudé Nov. 30, 2022, 1:56 p.m. UTC
Move "qemu/accel.h" include from the heavily included
"hw/boards.h" to hw/core/machine.c, the single file using
the AccelState definition.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/core/machine.c   | 1 +
 include/hw/boards.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

Fabiano Rosas Nov. 30, 2022, 3:17 p.m. UTC | #1
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> Move "qemu/accel.h" include from the heavily included
> "hw/boards.h" to hw/core/machine.c, the single file using
> the AccelState definition.

Do you mean accel_init_interfaces() and ACCEL_GET_CLASS? I don't see
AccelState explicitly.

Anyway,

Reviewed-by: Fabiano Rosas <farosas@suse.de>

> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/core/machine.c   | 1 +
>  include/hw/boards.h | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 8d34caa31d..42fc6f1e84 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -12,6 +12,7 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/option.h"
> +#include "qemu/accel.h"
>  #include "qapi/qmp/qerror.h"
>  #include "sysemu/replay.h"
>  #include "qemu/units.h"
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index 90f1dd3aeb..f00f74c5f4 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -6,7 +6,6 @@
>  #include "exec/memory.h"
>  #include "sysemu/hostmem.h"
>  #include "sysemu/blockdev.h"
> -#include "qemu/accel.h"
>  #include "qapi/qapi-types-machine.h"
>  #include "qemu/module.h"
>  #include "qom/object.h"
Philippe Mathieu-Daudé Nov. 30, 2022, 3:43 p.m. UTC | #2
On 30/11/22 16:17, Fabiano Rosas wrote:
> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> 
>> Move "qemu/accel.h" include from the heavily included
>> "hw/boards.h" to hw/core/machine.c, the single file using
>> the AccelState definition.
> 
> Do you mean accel_init_interfaces() and ACCEL_GET_CLASS? I don't see
> AccelState explicitly.

Oops you are right...

Paolo, do you mind fixing with:

    Move "qemu/accel.h" include from the heavily included
    "hw/boards.h" to hw/core/machine.c, the single file using
    accel-related definitions.

or do you want me to respin a v2?

> Anyway,
> 
> Reviewed-by: Fabiano Rosas <farosas@suse.de>

Thanks!

>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   hw/core/machine.c   | 1 +
>>   include/hw/boards.h | 1 -
>>   2 files changed, 1 insertion(+), 1 deletion(-)
Paolo Bonzini Nov. 30, 2022, 3:44 p.m. UTC | #3
On Wed, Nov 30, 2022 at 4:43 PM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> On 30/11/22 16:17, Fabiano Rosas wrote:
> > Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> >
> >> Move "qemu/accel.h" include from the heavily included
> >> "hw/boards.h" to hw/core/machine.c, the single file using
> >> the AccelState definition.
> >
> > Do you mean accel_init_interfaces() and ACCEL_GET_CLASS? I don't see
> > AccelState explicitly.
>
> Paolo, do you mind fixing with:
>
>     Move "qemu/accel.h" include from the heavily included
>     "hw/boards.h" to hw/core/machine.c, the single file using
>     accel-related definitions.

Can do, thanks for the suggestion.

Paolo
Wilfred Mallawa Nov. 30, 2022, 11:38 p.m. UTC | #4
On Wed, 2022-11-30 at 14:56 +0100, Philippe Mathieu-Daudé wrote:
> Move "qemu/accel.h" include from the heavily included
> "hw/boards.h" to hw/core/machine.c, the single file using
> the AccelState definition.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/core/machine.c   | 1 +
>  include/hw/boards.h | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 8d34caa31d..42fc6f1e84 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -12,6 +12,7 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/option.h"
> +#include "qemu/accel.h"
>  #include "qapi/qmp/qerror.h"
>  #include "sysemu/replay.h"
>  #include "qemu/units.h"
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index 90f1dd3aeb..f00f74c5f4 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -6,7 +6,6 @@
>  #include "exec/memory.h"
>  #include "sysemu/hostmem.h"
>  #include "sysemu/blockdev.h"
> -#include "qemu/accel.h"
>  #include "qapi/qapi-types-machine.h"
>  #include "qemu/module.h"
>  #include "qom/object.h"
diff mbox series

Patch

diff --git a/hw/core/machine.c b/hw/core/machine.c
index 8d34caa31d..42fc6f1e84 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -12,6 +12,7 @@ 
 
 #include "qemu/osdep.h"
 #include "qemu/option.h"
+#include "qemu/accel.h"
 #include "qapi/qmp/qerror.h"
 #include "sysemu/replay.h"
 #include "qemu/units.h"
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 90f1dd3aeb..f00f74c5f4 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -6,7 +6,6 @@ 
 #include "exec/memory.h"
 #include "sysemu/hostmem.h"
 #include "sysemu/blockdev.h"
-#include "qemu/accel.h"
 #include "qapi/qapi-types-machine.h"
 #include "qemu/module.h"
 #include "qom/object.h"