All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH-for-8.0 0/2] hw: Reduce "qemu/accel.h" inclusion
@ 2022-11-30 13:56 Philippe Mathieu-Daudé
  2022-11-30 13:56 ` [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-11-30 13:56 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Richard Henderson, Philippe Mathieu-Daudé,
	Thomas Huth, Yanan Wang, Paolo Bonzini, Marcel Apfelbaum

Another trivial series, restricting "qemu/accel.h".

Philippe Mathieu-Daudé (2):
  typedefs: Forward-declare AccelState
  hw: Reduce "qemu/accel.h" inclusion

 hw/core/machine.c       | 1 +
 include/hw/boards.h     | 1 -
 include/qemu/accel.h    | 4 ++--
 include/qemu/typedefs.h | 1 +
 4 files changed, 4 insertions(+), 3 deletions(-)

-- 
2.38.1



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

* [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState
  2022-11-30 13:56 [PATCH-for-8.0 0/2] hw: Reduce "qemu/accel.h" inclusion Philippe Mathieu-Daudé
@ 2022-11-30 13:56 ` Philippe Mathieu-Daudé
  2022-11-30 14:26   ` Fabiano Rosas
  2022-11-30 22:22   ` Richard Henderson
  2022-11-30 13:56 ` [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion Philippe Mathieu-Daudé
  2022-11-30 15:35 ` [PATCH-for-8.0 0/2] " Paolo Bonzini
  2 siblings, 2 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-11-30 13:56 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Richard Henderson, Philippe Mathieu-Daudé,
	Thomas Huth, Yanan Wang, Paolo Bonzini, Marcel Apfelbaum

Forward-declare AccelState in "qemu/typedefs.h" so structures
using a reference of it (like MachineState in "hw/boards.h")
don't have to include "qemu/accel.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/qemu/accel.h    | 4 ++--
 include/qemu/typedefs.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/qemu/accel.h b/include/qemu/accel.h
index ce4747634a..e84db2e3e5 100644
--- a/include/qemu/accel.h
+++ b/include/qemu/accel.h
@@ -26,10 +26,10 @@
 #include "qom/object.h"
 #include "exec/hwaddr.h"
 
-typedef struct AccelState {
+struct AccelState {
     /*< private >*/
     Object parent_obj;
-} AccelState;
+};
 
 typedef struct AccelClass {
     /*< private >*/
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 688408e048..073abab998 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -21,6 +21,7 @@
  * Incomplete struct types
  * Please keep this list in case-insensitive alphabetical order.
  */
+typedef struct AccelState AccelState;
 typedef struct AdapterInfo AdapterInfo;
 typedef struct AddressSpace AddressSpace;
 typedef struct AioContext AioContext;
-- 
2.38.1



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

* [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion
  2022-11-30 13:56 [PATCH-for-8.0 0/2] hw: Reduce "qemu/accel.h" inclusion Philippe Mathieu-Daudé
  2022-11-30 13:56 ` [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState Philippe Mathieu-Daudé
@ 2022-11-30 13:56 ` Philippe Mathieu-Daudé
  2022-11-30 15:17   ` Fabiano Rosas
  2022-11-30 23:38   ` Wilfred Mallawa
  2022-11-30 15:35 ` [PATCH-for-8.0 0/2] " Paolo Bonzini
  2 siblings, 2 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-11-30 13:56 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Richard Henderson, Philippe Mathieu-Daudé,
	Thomas Huth, Yanan Wang, Paolo Bonzini, Marcel Apfelbaum

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(-)

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"
-- 
2.38.1



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

* Re: [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState
  2022-11-30 13:56 ` [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState Philippe Mathieu-Daudé
@ 2022-11-30 14:26   ` Fabiano Rosas
  2022-11-30 22:22   ` Richard Henderson
  1 sibling, 0 replies; 10+ messages in thread
From: Fabiano Rosas @ 2022-11-30 14:26 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Eduardo Habkost, Richard Henderson, Philippe Mathieu-Daudé,
	Thomas Huth, Yanan Wang, Paolo Bonzini, Marcel Apfelbaum

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> Forward-declare AccelState in "qemu/typedefs.h" so structures
> using a reference of it (like MachineState in "hw/boards.h")
> don't have to include "qemu/accel.h".
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

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


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

* Re: [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion
  2022-11-30 13:56 ` [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion Philippe Mathieu-Daudé
@ 2022-11-30 15:17   ` Fabiano Rosas
  2022-11-30 15:43     ` Philippe Mathieu-Daudé
  2022-11-30 23:38   ` Wilfred Mallawa
  1 sibling, 1 reply; 10+ messages in thread
From: Fabiano Rosas @ 2022-11-30 15:17 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Eduardo Habkost, Richard Henderson, Philippe Mathieu-Daudé,
	Thomas Huth, Yanan Wang, Paolo Bonzini, Marcel Apfelbaum

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"


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

* Re: [PATCH-for-8.0 0/2] hw: Reduce "qemu/accel.h" inclusion
  2022-11-30 13:56 [PATCH-for-8.0 0/2] hw: Reduce "qemu/accel.h" inclusion Philippe Mathieu-Daudé
  2022-11-30 13:56 ` [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState Philippe Mathieu-Daudé
  2022-11-30 13:56 ` [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion Philippe Mathieu-Daudé
@ 2022-11-30 15:35 ` Paolo Bonzini
  2 siblings, 0 replies; 10+ messages in thread
From: Paolo Bonzini @ 2022-11-30 15:35 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Eduardo Habkost, Richard Henderson, Thomas Huth,
	Yanan Wang, Marcel Apfelbaum

Queued, thanks.

Paolo



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

* Re: [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion
  2022-11-30 15:17   ` Fabiano Rosas
@ 2022-11-30 15:43     ` Philippe Mathieu-Daudé
  2022-11-30 15:44       ` Paolo Bonzini
  0 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-11-30 15:43 UTC (permalink / raw)
  To: Fabiano Rosas, qemu-devel, Paolo Bonzini
  Cc: Eduardo Habkost, Richard Henderson, Thomas Huth, Yanan Wang,
	Marcel Apfelbaum

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(-)



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

* Re: [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion
  2022-11-30 15:43     ` Philippe Mathieu-Daudé
@ 2022-11-30 15:44       ` Paolo Bonzini
  0 siblings, 0 replies; 10+ messages in thread
From: Paolo Bonzini @ 2022-11-30 15:44 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fabiano Rosas, qemu-devel, Eduardo Habkost, Richard Henderson,
	Thomas Huth, Yanan Wang, Marcel Apfelbaum

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



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

* Re: [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState
  2022-11-30 13:56 ` [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState Philippe Mathieu-Daudé
  2022-11-30 14:26   ` Fabiano Rosas
@ 2022-11-30 22:22   ` Richard Henderson
  1 sibling, 0 replies; 10+ messages in thread
From: Richard Henderson @ 2022-11-30 22:22 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Eduardo Habkost, Thomas Huth, Yanan Wang, Paolo Bonzini,
	Marcel Apfelbaum

On 11/30/22 05:56, Philippe Mathieu-Daudé wrote:
> Forward-declare AccelState in "qemu/typedefs.h" so structures
> using a reference of it (like MachineState in "hw/boards.h")
> don't have to include "qemu/accel.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   include/qemu/accel.h    | 4 ++--
>   include/qemu/typedefs.h | 1 +
>   2 files changed, 3 insertions(+), 2 deletions(-)

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

r~


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

* Re: [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion
  2022-11-30 13:56 ` [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion Philippe Mathieu-Daudé
  2022-11-30 15:17   ` Fabiano Rosas
@ 2022-11-30 23:38   ` Wilfred Mallawa
  1 sibling, 0 replies; 10+ messages in thread
From: Wilfred Mallawa @ 2022-11-30 23:38 UTC (permalink / raw)
  To: qemu-devel, philmd
  Cc: wangyanan55, eduardo, richard.henderson, pbonzini, thuth,
	marcel.apfelbaum

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"


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

end of thread, other threads:[~2022-11-30 23:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 13:56 [PATCH-for-8.0 0/2] hw: Reduce "qemu/accel.h" inclusion Philippe Mathieu-Daudé
2022-11-30 13:56 ` [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState Philippe Mathieu-Daudé
2022-11-30 14:26   ` Fabiano Rosas
2022-11-30 22:22   ` Richard Henderson
2022-11-30 13:56 ` [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion Philippe Mathieu-Daudé
2022-11-30 15:17   ` Fabiano Rosas
2022-11-30 15:43     ` Philippe Mathieu-Daudé
2022-11-30 15:44       ` Paolo Bonzini
2022-11-30 23:38   ` Wilfred Mallawa
2022-11-30 15:35 ` [PATCH-for-8.0 0/2] " Paolo Bonzini

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.