linux_dsm_epyc7002/arch/mips/dec
Maciej W. Rozycki 824122a319 MIPS: DEC/SNI: O32 wrapper stack switching fixes
Commit 231a35d372 [[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>
2014-05-13 00:29:35 +02:00
..
prom MIPS: DEC/SNI: O32 wrapper stack switching fixes 2014-05-13 00:29:35 +02:00
ecc-berr.c MIPS: DEC: Bus error handler <asm/cpu-type.h> fixes 2014-05-13 00:29:35 +02:00
int-handler.S DEC: Whitespace cleanup 2013-10-29 21:24:44 +01:00
ioasic-irq.c MIPS: DECstation I/O ASIC DMA interrupt classes 2013-10-29 21:24:42 +01:00
kn01-berr.c Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
kn02-irq.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
kn02xa-berr.c MIPS: DEC: Bus error handler <asm/cpu-type.h> fixes 2014-05-13 00:29:35 +02:00
Makefile MIPS: DEC: remove unbuildable promcon.c 2013-06-18 00:31:29 +02:00
Platform MIPS: Repair Kbuild make clean breakage. 2010-10-19 18:32:39 +01:00
reset.c [MIPS] Transform old-style macros to newer "__noreturn" 2007-07-10 17:32:56 +01:00
setup.c DEC: Whitespace cleanup 2013-10-29 21:24:44 +01:00
tc.c [TC] TURBOchannel support for the DECstation 2007-02-09 16:23:16 +00:00
time.c MIPS: DECstation HRT initialization rearrangement 2013-09-13 11:56:13 +02:00
wbflush.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00