Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 1 | /* |
| 2 | * syscalls.h - Linux syscall interfaces (arch-specific) |
| 3 | * |
| 4 | * Copyright (c) 2008 Jaswinder Singh Rajput |
| 5 | * Copyright 2010 Tilera Corporation. All Rights Reserved. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License |
| 9 | * as published by the Free Software Foundation, version 2. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, but |
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or |
| 14 | * NON INFRINGEMENT. See the GNU General Public License for |
| 15 | * more details. |
| 16 | */ |
| 17 | |
| 18 | #ifndef _ASM_TILE_SYSCALLS_H |
| 19 | #define _ASM_TILE_SYSCALLS_H |
| 20 | |
| 21 | #include <linux/compiler.h> |
| 22 | #include <linux/linkage.h> |
| 23 | #include <linux/signal.h> |
| 24 | #include <linux/types.h> |
Chris Metcalf | 0707ad3 | 2010-06-25 17:04:17 -0400 | [diff] [blame] | 25 | #include <linux/compat.h> |
| 26 | |
Chris Metcalf | 0707ad3 | 2010-06-25 17:04:17 -0400 | [diff] [blame] | 27 | /* |
| 28 | * Note that by convention, any syscall which requires the current |
Chris Metcalf | d929b6a | 2010-10-14 14:34:33 -0400 | [diff] [blame] | 29 | * register set takes an additional "struct pt_regs *" pointer; a |
| 30 | * _sys_xxx() trampoline in intvec*.S just sets up the pointer and |
| 31 | * jumps to sys_xxx(). |
Chris Metcalf | 0707ad3 | 2010-06-25 17:04:17 -0400 | [diff] [blame] | 32 | */ |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 33 | |
| 34 | /* kernel/sys.c */ |
| 35 | ssize_t sys32_readahead(int fd, u32 offset_lo, u32 offset_hi, u32 count); |
| 36 | long sys32_fadvise64(int fd, u32 offset_lo, u32 offset_hi, |
| 37 | u32 len, int advice); |
| 38 | int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, |
| 39 | u32 len_lo, u32 len_hi, int advice); |
Chris Metcalf | cd6f32a | 2012-03-29 15:25:59 -0400 | [diff] [blame] | 40 | long sys_cacheflush(unsigned long addr, unsigned long len, |
| 41 | unsigned long flags); |
Chris Metcalf | d929b6a | 2010-10-14 14:34:33 -0400 | [diff] [blame] | 42 | #ifndef __tilegx__ /* No mmap() in the 32-bit kernel. */ |
| 43 | #define sys_mmap sys_mmap |
Chris Metcalf | 0707ad3 | 2010-06-25 17:04:17 -0400 | [diff] [blame] | 44 | #endif |
| 45 | |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 46 | #ifndef __tilegx__ |
| 47 | /* mm/fault.c */ |
Chris Metcalf | 6b14e41 | 2012-10-23 13:30:54 -0400 | [diff] [blame] | 48 | long sys_cmpxchg_badaddr(unsigned long address); |
Chris Metcalf | 0707ad3 | 2010-06-25 17:04:17 -0400 | [diff] [blame] | 49 | #endif |
| 50 | |
| 51 | #ifdef CONFIG_COMPAT |
Chris Metcalf | 0707ad3 | 2010-06-25 17:04:17 -0400 | [diff] [blame] | 52 | /* These four are not defined for 64-bit, but serve as "compat" syscalls. */ |
| 53 | long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg); |
| 54 | long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf); |
| 55 | long sys_truncate64(const char __user *path, loff_t length); |
| 56 | long sys_ftruncate64(unsigned int fd, loff_t length); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 57 | #endif |
| 58 | |
Chris Metcalf | 6b14e41 | 2012-10-23 13:30:54 -0400 | [diff] [blame] | 59 | /* Provide versions of standard syscalls that use current_pt_regs(). */ |
Chris Metcalf | 6b14e41 | 2012-10-23 13:30:54 -0400 | [diff] [blame] | 60 | long sys_rt_sigreturn(void); |
Chris Metcalf | 6b14e41 | 2012-10-23 13:30:54 -0400 | [diff] [blame] | 61 | #define sys_rt_sigreturn sys_rt_sigreturn |
Chris Metcalf | 6b14e41 | 2012-10-23 13:30:54 -0400 | [diff] [blame] | 62 | |
| 63 | /* These are the intvec*.S trampolines. */ |
| 64 | long _sys_rt_sigreturn(void); |
| 65 | long _sys_clone(unsigned long clone_flags, unsigned long newsp, |
| 66 | void __user *parent_tid, void __user *child_tid); |
Chris Metcalf | d929b6a | 2010-10-14 14:34:33 -0400 | [diff] [blame] | 67 | |
| 68 | #include <asm-generic/syscalls.h> |
| 69 | |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 70 | #endif /* _ASM_TILE_SYSCALLS_H */ |