xref: /openbmc/linux/arch/xtensa/include/uapi/asm/unistd.h (revision 597473720f4dc69749542bfcfed4a927a43d935e)
16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2*5eacadb5SFiroz Khan #ifndef _UAPI_XTENSA_UNISTD_H
37216cabfSChris Zankel #define _UAPI_XTENSA_UNISTD_H
47216cabfSChris Zankel 
5*5eacadb5SFiroz Khan #include <asm/unistd_32.h>
683596729SDavid Howells 
72651cc69SMax Filippov #define __ARCH_WANT_SYS_OLDUMOUNT
883596729SDavid Howells 
983596729SDavid Howells /*
1083596729SDavid Howells  * sysxtensa syscall handler
1183596729SDavid Howells  *
1283596729SDavid Howells  * int sysxtensa (SYS_XTENSA_ATOMIC_SET,     ptr, val,    unused);
1383596729SDavid Howells  * int sysxtensa (SYS_XTENSA_ATOMIC_ADD,     ptr, val,    unused);
1483596729SDavid Howells  * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val,    unused);
1583596729SDavid Howells  * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval);
1683596729SDavid Howells  *        a2            a6                   a3    a4      a5
1783596729SDavid Howells  */
1883596729SDavid Howells 
1983596729SDavid Howells #define SYS_XTENSA_RESERVED               0     /* don't use this */
2083596729SDavid Howells #define SYS_XTENSA_ATOMIC_SET             1     /* set variable */
2183596729SDavid Howells #define SYS_XTENSA_ATOMIC_EXG_ADD         2     /* exchange memory and add */
2283596729SDavid Howells #define SYS_XTENSA_ATOMIC_ADD             3     /* add to memory */
2383596729SDavid Howells #define SYS_XTENSA_ATOMIC_CMP_SWP         4     /* compare and swap */
2483596729SDavid Howells #define SYS_XTENSA_COUNT                  5     /* count */
257216cabfSChris Zankel 
267216cabfSChris Zankel #endif /* _UAPI_XTENSA_UNISTD_H */
27