# Re: Linux powerpc new system call instruction and ABI

- From: Dmitry V. Levin \<hidden\>
- Date: 2021-05-20 03:06:34 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2021/05/9522813
- Thread: https://ratatoskr.run/linux-api/2020/06/9516739/t.md

```text
On Thu, May 20, 2021 at 12:40:36PM +1000, Nicholas Piggin wrote:
[...]
> > Looks like struct pt_regs.trap already contains the information that could
> > be used to tell 'sc' from 'scv': if (pt_regs.trap & ~0xf) == 0x3000, then
> > it's scv.  Is my reading of arch/powerpc/include/asm/ptrace.h correct?
> 
> Hmm, I think it is. Certainly in the kernel regs struct it is, I had in 
> my mind that we put it to 0xc00 when populating the user struct for
> compatibility, but it seems not. So I guess this would work.

OK, can we state that (pt_regs.trap & ~0xf) == 0x3000 is a part of the scv
ABI, so it's not going to change and could be relied upon by userspace?
Could this be documented in Documentation/powerpc/syscall64-abi.rst,
please?


-- 
ldv
```
