On Tue, 20 Feb 2018, James Hogan wrote: > > > 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. > > I presume there's nothing to stop a kernel with 64KB pages (and hence > requiring 64KB alignment of load sections) loading a new kernel with 4KB > pages (which is the one we're looking at). As I say, I'm missing bits of context. If you say that a 64kiB-page kernel loads a 4kiB-page kernel, then the alignment for the latter is obviously 4kiB. So I repeat my question: why hardcode the alignment to 64kiB while we only need 4kiB in this case? Maciej