Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 2024 17:43:46 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ccb1b43e20f5 - main - powerpc psim: Fix infinite recursion in bus_adjust_resource method
Message-ID:  <202402161743.41GHhkRZ006136@gitrepo.freebsd.org>

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

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

commit ccb1b43e20f5a1a0795b14f3ef39d5c2e15b424d
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-02-16 17:42:30 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-02-16 17:42:30 +0000

    powerpc psim: Fix infinite recursion in bus_adjust_resource method
    
    The default case needs to call bus_generic_adjust_resource to pass the
    request up the tree, not bus_adjust_resource which will just call this
    method again.
    
    Fixes:          d7c16b333455 powerpc psim: Use bus_generic_rman_*
---
 sys/powerpc/psim/iobus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/powerpc/psim/iobus.c b/sys/powerpc/psim/iobus.c
index 497ef42d82e6..c572a1fdc12b 100644
--- a/sys/powerpc/psim/iobus.c
+++ b/sys/powerpc/psim/iobus.c
@@ -352,7 +352,8 @@ iobus_adjust_resource(device_t bus, device_t child, int type,
 		return (bus_generic_rman_adjust_resource(bus, child, type, r,
 		    start, end));
 	case SYS_RES_IRQ:
-		return (bus_adjust_resource(bus, type, r, start, end));
+		return (bus_generic_adjust_resource(bus, child, type, r, start,
+		    end));
 	default:
 		return (EINVAL);
 	}



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