[PATCH] resource: include region name in conflict's debug output

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Mar 8 15:19:08 GMT 2021


The iomem command does print names, but it won't list dynamically
allocated and deallocated regions, like those requested during bootm.

Include region name in conflict debug output to make them easier
to debug.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 common/resource.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/resource.c b/common/resource.c
index 92fe96252fdc..ff4318a0d77f 100644
--- a/common/resource.c
+++ b/common/resource.c
@@ -61,12 +61,14 @@ struct resource *__request_region(struct resource *parent,
 			goto ok;
 		if (start > r->end)
 			continue;
-		debug("%s: 0x%08llx:0x%08llx conflicts with 0x%08llx:0x%08llx\n",
+		debug("%s: 0x%08llx:0x%08llx (%s) conflicts with 0x%08llx:0x%08llx (%s)\n",
 				__func__,
 				(unsigned long long)start,
 				(unsigned long long)end,
+				name,
 				(unsigned long long)r->start,
-				(unsigned long long)r->end);
+				(unsigned long long)r->end,
+				r->name);
 		return ERR_PTR(-EBUSY);
 	}
 
-- 
2.29.2




More information about the barebox mailing list