diff mbox series

[v3,3/3,bonus] spapr: remove the XICS header from the machine and device models

Message ID 20180619151600.22985-1-clg@kaod.org
State New
Headers show
Series None | expand

Commit Message

Cédric Le Goater June 19, 2018, 3:16 p.m. UTC
The XICS routines are now completely hidden behind the sPAPR IRQ
interface. There is no need to include the header files anymore.

The only remaining direct use of XICS is done by the sPAPR cores which
need to create the IRQ presenter. This part will be removed when the
XIVE backend is introduced.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 include/hw/ppc/spapr.h     | 2 +-
 include/hw/ppc/spapr_irq.h | 2 ++
 hw/ppc/spapr.c             | 1 -
 hw/ppc/spapr_cpu_core.c    | 1 +
 hw/ppc/spapr_vio.c         | 1 -
 5 files changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index acc2c01e1123..190d7f04d8d0 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -3,7 +3,6 @@ 
 
 #include "sysemu/dma.h"
 #include "hw/boards.h"
-#include "hw/ppc/xics.h"
 #include "hw/ppc/spapr_drc.h"
 #include "hw/mem/pc-dimm.h"
 #include "hw/ppc/spapr_ovec.h"
@@ -15,6 +14,7 @@  struct sPAPRNVRAM;
 typedef struct sPAPREventLogEntry sPAPREventLogEntry;
 typedef struct sPAPREventSource sPAPREventSource;
 typedef struct sPAPRPendingHPT sPAPRPendingHPT;
+typedef struct ICSState ICSState;
 
 #define HPTE64_V_HPTE_DIRTY     0x0000000000000040ULL
 #define SPAPR_ENTRY_POINT       0x100
diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h
index f02544934c93..0c2ea54ba0a0 100644
--- a/include/hw/ppc/spapr_irq.h
+++ b/include/hw/ppc/spapr_irq.h
@@ -21,6 +21,8 @@ 
 #define SPAPR_IRQ_MSI        0x1300  /* Offset of the dynamic range covered
                                       * by the bitmap allocator */
 
+typedef struct sPAPRMachineState sPAPRMachineState;
+
 void spapr_irq_msi_init(sPAPRMachineState *spapr, uint32_t nr_msis);
 int spapr_irq_msi_alloc(sPAPRMachineState *spapr, uint32_t num, bool align,
                         Error **errp);
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index fb3ba90eaefa..73f7342edb82 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -54,7 +54,6 @@ 
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_vio.h"
 #include "hw/pci-host/spapr.h"
-#include "hw/ppc/xics.h"
 #include "hw/pci/msi.h"
 
 #include "hw/pci/pci.h"
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 56fe403fc540..aedb15dd2083 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -11,6 +11,7 @@ 
 #include "hw/ppc/spapr_cpu_core.h"
 #include "target/ppc/cpu.h"
 #include "hw/ppc/spapr.h"
+#include "hw/ppc/xics.h" /* for icp_create() - to be removed */
 #include "hw/boards.h"
 #include "qapi/error.h"
 #include "sysemu/cpus.h"
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 2ecee3e8d0ed..b8a80bcc91ca 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -37,7 +37,6 @@ 
 
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_vio.h"
-#include "hw/ppc/xics.h"
 #include "hw/ppc/fdt.h"
 #include "trace.h"