The branch main has been updated by andrew:

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

commit ae60314c9467012abb23cf22249c6522d2ca1d91
Author:     Andrew Turner <[email protected]>
AuthorDate: 2023-03-06 09:54:57 +0000
Commit:     Andrew Turner <[email protected]>
CommitDate: 2023-03-14 10:37:00 +0000

    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 d07965433919..3d6519f5fedd 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;
                        }

Reply via email to