summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2012-03-08 14:39:40 +0800
committerSimon Horman <horms@verge.net.au>2012-03-29 08:30:56 +0900
commit8052ed01522aedef2507ec9dceaf8dfe89134d1d (patch)
tree65358e4c5850ecd78783291c25380bf7c4700db5
parent28d4ab53280853d2aeefdfb7c369331e89ab9ac2 (diff)
downloadkexec-tools-8052ed01522aedef2507ec9dceaf8dfe89134d1d.tar.gz
arm: move DEBUG code to --debug
Like patch 1/5, this one moves code under #if DEBUG to --debug on arm arch. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/arm/crashdump-arm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
index e9b22bf2..213dae29 100644
--- a/kexec/arch/arm/crashdump-arm.c
+++ b/kexec/arch/arm/crashdump-arm.c
@@ -219,7 +219,6 @@ static void cmdline_add_mem(char *cmdline, unsigned long size)
cmdline[COMMAND_LINE_SIZE - 1] = '\0';
}
-#ifdef DEBUG
static unsigned long long range_size(const struct memory_range *r)
{
return r->end - r->start + 1;
@@ -229,6 +228,9 @@ static void dump_memory_ranges(void)
{
int i;
+ if (!kexec_debug)
+ return;
+
dbgprintf("crashkernel: [%#llx - %#llx] (%ldM)\n",
crash_reserved_mem.start, crash_reserved_mem.end,
(unsigned long)range_size(&crash_reserved_mem) >> 20);
@@ -239,9 +241,6 @@ static void dump_memory_ranges(void)
r->start, r->end, (unsigned long)range_size(r) >> 20);
}
}
-#else
-static inline void dump_memory_ranges(void) {}
-#endif
/**
* load_crashdump_segments() - loads additional segments needed for kdump