[PATCH v2 10/10] commands: iomem: point out [R]eserved regions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that we define IORESOURCE_BUSY as meaning that a region possibly
contains secure firmware, it's useful to have this information in the
iomem output as well, so add it.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 commands/iomemport.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/commands/iomemport.c b/commands/iomemport.c
index d0cfc413c262..f2baa0e29397 100644
--- a/commands/iomemport.c
+++ b/commands/iomemport.c
@@ -16,11 +16,14 @@ static void __print_resources(struct resource *res, int indent)
 	for (i = 0; i < indent; i++)
 		printf("  ");
 
-	printf("%pa - %pa (size %pa) %s\n",
-			&res->start, &res->end, &size, res->name);
+	printf("%pa - %pa (size %pa) %s%s\n",
+			&res->start, &res->end, &size,
+			res->flags & IORESOURCE_BUSY ? "[R] " : "",
+			res->name);
 
-	list_for_each_entry(r, &res->children, sibling)
+	list_for_each_entry(r, &res->children, sibling) {
 		__print_resources(r, indent + 1);
+	}
 }
 
 static void print_resources(struct resource *res)
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux