From ae60314c9467012abb23cf22249c6522d2ca1d91 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 6 Mar 2023 09:54:57 +0000 Subject: [PATCH] Fix the ofw parent check in arm64 nexus OF_parent returns 0 for no parent. Fix the check in teh arm64 nexus_fdt_activate_resource. Sponsored by: Arm Ltd --- sys/arm64/arm64/nexus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index d0796543391..3d6519f5fed 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -565,7 +565,7 @@ nexus_fdt_activate_resource(device_t bus, device_t child, int type, int rid, node = ofw_bus_get_node(child); if (node != -1) { parent = OF_parent(node); - if (parent != -1 && + if (parent != 0 && OF_hasprop(parent, "nonposted-mmio")) { flags |= BUS_SPACE_MAP_NONPOSTED; }