aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2014-09-22 10:33:42 -0700
committerGeoff Levand <geoff@infradead.org>2014-09-22 10:33:42 -0700
commitc9dd012ce614217eda67cfc4bef7564576960046 (patch)
treebef7c68fba68706a36f8b7267643565bc9a1efeb
parentb72c22634647c9d2fded3d51c1f150a7d920fc0c (diff)
downloadlinux-kexec-kexec-spin-table.tar.gz
debugging: dump kimage listkexec-spin-table
-rw-r--r--kernel/kexec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 2bee072268d94..87722d3924e9c 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -45,6 +45,8 @@
#include <crypto/hash.h>
#include <crypto/sha.h>
+static const int dump_list = 0;
+
/* Per cpu memory for storing cpu states in case of system crash. */
note_buf_t __percpu *crash_notes;
@@ -841,6 +843,7 @@ static int kimage_add_entry(struct kimage *image, kimage_entry_t entry)
image->entry = ind_page;
image->last_entry = ind_page +
((PAGE_SIZE/sizeof(kimage_entry_t)) - 1);
+ if (dump_list) printk(" I: %010lx (%p)\n", (unsigned long)virt_to_phys(ind_page), ind_page);
}
*image->entry = entry;
image->entry++;
@@ -856,6 +859,7 @@ static int kimage_set_destination(struct kimage *image,
destination &= PAGE_MASK;
result = kimage_add_entry(image, destination | IND_DESTINATION);
+ if (dump_list) printk(" D: %010lx (%p)\n", destination, phys_to_virt(destination));
if (result == 0)
image->destination = destination;
@@ -869,6 +873,7 @@ static int kimage_add_page(struct kimage *image, unsigned long page)
page &= PAGE_MASK;
result = kimage_add_entry(image, page | IND_SOURCE);
+ if (dump_list) printk(" S: %010lx (%p)\n", page, phys_to_virt(page));
if (result == 0)
image->destination += PAGE_SIZE;