34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
|
These are experimental fixes for running 32-bit little endian binaries on
|
||
|
Linux/ppc64le. While this may seem pointless, it does work, does not break
|
||
|
anything, and may allow enablement of things we couldn't do before (e.g.
|
||
|
support for box86 and thus reasonably fast emulation of 32-bit x86 games).
|
||
|
|
||
|
The first part is a signal handler fix, the second part enables the 32-bit
|
||
|
VDSO by removing the ppc32/big endian restriction.
|
||
|
|
||
|
Source: @eerykitty
|
||
|
|
||
|
--- a/arch/powerpc/kernel/signal_32.c
|
||
|
+++ b/arch/powerpc/kernel/signal_32.c
|
||
|
@@ -1427,8 +1427,9 @@ int handle_signal32(struct ksignal *ksig, sigset_t *oldset,
|
||
|
regs->gpr[3] = ksig->sig;
|
||
|
regs->gpr[4] = (unsigned long) sc;
|
||
|
regs->nip = (unsigned long) (unsigned long)ksig->ka.sa.sa_handler;
|
||
|
- /* enter the signal handler in big-endian mode */
|
||
|
+ /* enter the signal handler in native-endian mode */
|
||
|
regs->msr &= ~MSR_LE;
|
||
|
+ regs->msr |= (MSR_KERNEL & MSR_LE);
|
||
|
return 0;
|
||
|
|
||
|
badframe:
|
||
|
--- a/arch/powerpc/platforms/Kconfig.cputype
|
||
|
+++ b/arch/powerpc/platforms/Kconfig.cputype
|
||
|
@@ -477,7 +477,6 @@ endmenu
|
||
|
|
||
|
config VDSO32
|
||
|
def_bool y
|
||
|
- depends on PPC32 || CPU_BIG_ENDIAN
|
||
|
help
|
||
|
This symbol controls whether we build the 32-bit VDSO. We obviously
|
||
|
want to do that if we're building a 32-bit kernel. If we're building
|