Commit 9dfe4b14 authored by Cédric Le Goater's avatar Cédric Le Goater Committed by Michael Ellerman

powerpc/xive: Add a name to the IRQ domain

We hope one day to handle multiple irq_domain in the XIVE driver.
Start simple by setting the name using the DT node.
Signed-off-by: default avatarCédric Le Goater <clg@kaod.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201210171450.1933725-6-clg@kaod.org
parent e2cf43d5
...@@ -1310,9 +1310,9 @@ static const struct irq_domain_ops xive_irq_domain_ops = { ...@@ -1310,9 +1310,9 @@ static const struct irq_domain_ops xive_irq_domain_ops = {
.xlate = xive_irq_domain_xlate, .xlate = xive_irq_domain_xlate,
}; };
static void __init xive_init_host(void) static void __init xive_init_host(struct device_node *np)
{ {
xive_irq_domain = irq_domain_add_nomap(NULL, XIVE_MAX_IRQ, xive_irq_domain = irq_domain_add_nomap(np, XIVE_MAX_IRQ,
&xive_irq_domain_ops, NULL); &xive_irq_domain_ops, NULL);
if (WARN_ON(xive_irq_domain == NULL)) if (WARN_ON(xive_irq_domain == NULL))
return; return;
...@@ -1513,8 +1513,8 @@ void xive_shutdown(void) ...@@ -1513,8 +1513,8 @@ void xive_shutdown(void)
xive_ops->shutdown(); xive_ops->shutdown();
} }
bool __init xive_core_init(const struct xive_ops *ops, void __iomem *area, u32 offset, bool __init xive_core_init(struct device_node *np, const struct xive_ops *ops,
u8 max_prio) void __iomem *area, u32 offset, u8 max_prio)
{ {
xive_tima = area; xive_tima = area;
xive_tima_offset = offset; xive_tima_offset = offset;
...@@ -1525,7 +1525,7 @@ bool __init xive_core_init(const struct xive_ops *ops, void __iomem *area, u32 o ...@@ -1525,7 +1525,7 @@ bool __init xive_core_init(const struct xive_ops *ops, void __iomem *area, u32 o
__xive_enabled = true; __xive_enabled = true;
pr_devel("Initializing host..\n"); pr_devel("Initializing host..\n");
xive_init_host(); xive_init_host(np);
pr_devel("Initializing boot CPU..\n"); pr_devel("Initializing boot CPU..\n");
......
...@@ -622,7 +622,7 @@ bool __init xive_native_init(void) ...@@ -622,7 +622,7 @@ bool __init xive_native_init(void)
xive_native_setup_pools(); xive_native_setup_pools();
/* Initialize XIVE core with our backend */ /* Initialize XIVE core with our backend */
if (!xive_core_init(&xive_native_ops, tima, TM_QW3_HV_PHYS, if (!xive_core_init(np, &xive_native_ops, tima, TM_QW3_HV_PHYS,
max_prio)) { max_prio)) {
opal_xive_reset(OPAL_XIVE_MODE_EMU); opal_xive_reset(OPAL_XIVE_MODE_EMU);
return false; return false;
......
...@@ -857,7 +857,7 @@ bool __init xive_spapr_init(void) ...@@ -857,7 +857,7 @@ bool __init xive_spapr_init(void)
} }
/* Initialize XIVE core with our backend */ /* Initialize XIVE core with our backend */
if (!xive_core_init(&xive_spapr_ops, tima, TM_QW1_OS, max_prio)) if (!xive_core_init(np, &xive_spapr_ops, tima, TM_QW1_OS, max_prio))
return false; return false;
pr_info("Using %dkB queues\n", 1 << (xive_queue_shift - 10)); pr_info("Using %dkB queues\n", 1 << (xive_queue_shift - 10));
......
...@@ -63,8 +63,8 @@ struct xive_ops { ...@@ -63,8 +63,8 @@ struct xive_ops {
const char *name; const char *name;
}; };
bool xive_core_init(const struct xive_ops *ops, void __iomem *area, u32 offset, bool xive_core_init(struct device_node *np, const struct xive_ops *ops,
u8 max_prio); void __iomem *area, u32 offset, u8 max_prio);
__be32 *xive_queue_page_alloc(unsigned int cpu, u32 queue_shift); __be32 *xive_queue_page_alloc(unsigned int cpu, u32 queue_shift);
int xive_core_debug_init(void); int xive_core_debug_init(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment