summaryrefslogtreecommitdiffstats
path: root/arch/mips/dec/prom/Makefile
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2014-04-01 00:14:41 +0100
committerRalf Baechle <ralf@linux-mips.org>2014-05-13 00:29:35 +0200
commit824122a319d827d42aeb4646a3bf639937fdb2ce (patch)
treee28921d9bd4f85c09d7c3c1d838a9f816b0cf96e /arch/mips/dec/prom/Makefile
parentaf37530bbe9cae2a17044525b9f898ff60012157 (diff)
downloadlinux-824122a319d827d42aeb4646a3bf639937fdb2ce.tar.gz
linux-824122a319d827d42aeb4646a3bf639937fdb2ce.tar.xz
MIPS: DEC/SNI: O32 wrapper stack switching fixes
Commit 231a35d37293ab88d325a9cb94e5474c156282c0 [[MIPS] RM: Collected changes] broke DECstation support by introducing an incompatible copy of arch/mips/dec/prom/call_o32.S in arch/mips/fw/lib/, built unconditionally. The copy happens to land earlier of the two among the modules used in the link and is therefore chosen for the DECstation rather than the intended original. As a result random kernel data is corrupted because a pointer to the "%s" formatted output template is used as a temporary stack pointer rather than being passed down to prom_printf. This also explains why prom_printf still works, up to a point -- the next argument is the actual string to output so it works just fine as the output template until enough kernel data has been corrupted to cause a crash. This change adjusts the modified wrapper in arch/mips/fw/lib/call_o32.S to let callers request no stack switching by passing a null temporary stack pointer in $a1, reworks the DECstation callers to work with the updated interface and removes the old copy from arch/mips/dec/prom/call_o32.S. A few minor readability adjustments are included as well, most importantly O32_SZREG is now used throughout where applicable rather than hardcoded multiplies of 4 and $fp is used to access the argument save area as a more usual register to operate the stack with rather than $s0. Finally an update is made to the temporary stack space used by the SNI platform to guarantee 8-byte alignment as per o32 requirements. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6668/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/dec/prom/Makefile')
-rw-r--r--arch/mips/dec/prom/Makefile1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/mips/dec/prom/Makefile b/arch/mips/dec/prom/Makefile
index 064ae7a76bdc..ae73e42ac20b 100644
--- a/arch/mips/dec/prom/Makefile
+++ b/arch/mips/dec/prom/Makefile
@@ -6,4 +6,3 @@
lib-y += init.o memory.o cmdline.o identify.o console.o
lib-$(CONFIG_32BIT) += locore.o
-lib-$(CONFIG_64BIT) += call_o32.o