~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/xtensa/platforms/iss/include/platform/simcall.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * include/asm-xtensa/platform-iss/simcall.h
  3  *
  4  * This file is subject to the terms and conditions of the GNU General Public
  5  * License.  See the file "COPYING" in the main directory of this archive
  6  * for more details.
  7  *
  8  * Copyright (C) 2001 Tensilica Inc.
  9  * Copyright (C) 2017 - 2021 Cadence Design Systems Inc.
 10  */
 11 
 12 #ifndef _XTENSA_PLATFORM_ISS_SIMCALL_H
 13 #define _XTENSA_PLATFORM_ISS_SIMCALL_H
 14 
 15 #include <linux/bug.h>
 16 
 17 #ifdef CONFIG_XTENSA_SIMCALL_ISS
 18 #include <platform/simcall-iss.h>
 19 #endif
 20 #ifdef CONFIG_XTENSA_SIMCALL_GDBIO
 21 #include <platform/simcall-gdbio.h>
 22 #endif
 23 
 24 static inline int simc_exit(int exit_code)
 25 {
 26 #ifdef SYS_exit
 27         return __simc(SYS_exit, exit_code, 0, 0);
 28 #else
 29         WARN_ONCE(1, "%s: not implemented\n", __func__);
 30         return -1;
 31 #endif
 32 }
 33 
 34 static inline int simc_open(const char *file, int flags, int mode)
 35 {
 36         return __simc(SYS_open, (int) file, flags, mode);
 37 }
 38 
 39 static inline int simc_close(int fd)
 40 {
 41         return __simc(SYS_close, fd, 0, 0);
 42 }
 43 
 44 static inline int simc_ioctl(int fd, int request, void *arg)
 45 {
 46 #ifdef SYS_ioctl
 47         return __simc(SYS_ioctl, fd, request, (int) arg);
 48 #else
 49         WARN_ONCE(1, "%s: not implemented\n", __func__);
 50         return -1;
 51 #endif
 52 }
 53 
 54 static inline int simc_read(int fd, void *buf, size_t count)
 55 {
 56         return __simc(SYS_read, fd, (int) buf, count);
 57 }
 58 
 59 static inline int simc_write(int fd, const void *buf, size_t count)
 60 {
 61         return __simc(SYS_write, fd, (int) buf, count);
 62 }
 63 
 64 static inline int simc_poll(int fd)
 65 {
 66 #ifdef SYS_select_one
 67         long timeval[2] = { 0, 0 };
 68 
 69         return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&timeval);
 70 #else
 71         WARN_ONCE(1, "%s: not implemented\n", __func__);
 72         return -1;
 73 #endif
 74 }
 75 
 76 static inline int simc_lseek(int fd, uint32_t off, int whence)
 77 {
 78         return __simc(SYS_lseek, fd, off, whence);
 79 }
 80 
 81 static inline int simc_argc(void)
 82 {
 83 #ifdef SYS_iss_argc
 84         return __simc(SYS_iss_argc, 0, 0, 0);
 85 #else
 86         WARN_ONCE(1, "%s: not implemented\n", __func__);
 87         return 0;
 88 #endif
 89 }
 90 
 91 static inline int simc_argv_size(void)
 92 {
 93 #ifdef SYS_iss_argv_size
 94         return __simc(SYS_iss_argv_size, 0, 0, 0);
 95 #else
 96         WARN_ONCE(1, "%s: not implemented\n", __func__);
 97         return 0;
 98 #endif
 99 }
100 
101 static inline void simc_argv(void *buf)
102 {
103 #ifdef SYS_iss_set_argv
104         __simc(SYS_iss_set_argv, (int)buf, 0, 0);
105 #else
106         WARN_ONCE(1, "%s: not implemented\n", __func__);
107 #endif
108 }
109 
110 #endif /* _XTENSA_PLATFORM_ISS_SIMCALL_H */
111 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php