git: f980f48f1369 - main - Revert "new-bus: Disable assertions for rman mismatches for activate/deactivate"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Mar 2024 20:19:31 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=f980f48f1369cda3f1f5e84e54e45b738bf0dd0b
commit f980f48f1369cda3f1f5e84e54e45b738bf0dd0b
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-03-13 20:19:10 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-03-13 20:19:10 +0000
Revert "new-bus: Disable assertions for rman mismatches for activate/deactivate"
With recent fixes to the ACPI and pcib drivers to translate mapping
requests of child resources into mappings of sub-ranges of parent
resources these assertions should now be true.
This reverts commit ed88eef140a1c3d57d546f409c216806dd3da809.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D43691
---
sys/kern/subr_bus.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index c06f3df0c9c9..a485e6dd2641 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -4322,12 +4322,12 @@ bus_generic_rman_activate_resource(device_t dev, device_t child, int type,
int rid, struct resource *r)
{
struct resource_map map;
-#ifdef INVARIANTS_XXX
+#ifdef INVARIANTS
struct rman *rm;
#endif
int error;
-#ifdef INVARIANTS_XXX
+#ifdef INVARIANTS
rm = BUS_GET_RMAN(dev, type, rman_get_flags(r));
KASSERT(rman_is_region_manager(r, rm),
("%s: rman %p doesn't match for resource %p", __func__, rm, r));
@@ -4361,12 +4361,12 @@ bus_generic_rman_deactivate_resource(device_t dev, device_t child, int type,
int rid, struct resource *r)
{
struct resource_map map;
-#ifdef INVARIANTS_XXX
+#ifdef INVARIANTS
struct rman *rm;
#endif
int error;
-#ifdef INVARIANTS_XXX
+#ifdef INVARIANTS
rm = BUS_GET_RMAN(dev, type, rman_get_flags(r));
KASSERT(rman_is_region_manager(r, rm),
("%s: rman %p doesn't match for resource %p", __func__, rm, r));