Skip to content

Commit bc7acc0

Browse files
SiFiveHollandrobherring
authored andcommitted
of: property: fw_devlink: Do not use interrupt-parent directly
commit 7f00be9 ("of: property: Add device link support for interrupt-parent, dmas and -gpio(s)") started adding device links for the interrupt-parent property. commit 4104ca7 ("of: property: Add fw_devlink support for interrupts") and commit f265f06 ("of: property: Fix fw_devlink handling of interrupts/interrupts-extended") later added full support for parsing the interrupts and interrupts-extended properties, which includes looking up the node of the parent domain. This made the handler for the interrupt-parent property redundant. In fact, creating device links based solely on interrupt-parent is problematic, because it can create spurious cycles. A node may have this property without itself being an interrupt controller or consumer. For example, this property is often present in the root node or a /soc bus node to set the default interrupt parent for child nodes. However, it is incorrect for the bus to depend on the interrupt controller, as some of the bus's children may not be interrupt consumers at all or may have a different interrupt parent. Resolving these spurious dependency cycles can cause an incorrect probe order for interrupt controller drivers. This was observed on a RISC-V system with both an APLIC and IMSIC under /soc, where interrupt-parent in /soc points to the APLIC, and the APLIC msi-parent points to the IMSIC. fw_devlink found three dependency cycles and attempted to probe the APLIC before the IMSIC. After applying this patch, there were no dependency cycles and the probe order was correct. Acked-by: Marc Zyngier <maz@kernel.org> Cc: stable@vger.kernel.org Fixes: 4104ca7 ("of: property: Add fw_devlink support for interrupts") Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Link: https://lore.kernel.org/r/20241120233124.3649382-1-samuel.holland@sifive.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
1 parent 28b513b commit bc7acc0

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/of/property.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,6 @@ DEFINE_SIMPLE_PROP(iommus, "iommus", "#iommu-cells")
12861286
DEFINE_SIMPLE_PROP(mboxes, "mboxes", "#mbox-cells")
12871287
DEFINE_SIMPLE_PROP(io_channels, "io-channels", "#io-channel-cells")
12881288
DEFINE_SIMPLE_PROP(io_backends, "io-backends", "#io-backend-cells")
1289-
DEFINE_SIMPLE_PROP(interrupt_parent, "interrupt-parent", NULL)
12901289
DEFINE_SIMPLE_PROP(dmas, "dmas", "#dma-cells")
12911290
DEFINE_SIMPLE_PROP(power_domains, "power-domains", "#power-domain-cells")
12921291
DEFINE_SIMPLE_PROP(hwlocks, "hwlocks", "#hwlock-cells")
@@ -1432,7 +1431,6 @@ static const struct supplier_bindings of_supplier_bindings[] = {
14321431
{ .parse_prop = parse_mboxes, },
14331432
{ .parse_prop = parse_io_channels, },
14341433
{ .parse_prop = parse_io_backends, },
1435-
{ .parse_prop = parse_interrupt_parent, },
14361434
{ .parse_prop = parse_dmas, .optional = true, },
14371435
{ .parse_prop = parse_power_domains, },
14381436
{ .parse_prop = parse_hwlocks, },

0 commit comments

Comments
 (0)