[PATCH v3 5/7] kexec_elf: remove elf_addr_to_cpu macro

Michael Ellerman mpe at ellerman.id.au
Fri Jul 19 07:06:21 PDT 2019

Sven Schnelle <svens at stackframe.org> writes:
> Hi Michael,
> On Thu, Jul 11, 2019 at 09:08:51PM +1000, Michael Ellerman wrote:
>> Sven Schnelle <svens at stackframe.org> writes:
>> > On Wed, Jul 10, 2019 at 05:09:29PM +0200, Christophe Leroy wrote:
>> >> Le 10/07/2019 à 16:29, Sven Schnelle a écrit :
>> >> > It had only one definition, so just use the function directly.
>> >> 
>> >> It had only one definition because it was for ppc64 only.
>> >> But as far as I understand (at least from the name of the new file), you
>> >> want it to be generic, don't you ? Therefore I get on 32 bits it would be
>> >> elf32_to_cpu().
>> >
>> > That brings up the question whether we need those endianess conversions. I would
>> > assume that the ELF file has always the same endianess as the running kernel. So
>> > i think we could just drop them. What do you think?
>> We should be able to kexec from big to little endian or vice versa, so
>> they are necessary.
> I'll update the patch to check for a needed 32/64 bit conversion during runtime,
> so we can also kexec from 32 to 64 bit kernels and vice versa. Don't know
> whether that's possible on powerpc, but at least on parisc it is.

On some of the Freescale (NXP) machines that should actually be
possible, the hardware can run a 64 or 32-bit kernel, but I'm not sure
if anyone has actually tested kexec'ing from one to the other.


More information about the kexec mailing list