@@ -79,6 +79,7 @@ bool xive2_cap_phb_pq_disable(void);
bool xive2_cap_phb_abt(void);
bool xive2_cap_store_eoi(void);
int64_t xive2_reset(void);
+uint32_t xive2_get_phandle(void);
uint32_t xive2_alloc_hw_irqs(uint32_t chip_id, uint32_t count, uint32_t align);
uint32_t xive2_alloc_ipi_irqs(uint32_t chip_id, uint32_t count, uint32_t align);
@@ -18,6 +18,7 @@
#include <timer.h>
#include <sbe-p8.h>
#include <sbe-p9.h>
+#include <xive.h>
/* ICP registers */
#define ICP_XIRR 0x4 /* 32-bit access */
@@ -157,9 +158,14 @@ uint32_t get_psi_interrupt(uint32_t chip_id)
struct dt_node *add_ics_node(void)
{
- struct dt_node *ics = dt_new_addr(dt_root, "interrupt-controller", 0);
+ struct dt_node *ics;
bool has_xive;
+ bool has_xive_only = proc_gen >= proc_gen_p10;
+ if (has_xive_only)
+ return NULL;
+
+ ics = dt_new_addr(dt_root, "interrupt-controller", 0);
if (!ics)
return NULL;
@@ -181,6 +187,10 @@ struct dt_node *add_ics_node(void)
uint32_t get_ics_phandle(void)
{
struct dt_node *i;
+ bool has_xive_only = proc_gen >= proc_gen_p10;
+
+ if (has_xive_only)
+ return xive2_get_phandle();
for (i = dt_first(dt_root); i; i = dt_next(dt_root, i)) {
if (streq(i->name, "interrupt-controller@0")) {
@@ -1975,6 +1975,11 @@ static void xive_create_mmio_dt_node(struct xive *x)
}
+uint32_t xive2_get_phandle(void)
+{
+ return xive_dt_node->phandle;
+}
+
static void xive_setup_forward_ports(struct xive *x, struct proc_chip *remote_chip)
{
struct xive *remote_xive = remote_chip->xive;
We only support the XIVE interface. Signed-off-by: Cédric Le Goater <clg@kaod.org> --- include/xive.h | 1 + core/interrupts.c | 12 +++++++++++- hw/xive2.c | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-)