git: 61d9bd21e9d6 - main - powerpc psim: Fix infinite recursion in multiple bus methods
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 17 Feb 2024 07:19:37 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=61d9bd21e9d6c3f876c4c8549fafaaaa4de75983
commit 61d9bd21e9d6c3f876c4c8549fafaaaa4de75983
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-02-17 07:17:42 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-02-17 07:19:06 +0000
powerpc psim: Fix infinite recursion in multiple bus methods
Similar to 68a3ff041129208ea98a3bd5142061176ab4165e, the default case
needs to call bus_generic_* to pass the request up the tree, not bus_*
which will just call this method again.
Fixes: d7c16b333455 powerpc psim: Use bus_generic_rman_*
---
sys/powerpc/psim/iobus.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/powerpc/psim/iobus.c b/sys/powerpc/psim/iobus.c
index c572a1fdc12b..eea0255aa21c 100644
--- a/sys/powerpc/psim/iobus.c
+++ b/sys/powerpc/psim/iobus.c
@@ -370,7 +370,7 @@ iobus_release_resource(device_t bus, device_t child, int type, int rid,
return (bus_generic_rman_release_resource(bus, child, type, rid,
res));
case SYS_RES_IRQ:
- return (bus_release_resource(bus, type, rid, res));
+ return (bus_generic_release_resource(bus, child, type, rid, res));
default:
return (EINVAL);
}
@@ -383,7 +383,7 @@ iobus_activate_resource(device_t bus, device_t child, int type, int rid,
switch (type) {
case SYS_RES_IRQ:
- return (bus_activate_resource(bus, type, rid, res));
+ return (bus_generic_activate_resource(bus, child, type, rid, res));
case SYS_RES_IOPORT:
case SYS_RES_MEMORY:
return (bus_generic_rman_activate_resource(bus, child, type,
@@ -400,7 +400,7 @@ iobus_deactivate_resource(device_t bus, device_t child, int type, int rid,
switch (type) {
case SYS_RES_IRQ:
- return (bus_deactivate_resource(bus, type, rid, res));
+ return (bus_generic_deactivate_resource(bus, child, type, rid, res));
case SYS_RES_IOPORT:
case SYS_RES_MEMORY:
return (bus_generic_rman_deactivate_resource(bus, child, type,