[PATCH] hw/intc/xics: Include missing 'cpu.h' header

Philippe Mathieu-Daudé posted 1 patch 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240129170529.74305-1-philmd@linaro.org
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Harsh Prateek Bora <harshpb@linux.ibm.com>
hw/intc/xics.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] hw/intc/xics: Include missing 'cpu.h' header
Posted by Philippe Mathieu-Daudé 10 months ago
Include missing headers in order to avoid when refactoring
unrelated headers:

  hw/intc/xics.c: In function 'icp_realize':
  hw/intc/xics.c:304:5: error: unknown type name 'PowerPCCPU'
    304 |     PowerPCCPU *cpu;
        |     ^~~~~~~~~~

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/intc/xics.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 8b25787227..700abfa7a6 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -40,6 +40,7 @@
 #include "hw/irq.h"
 #include "sysemu/kvm.h"
 #include "sysemu/reset.h"
+#include "target/ppc/cpu.h"
 
 void icp_pic_print_info(ICPState *icp, Monitor *mon)
 {
-- 
2.41.0


Re: [PATCH] hw/intc/xics: Include missing 'cpu.h' header
Posted by Thomas Huth 10 months ago
On 29/01/2024 18.05, Philippe Mathieu-Daudé wrote:
> Include missing headers in order to avoid when refactoring
> unrelated headers:
> 
>    hw/intc/xics.c: In function 'icp_realize':
>    hw/intc/xics.c:304:5: error: unknown type name 'PowerPCCPU'
>      304 |     PowerPCCPU *cpu;
>          |     ^~~~~~~~~~
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/intc/xics.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index 8b25787227..700abfa7a6 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -40,6 +40,7 @@
>   #include "hw/irq.h"
>   #include "sysemu/kvm.h"
>   #include "sysemu/reset.h"
> +#include "target/ppc/cpu.h"
>   
>   void icp_pic_print_info(ICPState *icp, Monitor *mon)
>   {

Reviewed-by: Thomas Huth <thuth@redhat.com>