Skip to content

Commit 8e80a73

Browse files
legoatermpe
authored andcommitted
powerpc/xive: Change IRQ domain to a tree domain
Commit 4f86a06 ("irqdomain: Make normal and nomap irqdomains exclusive") introduced an IRQ_DOMAIN_FLAG_NO_MAP flag to isolate the 'nomap' domains still in use under the powerpc arch. With this new flag, the revmap_tree of the IRQ domain is not used anymore. This change broke the support of shared LSIs [1] in the XIVE driver because it was relying on a lookup in the revmap_tree to query previously mapped interrupts. Linux now creates two distinct IRQ mappings on the same HW IRQ which can lead to unexpected behavior in the drivers. The XIVE IRQ domain is not a direct mapping domain and its HW IRQ interrupt number space is rather large : 1M/socket on POWER9 and POWER10, change the XIVE driver to use a 'tree' domain type instead. [1] For instance, a linux KVM guest with virtio-rng and virtio-balloon devices. Fixes: 4f86a06 ("irqdomain: Make normal and nomap irqdomains exclusive") Cc: stable@vger.kernel.org # v5.14+ Signed-off-by: Cédric Le Goater <clg@kaod.org> Tested-by: Greg Kurz <groug@kaod.org> Acked-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211116134022.420412-1-clg@kaod.org
1 parent 1e35eba commit 8e80a73

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

arch/powerpc/sysdev/xive/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ config PPC_XIVE
33
bool
44
select PPC_SMP_MUXED_IPI
55
select HARDIRQS_SW_RESEND
6-
select IRQ_DOMAIN_NOMAP
76

87
config PPC_XIVE_NATIVE
98
bool

arch/powerpc/sysdev/xive/common.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,8 +1443,7 @@ static const struct irq_domain_ops xive_irq_domain_ops = {
14431443

14441444
static void __init xive_init_host(struct device_node *np)
14451445
{
1446-
xive_irq_domain = irq_domain_add_nomap(np, XIVE_MAX_IRQ,
1447-
&xive_irq_domain_ops, NULL);
1446+
xive_irq_domain = irq_domain_add_tree(np, &xive_irq_domain_ops, NULL);
14481447
if (WARN_ON(xive_irq_domain == NULL))
14491448
return;
14501449
irq_set_default_host(xive_irq_domain);

0 commit comments

Comments
 (0)