linux/arch/mips
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
..
alchemy Merge branch '3.14-fixes' into mips-for-linux-next 2014-03-31 18:17:33 +02:00
ar7 MIPS: Restore init.h usage to arch/mips/ar7/time.c 2014-03-26 23:09:23 +01:00
ath79 usb: host: remove selects of USB_ARCH_HAS_?HCI 2014-02-18 12:36:38 -08:00
bcm47xx Merge branch '3.14-fixes' into mips-for-linux-next 2014-03-31 18:17:33 +02:00
bcm63xx MIPS: Use current_cpu_type() instead of c->cputype 2014-03-31 18:17:12 +02:00
boot mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
cavium-octeon genirq: Allow forcing cpu affinity of interrupts 2014-04-17 23:36:27 +02:00
cobalt MIPS: Cobalt: Move to 8250/16550 serial early printk driver 2013-10-29 21:24:38 +01:00
configs MIPS: Loongson: Add a Loongson-3 default config file 2014-03-31 18:17:12 +02:00
dec MIPS: DEC/SNI: O32 wrapper stack switching fixes 2014-05-13 00:29:35 +02:00
emma MIPS: Remove panic_timeout settings 2013-11-26 12:12:27 +01:00
fw MIPS: DEC/SNI: O32 wrapper stack switching fixes 2014-05-13 00:29:35 +02:00
include MIPS: DEC/SNI: O32 wrapper stack switching fixes 2014-05-13 00:29:35 +02:00
jazz Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-03-02 07:44:16 -08:00
jz4740 mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
kernel Revert "MIPS: MT: proc: Add support for printing VPE and TC ids" 2014-05-13 00:29:33 +02:00
kvm MIPS: KVM: Remove dead code in CP0 emulation 2014-03-19 17:01:50 +01:00
lantiq mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
lasat MIPS: Lasat: Replace del_timer by del_timer_sync 2014-03-31 18:17:12 +02:00
lib MIPS: lib: csum_partial: Add EVA support 2014-03-26 23:09:17 +01:00
loongson cpufreq: create another field .flags in cpufreq_frequency_table 2014-04-07 14:43:50 +02:00
loongson1 MIPS: Idle: Consolidate all declarations in <asm/idle.h>. 2013-05-22 01:34:27 +02:00
math-emu Merge branch '3.14-fixes' into mips-for-linux-next 2014-03-31 18:17:33 +02:00
mm mips: export flush_icache_range 2014-04-18 16:40:09 -07:00
mti-malta Merge branch '3.14-fixes' into mips-for-linux-next 2014-03-31 18:17:33 +02:00
mti-sead3 MIPS: SEAD3: Don't use module_init in non-modular sead3-mtd.c code 2014-03-31 18:17:12 +02:00
netlogic Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
oprofile MIPS: Add support for the M5150 processor 2014-03-26 23:09:22 +01:00
pci Merge branch '3.14-fixes' into mips-for-linux-next 2014-03-31 18:17:33 +02:00
pmcs-msp71xx MIPS: Fix gigaton of warning building with microMIPS. 2014-03-31 18:17:12 +02:00
pnx833x MIPS: PNX833x: PNX8335_PCI_ETHERNET_INT depends on CONFIG_SOC_PNX8335 2013-08-05 13:34:22 +02:00
power MIPS: Hibernate: Flush TLB entries in swsusp_arch_resume() 2014-03-31 10:16:53 +02:00
ralink usb: host: remove selects of USB_ARCH_HAS_?HCI 2014-02-18 12:36:38 -08:00
rb532 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sgi-ip22 mips: Use the core irq stats function 2014-03-04 17:37:53 +01:00
sgi-ip27 mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
sgi-ip32 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sibyte mips: Validate online cpus in irq_set_affinity() callbacks 2014-03-12 13:07:40 +01:00
sni MIPS: Cleanup CP0 PRId and CP1 FPIR register access masks 2013-09-18 20:25:19 +02:00
txx9 MIPS: TXx9: Fix build error if CONFIG_TOSHIBA_JMR3927 is not selected 2013-09-03 15:30:50 +02:00
vr41xx MIPS: Idle: Consolidate all declarations in <asm/idle.h>. 2013-05-22 01:34:27 +02:00
Kbuild KVM/MIPS32: Infrastructure/build files. 2013-05-08 03:55:34 +02:00
Kbuild.platforms MIPS: PowerTV: Remove support code. 2013-10-29 21:25:17 +01:00
Kconfig Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAP 2014-04-07 16:36:11 -07:00
Kconfig.debug MIPS: Fix build error due to multiple prom_putchar() definitions. 2014-03-31 10:16:52 +02:00
Makefile MIPS: Add MSA register definitions & access 2014-03-26 23:09:10 +01:00