summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHan Pingtian <hanpt@linux.vnet.ibm.com>2012-04-13 17:32:42 +0800
committerSimon Horman <horms@verge.net.au>2012-04-16 09:07:41 +0900
commitf7b93e8d0ff5d9bb3d9581f7348218b1a94f9e5c (patch)
treebac4a6ec00fcc85e7ec097fc18e42850fd693c4e
parenta77ae20f1749878aa76d427868ca096c614d10a8 (diff)
downloadkexec-tools-f7b93e8d0ff5d9bb3d9581f7348218b1a94f9e5c.tar.gz
Add more debug infos when usable memory range changing
In the past, we did neglected some usable memory range changing infos. With those deubg code added, we can now catch them. Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/ppc64/crashdump-ppc64.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
index d52b4387..b5ec2c8f 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.c
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
@@ -465,12 +465,24 @@ void add_usable_mem_rgns(unsigned long long base, unsigned long long size)
if (base < ustart && end > uend) {
usablemem_rgns.ranges[i].start = base;
usablemem_rgns.ranges[i].end = end;
+#ifdef DEBUG
+ fprintf(stderr, "usable memory rgn %u: new base:%llx new size:%llx\n",
+ i, base, size);
+#endif
return;
} else if (base < ustart) {
usablemem_rgns.ranges[i].start = base;
+#ifdef DEBUG
+ fprintf(stderr, "usable memory rgn %u: new base:%llx new size:%llx",
+ i, base, usablemem_rgns.ranges[i].end - base);
+#endif
return;
} else if (end > uend){
usablemem_rgns.ranges[i].end = end;
+#ifdef DEBUG
+ fprintf(stderr, "usable memory rgn %u: new end:%llx, new size:%llx",
+ i, end, end - usablemem_rgns.ranges[i].start);
+#endif
return;
}
}