Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jul 2022 09:33:46 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 92f692fd249e - main - Only add gicv3 fdt children with a compatible property
Message-ID:  <202207070933.2679Xk3Z025868@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=92f692fd249e64ed4b25199310fafe41e2d9c74d

commit 92f692fd249e64ed4b25199310fafe41e2d9c74d
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-07-06 17:04:53 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-07-07 09:29:10 +0000

    Only add gicv3 fdt children with a compatible property
    
    Not all gicv3 fdt children have a compatible property. Those that don't
    are configuration data rather than something that should have a driver
    attach.
    
    Sponsored by:   The FreeBSD Foundation
---
 sys/arm64/arm64/gic_v3_fdt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sys/arm64/arm64/gic_v3_fdt.c b/sys/arm64/arm64/gic_v3_fdt.c
index 41c6297649fb..0478bdc2962f 100644
--- a/sys/arm64/arm64/gic_v3_fdt.c
+++ b/sys/arm64/arm64/gic_v3_fdt.c
@@ -299,6 +299,14 @@ gic_v3_ofw_bus_attach(device_t dev)
 		    sizeof(size_cells));
 		/* Iterate through all GIC subordinates */
 		for (node = OF_child(parent); node > 0; node = OF_peer(node)) {
+			/*
+			 * Ignore children that lack a compatible property.
+			 * Some of them may be for configuration, for example
+			 * ppi-partitions.
+			 */
+			if (!OF_hasprop(node, "compatible"))
+				continue;
+
 			/* Allocate and populate devinfo. */
 			di = malloc(sizeof(*di), M_GIC_V3, M_WAITOK | M_ZERO);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207070933.2679Xk3Z025868>