summaryrefslogtreecommitdiff
path: root/kexec/arch/mips/crashdump-mips.c
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2012-03-08 14:39:41 +0800
committerSimon Horman <horms@verge.net.au>2012-03-29 08:30:57 +0900
commitc53e30cabeea4335e0b5ac22cf7cac500abd42a0 (patch)
treef5b99cb42ecb866027e179dea5f114504b503ae1 /kexec/arch/mips/crashdump-mips.c
parent8052ed01522aedef2507ec9dceaf8dfe89134d1d (diff)
mips: move DEBUG code to --debug
Like patch 1/5, this one moves code under #if DEBUG to --debug on mips arch. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/mips/crashdump-mips.c')
-rw-r--r--kexec/arch/mips/crashdump-mips.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/kexec/arch/mips/crashdump-mips.c b/kexec/arch/mips/crashdump-mips.c
index e90b362..f988698 100644
--- a/kexec/arch/mips/crashdump-mips.c
+++ b/kexec/arch/mips/crashdump-mips.c
@@ -60,9 +60,7 @@ static int get_kernel_paddr(struct crash_elf_info *elf_info)
if (parse_iomem_single("Kernel code\n", &start, NULL) == 0) {
elf_info->kern_paddr_start = start;
-#ifdef DEBUG
- printf("kernel load physical addr start = 0x%lx\n", start);
-#endif
+ dbgprintf("kernel load physical addr start = 0x%lx\n", start);
return 0;
}
@@ -82,12 +80,10 @@ static int get_kernel_vaddr_and_size(struct crash_elf_info *elf_info,
start_offset;
if (parse_iomem_single("Kernel data\n", NULL, &end) == 0) {
elf_info->kern_size = end - elf_info->kern_paddr_start;
-#ifdef DEBUG
- printf("kernel_vaddr= 0x%llx paddr %llx\n",
+ dbgprintf("kernel_vaddr= 0x%llx paddr %llx\n",
elf_info->kern_vaddr_start,
elf_info->kern_paddr_start);
- printf("kernel size = 0x%llx\n", elf_info->kern_size);
-#endif
+ dbgprintf("kernel size = 0x%llx\n", elf_info->kern_size);
return 0;
}
fprintf(stderr, "Cannot determine kernel virtual load addr and size\n");
@@ -400,11 +396,9 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
cmdline_add_savemaxmem(mod_cmdline, saved_max_mem);
-#ifdef DEBUG
- printf("CRASH MEMORY RANGES:\n");
- printf("%016Lx-%016Lx\n", crash_reserved_mem.start,
+ dbgprintf("CRASH MEMORY RANGES:\n");
+ dbgprintf("%016Lx-%016Lx\n", crash_reserved_mem.start,
crash_reserved_mem.end);
-#endif
return 0;
}