diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2016-08-10 23:10:57 +0200 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2016-08-19 19:44:34 +0200 |
commit | 840c054fd0efb048df6fceb0c46385ec5b66dfe6 (patch) | |
tree | 18838fee6a08ac1bd8aa9c56c21625156be2b0cd /arch/arc/kernel/process.c | |
parent | ARC: use correct offset in pt_regs for saving/restoring user mode r25 (diff) | |
download | linux-840c054fd0efb048df6fceb0c46385ec5b66dfe6.tar.xz linux-840c054fd0efb048df6fceb0c46385ec5b66dfe6.zip |
ARC: Support syscall ABI v4
The syscall ABI includes the gcc functional calling ABI since a syscall
implies userland caller and kernel callee.
The current gcc ABI (v3) for ARCv2 ISA required 64-bit data be passed in
even-odd register pairs, (potentially punching reg holes when passing such
values as args). This was partly driven by the fact that the double-word
LDD/STD instructions in ARCv2 expect the register alignment and thus gcc
forcing this avoids extra MOV at the cost of a few unused register (which we
have plenty anyways).
This however was rejected as part of upstreaming gcc port to HS. So the new
ABI v4 doesn't enforce the even-odd reg restriction.
Do note that for ARCompact ISA builds v3 and v4 are practically the same in
terms of gcc code generation.
In terms of change management, we infer the new ABI if gcc 6.x onwards
is used for building the kernel.
This also needs a stable backport to enable older kernels to work with
new tools/user-space
Cc: <stable@vger.kernel.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/process.c')
-rw-r--r-- | arch/arc/kernel/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c index b5db9e7fd649..be1972bd2729 100644 --- a/arch/arc/kernel/process.c +++ b/arch/arc/kernel/process.c @@ -199,7 +199,7 @@ int elf_check_arch(const struct elf32_hdr *x) } eflags = x->e_flags; - if ((eflags & EF_ARC_OSABI_MSK) < EF_ARC_OSABI_CURRENT) { + if ((eflags & EF_ARC_OSABI_MSK) != EF_ARC_OSABI_CURRENT) { pr_err("ABI mismatch - you need newer toolchain\n"); force_sigsegv(SIGSEGV, current); return 0; |