diff options
Diffstat (limited to 'arch/powerpc/kernel/fadump.c')
| -rw-r--r-- | arch/powerpc/kernel/fadump.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 7213d930918d..742694c1d852 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c | |||
| @@ -69,7 +69,7 @@ int __init early_init_dt_scan_fw_dump(unsigned long node, | |||
| 69 | */ | 69 | */ |
| 70 | token = of_get_flat_dt_prop(node, "ibm,configure-kernel-dump", NULL); | 70 | token = of_get_flat_dt_prop(node, "ibm,configure-kernel-dump", NULL); |
| 71 | if (!token) | 71 | if (!token) |
| 72 | return 0; | 72 | return 1; |
| 73 | 73 | ||
| 74 | fw_dump.fadump_supported = 1; | 74 | fw_dump.fadump_supported = 1; |
| 75 | fw_dump.ibm_configure_kernel_dump = *token; | 75 | fw_dump.ibm_configure_kernel_dump = *token; |
| @@ -92,7 +92,7 @@ int __init early_init_dt_scan_fw_dump(unsigned long node, | |||
| 92 | &size); | 92 | &size); |
| 93 | 93 | ||
| 94 | if (!sections) | 94 | if (!sections) |
| 95 | return 0; | 95 | return 1; |
| 96 | 96 | ||
| 97 | num_sections = size / (3 * sizeof(u32)); | 97 | num_sections = size / (3 * sizeof(u32)); |
| 98 | 98 | ||
| @@ -110,6 +110,7 @@ int __init early_init_dt_scan_fw_dump(unsigned long node, | |||
| 110 | break; | 110 | break; |
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | |||
| 113 | return 1; | 114 | return 1; |
| 114 | } | 115 | } |
| 115 | 116 | ||
| @@ -645,7 +646,7 @@ static int __init fadump_build_cpu_notes(const struct fadump_mem_struct *fdm) | |||
| 645 | } | 646 | } |
| 646 | /* Lower 4 bytes of reg_value contains logical cpu id */ | 647 | /* Lower 4 bytes of reg_value contains logical cpu id */ |
| 647 | cpu = reg_entry->reg_value & FADUMP_CPU_ID_MASK; | 648 | cpu = reg_entry->reg_value & FADUMP_CPU_ID_MASK; |
| 648 | if (!cpumask_test_cpu(cpu, &fdh->cpu_online_mask)) { | 649 | if (fdh && !cpumask_test_cpu(cpu, &fdh->cpu_online_mask)) { |
| 649 | SKIP_TO_NEXT_CPU(reg_entry); | 650 | SKIP_TO_NEXT_CPU(reg_entry); |
| 650 | continue; | 651 | continue; |
| 651 | } | 652 | } |
| @@ -662,9 +663,11 @@ static int __init fadump_build_cpu_notes(const struct fadump_mem_struct *fdm) | |||
| 662 | } | 663 | } |
| 663 | fadump_final_note(note_buf); | 664 | fadump_final_note(note_buf); |
| 664 | 665 | ||
| 665 | pr_debug("Updating elfcore header (%llx) with cpu notes\n", | 666 | if (fdh) { |
| 667 | pr_debug("Updating elfcore header (%llx) with cpu notes\n", | ||
| 666 | fdh->elfcorehdr_addr); | 668 | fdh->elfcorehdr_addr); |
| 667 | fadump_update_elfcore_header((char *)__va(fdh->elfcorehdr_addr)); | 669 | fadump_update_elfcore_header((char *)__va(fdh->elfcorehdr_addr)); |
| 670 | } | ||
| 668 | return 0; | 671 | return 0; |
| 669 | 672 | ||
| 670 | error_out: | 673 | error_out: |
