[Skiboot] [PATCH 01/10] mem-region: Change aborts to asserts

Ananth N Mavinakayanahalli ananth at in.ibm.com
Wed Feb 11 02:14:50 AEDT 2015


... so we get good debug data on TI.

Signed-off-by: Ananth N Mavinakayanahalli <ananth at in.ibm.com>
---
 core/mem_region.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/mem_region.c b/core/mem_region.c
index 5a496aa..8d4e0f6 100644
--- a/core/mem_region.c
+++ b/core/mem_region.c
@@ -235,7 +235,7 @@ static void bad_header(const struct mem_region *region,
 	else
 		prerror("%p (in %s) %s at %s, previously %p\n",
 			hdr-1, region->name, during, location, hdr->location);
-	abort();
+	assert(false);
 }
 
 static bool region_is_reserved(struct mem_region *region)
@@ -765,7 +765,7 @@ void mem_region_init(void)
 		region = new_region(rname, start, len, i, REGION_SKIBOOT_HEAP);
 		if (!region) {
 			prerror("MEM: Could not add mem region %s!\n", i->name);
-			abort();
+			assert(region);
 		}
 		list_add(&regions, &region->list);
 		if ((start + len) > top_of_ram)
@@ -785,7 +785,7 @@ void mem_region_init(void)
 	    !add_region(&skiboot_after_heap) ||
 	    !add_region(&skiboot_cpu_stacks)) {
 		prerror("Out of memory adding skiboot reserved areas\n");
-		abort();
+		assert(false);
 	}
 
 	/* Add reserved ranges from the DT */
@@ -816,7 +816,7 @@ void mem_region_init(void)
 		prerror("Invalid properties: reserved-names=%p "
 				"with reserved-ranges=%p\n",
 				names, ranges);
-		abort();
+		assert(false);
 	}
 
 	unlock(&mem_region_lock);
@@ -893,7 +893,7 @@ void mem_region_release_unused(void)
 			if (!for_linux) {
 				prerror("OOM splitting mem node %s for linux\n",
 					r->name);
-				abort();
+				assert(for_linux);
 			}
 			list_add(&regions, &for_linux->list);
 		}



More information about the Skiboot mailing list