On Mon, 19 Feb 2018, James Hogan wrote: > > KEXEC assume kernel align to PAGE_SIZE, and 64KB is the largest > > PAGE_SIZE. > > Please expand, maybe referring to sanity_check_segment_list() which does > the actual check. Maybe something like this: > > Kexec needs the new kernel's load address to be aligned on a page > boundary (see sanity_check_segment_list()), but on MIPS the default > vmlinuz load address is only explicitly aligned to 16 bytes. > > Since the largest PAGE_SIZE supported by MIPS kernels is 64KB, increase > the alignment calculated by calc_vmlinuz_load_addr to 64KB. But why does it have to be hardcoded? Shouldn't it be inherited from the image being loaded? I'm missing bits of context here, but that would be either CONFIG_PAGE_SIZE_* settings or the ELF program header's `p_align' value, depending on how this code operates. Wasting say 60kB of memory on smaller systems due to excessive alignment might not be a good idea. Maciej