On Thu, Oct 31, 2013 at 01:38:56PM -0500, Tom wrote: > From: Tom Musta <tommu...@gmail.com> > > This patch modifies the endian chicken switch in the single step
"Chicken switch" is IBM jargon, perhaps best avoided where possible in commit messages. > emulation code (emulate_step()). The old (big endian) code bailed > early if a load or store instruction was to be emulated in little > endian mode. > > The new code modifies the check and only bails in a cross-endian > situation (LE mode in a kernel compiled for BE and vice verse). The patch adds #ifdefs inside code, which is generally frowned upon in kernel code as it can make the code flow harder to see. Perhaps you could do something like if ((regs->msr & MSR_LE) != (MSR_KERNEL & MSR_LE)) as an alternative that wouldn't require an #ifdef. Or, define a symbol that is 0 in a BE kernel and MSR_LE in a LE kernel, and compare to that. Paul. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev