Skip to contentSkip to conversation

resource: include region name in conflict's debug output

PATCH Applied Ahmad Fatoum 2 participants 2 messages Mar 8, 2021 – Mar 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 resource: include region name in conflict's debug output

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.

---
 common/resource.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
common/resource.c +4 -2
index 92fe96252fdc..ff4318a0d77f 100644
@@ -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);
 	}
 
Signature · 7 lines
2.29.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 10 lines · Ahmad Fatoum

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.

---
 common/resource.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

Quoted 31 lines
common/resource.c +4 -2
index 92fe96252fdc..ff4318a0d77f 100644
@@ -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);
 	}
 
Signature · 7 lines
2.29.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox