ARC: Enable automatic support for newer ARC ISA variants (ARCv3)
PATCH 1/1 ARC: Enable automatic support for newer ARC ISA variants (ARCv3)
The syscall TRAP instruction used to be 4 bytes on legacy ARCompact based ARC700 cores. Since then ARCv2 (circa 2014) and the upcoming ARCv3 use the same 2-byte TRAP_S instruction.
To ease porting of software to new ISA, special case ARC700.
This is the only change needed to get strace working on 64-bit ARCv3 cores (kudos to strace for making porting so easy)
--- src/linux/arc/raw_syscall.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
src/linux/arc/raw_syscall.h +1 -3
@@ -21,10 +21,8 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)# ifdef __A7__# define ARC_TRAP_INSN "trap0" -# elif defined __HS__ -# define ARC_TRAP_INSN "trap_s 0 "# else -# error unrecognized arc +# define ARC_TRAP_INSN "trap_s 0 "# endif __asm__ __volatile__(ARC_TRAP_INSN
Signature · 7 lines
2.25.1 _______________________________________________ linux-snps-arc mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Dmitry V. Levin
AppliedQuoted 20 lines · Vineet Gupta
The syscall TRAP instruction used to be 4 bytes on legacy ARCompact based ARC700 cores. Since then ARCv2 (circa 2014) and the upcoming ARCv3 use the same 2-byte
TRAP_Sinstruction.To ease porting of software to new ISA, special case ARC700.
This is the only change needed to get strace working on 64-bit ARCv3 cores (kudos to strace for making porting so easy)
Signed-off-by Vineet Gupta <[email protected]>--- src/linux/arc/raw_syscall.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)src/linux/arc/raw_syscall.h +0
-0@@ -21,10 +21,8 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
src/linux/arc/raw_syscall.h raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err) · line 28
Quoted 10 lines
src/linux/arc/raw_syscall.h +1
-3# ifdef __A7__# define ARC_TRAP_INSN "trap0" -# elif defined __HS__ -# define ARC_TRAP_INSN "trap_s 0 "# else -# error unrecognized arc +# define ARC_TRAP_INSN "trap_s 0 "# endif __asm__ __volatile__(ARC_TRAP_INSN
Applied, thanks.
Signature · 6 lines
ldv _______________________________________________ linux-snps-arc mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-snps-arc