linux/arch/sh
Rich Felker 3623d13821 sh: provide unified syscall trap compatible with all SH models
Historically SH-2 Linux (and originally uClinux) used a syscall
calling convention incompatible with the established SH-3/4 Linux ABI.
This choice was made because the trap range used by the existing ABI,
0x10-0x17, overlaps with the hardware exception/interrupt trap range
reserved by SH-2, and in particular, with the SH-2A divide-by-zero and
division-overflow exceptions.

Despite the documented syscall convention using the low bits of the
trap number to signal the number of arguments the kernel should
expect, no version of the kernel has ever used this information, nor
is it useful; all of the registers need to be saved anyway. Therefore,
it is possible to pick a new trap number, 0x1f, that is both supported
by all existing SH-3/4 kernels and unassigned as a hardware trap in
the SH-2 range. This makes it possible to produce SH-2 application
binaries that are forwards-compatible with running on SH-3/4 kernels
and to treat SH as a unified platform with varying ISA support levels
rather than multiple gratuitously-incompatible platforms.

This patch adjusts the range checking SH-2 and SH-2A kernels make for
the syscall trap to accept the range 0x1f-0x2f rather than just
0x20-0x2f. As a result, trap 0x1f now acts as a syscall for all SH
models.

Signed-off-by: Rich Felker <dalias@libc.org>
2016-03-17 19:46:06 +00:00
..
boards MTD updates for v4.5: 2016-01-13 11:25:54 -08:00
boot sh: Disable trace for kernel uncompressing. 2016-03-17 19:45:38 +00:00
cchips genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
configs PM: Eliminate CONFIG_PM_RUNTIME 2014-12-19 22:55:06 +01:00
drivers PCI: Remove unused "pci_probe" flags 2015-07-27 17:09:40 -05:00
include sh: Use generic clkdev.h header 2016-03-17 19:45:13 +00:00
kernel sh: provide unified syscall trap compatible with all SH models 2016-03-17 19:46:06 +00:00
lib sh: New gcc support 2016-03-17 19:45:44 +00:00
lib64 sh64: Kill off old exception debugging helpers. 2012-06-14 14:12:18 +09:00
math-emu sh: remove unused do_fpu_error 2014-04-03 16:20:52 -07:00
mm mm: differentiate page_mapped() from page_mapcount() for compound pages 2016-01-15 17:56:32 -08:00
oprofile
tools
Kconfig dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
Kconfig.cpu arch/sh: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:43:13 -08:00
Kconfig.debug
Makefile sh: also try passing -m4-nofpu for SH2A builds 2014-07-23 15:10:54 -07:00