[PATCH v3 2/7] kexec_file: print out debugging message if required
Baoquan He
bhe at redhat.com
Mon Dec 4 00:43:05 PST 2023
On 11/29/23 at 06:52pm, Joe Perches wrote:
> On Thu, 2023-11-30 at 10:39 +0800, Baoquan He wrote:
> > Replace pr_debug() with the newly added kexec_dprintk() in kexec_file
> > loading related codes.
>
> trivia:
>
> > diff --git a/kernel/crash_core.c b/kernel/crash_core.c
> []
> > @@ -551,9 +551,12 @@ int crash_prepare_elf64_headers(struct crash_mem *mem, int need_kernel_map,
> > phdr->p_filesz = phdr->p_memsz = mend - mstart + 1;
> > phdr->p_align = 0;
> > ehdr->e_phnum++;
> > - pr_debug("Crash PT_LOAD ELF header. phdr=%p vaddr=0x%llx, paddr=0x%llx, sz=0x%llx e_phnum=%d p_offset=0x%llx\n",
> > - phdr, phdr->p_vaddr, phdr->p_paddr, phdr->p_filesz,
> > - ehdr->e_phnum, phdr->p_offset);
> > +#ifdef CONFIG_KEXEC_FILE
> > + kexec_dprintk("Crash PT_LOAD ELF header. phdr=%p vaddr=0x%llx, paddr=0x%llx, "
> > + "sz=0x%llx e_phnum=%d p_offset=0x%llx\n",
> > + phdr, phdr->p_vaddr, phdr->p_paddr, phdr->p_filesz,
> > + ehdr->e_phnum, phdr->p_offset);
> > +#endif
>
> Perhaps run checkpatch and coalesce the format string.
Sorry for being late to reply, this comment was missed.
I broke it into two because it's a too long line and not friendly for
reading. I did notice there's such line breaking code. I can change it
if it's not suggested. Thanks for careful checking.
More information about the linux-arm-kernel
mailing list