linux_dsm_epyc7002/arch/sh/kernel/cpu/sh2a
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
..
clock-sh7201.c sh: sh2a sh_clk_ops rename 2012-03-12 22:19:11 +01:00
clock-sh7203.c sh: sh2a sh_clk_ops rename 2012-03-12 22:19:11 +01:00
clock-sh7206.c sh: sh2a sh_clk_ops rename 2012-03-12 22:19:11 +01:00
clock-sh7264.c sh: Rename sci_ick and sci_fck clock to fck 2015-12-17 11:19:03 +01:00
clock-sh7269.c sh: Rename sci_ick and sci_fck clock to fck 2015-12-17 11:19:03 +01:00
entry.S sh: provide unified syscall trap compatible with all SH models 2016-03-17 19:46:06 +00:00
ex.S sh: Fix sh2a vbr table for more than 255 irqs 2012-03-07 15:26:03 +09:00
fpu.c sh: fix up fallout from system.h disintegration. 2012-03-30 19:29:57 +09:00
Makefile sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB 2013-03-20 22:48:15 +09:00
opcode_helper.c Disintegrate asm/system.h for SH 2012-03-28 18:30:03 +01:00
pinmux-sh7203.c sh: sh7203: Add pin control resources 2013-03-15 13:33:50 +01:00
pinmux-sh7264.c sh: sh7264: Add pin control resources 2013-03-15 13:33:51 +01:00
pinmux-sh7269.c sh: sh7269: Fix compilation by adding missing includes 2013-04-02 11:09:45 +09:00
probe.c sh: delete __cpuinit usage from all sh files 2013-07-14 19:36:53 -04:00
setup-mxg.c sh: Switch to new style MTU2 device 2014-05-11 19:35:28 +09:00
setup-sh7201.c sh: Switch to new style MTU2 device 2014-05-11 19:35:28 +09:00
setup-sh7203.c sh: Switch to new style MTU2 device 2014-05-11 19:35:28 +09:00
setup-sh7206.c sh: Switch to new style MTU2 device 2014-05-11 19:35:28 +09:00
setup-sh7264.c sh: Switch to new style MTU2 device 2014-05-11 19:35:28 +09:00
setup-sh7269.c sh: Switch to new style MTU2 device 2014-05-11 19:35:28 +09:00