path: root/arch/cris/include/uapi/asm
AgeCommit message (Collapse)AuthorFilesLines
2015-09-05CRIS: UAPI: use generic sockios.hRabin Vincent1-13/+0
CRIS' sockios.h is equivalent to the asm-generic version. Effective diff: -#ifndef __ARCH_CRIS_SOCKIOS__ -#define __ARCH_CRIS_SOCKIOS__ +#ifndef __ASM_GENERIC_SOCKIOS_H +#define __ASM_GENERIC_SOCKIOS_H Signed-off-by: Rabin Vincent <> Signed-off-by: Jesper Nilsson <>
2015-09-05CRIS: UAPI: use generic auxvec.hRabin Vincent1-4/+0
CRIS's auxvec.h is empty just like the asm-generic version. Effective diff: -#ifndef __ASMCRIS_AUXVEC_H -#define __ASMCRIS_AUXVEC_H +#ifndef __ASM_GENERIC_AUXVEC_H +#define __ASM_GENERIC_AUXVEC_H + Signed-off-by: Rabin Vincent <> Signed-off-by: Jesper Nilsson <>
2015-09-05CRIS: UAPI: use generic headers via KbuildRabin Vincent11-31/+0
Use Kbuild magic to include the generic headers. Signed-off-by: Rabin Vincent <> Signed-off-by: Jesper Nilsson <>
2015-09-05CRIS: UAPI: fix elf.h exportRabin Vincent4-0/+253
CRIS userspace (uClibc for one) expects asm/elf.h to be exported but this header appears to have gone missing at some point. Move it to uapi/ and export it. Signed-off-by: Rabin Vincent <> Signed-off-by: Jesper Nilsson <>
2015-09-05CRIS: UAPI: fix ptrace.hRabin Vincent4-1/+243
The exported ptrace.h header on CRIS references an "arch" directory which does not exist. Fix this by having the variants in the same directory and including them conditionally, similar to other architectures. Signed-off-by: Rabin Vincent <> Signed-off-by: Jesper Nilsson <>
2015-09-05CRIS: Wire up missing syscallsChen Gang1-0/+8
The related warnings: CALL scripts/ <stdin>:1229:2: warning: #warning syscall sched_setattr not implemented [-Wcpp] <stdin>:1232:2: warning: #warning syscall sched_getattr not implemented [-Wcpp] <stdin>:1235:2: warning: #warning syscall renameat2 not implemented [-Wcpp] <stdin>:1238:2: warning: #warning syscall seccomp not implemented [-Wcpp] <stdin>:1241:2: warning: #warning syscall getrandom not implemented [-Wcpp] <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp] <stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp] <stdin>:1250:2: warning: #warning syscall execveat not implemented [-Wcpp] Signed-off-by: Chen Gang <> Signed-off-by: Jesper Nilsson <>
2014-12-20CRIS: Fix headers_installSam Ravnborg1-2/+2
Fix headers_install by adjusting the path to arch files. And delete unused Kbuild file. Drop special handling of cris in the script as a nice side-effect. Signed-off-by: Sam Ravnborg <> Cc: Mikael Starvik <> Cc: David Howells <> Signed-off-by: Jesper Nilsson <>
2014-12-05net: sock: allow eBPF programs to be attached to socketsAlexei Starovoitov1-0/+3
introduce new setsockopt() command: setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd, sizeof(prog_fd)) where prog_fd was received from syscall bpf(BPF_PROG_LOAD, attr, ...) and attr->prog_type == BPF_PROG_TYPE_SOCKET_FILTER setsockopt() calls bpf_prog_get() which increments refcnt of the program, so it doesn't get unloaded while socket is using the program. The same eBPF program can be attached to multiple sockets. User task exit automatically closes socket which calls sk_filter_uncharge() which decrements refcnt of eBPF program Signed-off-by: Alexei Starovoitov <> Signed-off-by: David S. Miller <>
2014-11-11net: introduce SO_INCOMING_CPUEric Dumazet1-0/+2
Alternative to RPS/RFS is to use hardware support for multiple queues. Then split a set of million of sockets into worker threads, each one using epoll() to manage events on its own socket pool. Ideally, we want one thread per RX/TX queue/cpu, but we have no way to know after accept() or connect() on which queue/cpu a socket is managed. We normally use one cpu per RX queue (IRQ smp_affinity being properly set), so remembering on socket structure which cpu delivered last packet is enough to solve the problem. After accept(), connect(), or even file descriptor passing around processes, applications can use : int cpu; socklen_t len = sizeof(cpu); getsockopt(fd, SOL_SOCKET, SO_INCOMING_CPU, &cpu, &len); And use this information to put the socket into the right silo for optimal performance, as all networking stack should run on the appropriate cpu, without need to send IPI (RPS/RFS). Signed-off-by: Eric Dumazet <> Signed-off-by: David S. Miller <>
2014-01-27Merge tag 'cris-for-3.14' of git:// Torvalds1-0/+16
Pull cris changes from Jesper Nilsson: "Mostly removal of deprecated or old code, but also a long promised update of the CRIS syscalls" * tag 'cris-for-3.14' of git:// Drop code for CRISv10 CPU simulator Cleanup whitespace, remove old author tag CRIS: Add missing syscalls cris: sync_serial: remove interruptible_sleep_on cris: remove deprecated IRQF_DISABLED
2014-01-18net: introduce SO_BPF_EXTENSIONSMichal Sekletar1-0/+2
For user space packet capturing libraries such as libpcap, there's currently only one way to check which BPF extensions are supported by the kernel, that is, commit aa1113d9f85d ("net: filter: return -EINVAL if BPF_S_ANC* operation is not supported"). For querying all extensions at once this might be rather inconvenient. Therefore, this patch introduces a new option which can be used as an argument for getsockopt(), and allows one to obtain information about which BPF extensions are supported by the current kernel. As David Miller suggests, we do not need to define any bits right now and status quo can just return 0 in order to state that this versions supports SKF_AD_PROTOCOL up to SKF_AD_PAY_OFFSET. Later additions to BPF extensions need to add their bits to the bpf_tell_extensions() function, as documented in the comment. Signed-off-by: Michal Sekletar <> Cc: David Miller <> Reviewed-by: Daniel Borkmann <> Signed-off-by: David S. Miller <>
2014-01-09CRIS: Add missing syscallsJesper Nilsson1-0/+16
Complete list of syscalls for CRISv10 and CRISv32. Clean up some whitespace at the same time. Signed-off-by: Jesper Nilsson <>
2013-09-28net: introduce SO_MAX_PACING_RATEEric Dumazet1-0/+2
As mentioned in commit afe4fd062416b ("pkt_sched: fq: Fair Queue packet scheduler"), this patch adds a new socket option. SO_MAX_PACING_RATE offers the application the ability to cap the rate computed by transport layer. Value is in bytes per second. u32 val = 1000000; setsockopt(sockfd, SOL_SOCKET, SO_MAX_PACING_RATE, &val, sizeof(val)); To be effectively paced, a flow must use FQ packet scheduler. Note that a packet scheduler takes into account the headers for its computations. The effective payload rate depends on MSS and retransmits if any. I chose to make this pacing rate a SOL_SOCKET option instead of a TCP one because this can be used by other protocols. Signed-off-by: Eric Dumazet <> Cc: Steinar H. Gunderson <> Cc: Michael Kerrisk <> Signed-off-by: David S. Miller <>
2013-09-10CRIS: Add kvm_para.h which includes generic fileJesper Nilsson1-0/+1
Copied from frv. Reviewed-by: David Howells <> Signed-off-by: Jesper Nilsson <>
2013-07-10net: rename busy poll socket op and globalsEliezer Tamir1-1/+1
Rename LL_SO to BUSY_POLL_SO Rename sysctl_net_ll_{read,poll} to sysctl_busy_{read,poll} Fix up users of these variables. Fix documentation for sysctl. a patch for the socket.7 man page will follow separately, because of limitations of my mail setup. Signed-off-by: Eliezer Tamir <> Signed-off-by: David S. Miller <>
2013-06-17net: add socket option for low latency pollingEliezer Tamir1-0/+2
adds a socket option for low latency polling. This allows overriding the global sysctl value with a per-socket one. Unexport sysctl_net_ll_poll since for now it's not needed in modules. Signed-off-by: Eliezer Tamir <> Signed-off-by: David S. Miller <>
2013-03-31net: add option to enable error queue packets waking selectKeller, Jacob E1-0/+2
Currently, when a socket receives something on the error queue it only wakes up the socket on select if it is in the "read" list, that is the socket has something to read. It is useful also to wake the socket if it is in the error list, which would enable software to wait on error queue packets without waking up for regular data on the socket. The main use case is for receiving timestamped transmit packets which return the timestamp to the socket via the error queue. This enables an application to select on the socket for the error queue only instead of for the regular traffic. -v2- * Added the SO_SELECT_ERR_QUEUE socket option to every architechture specific file * Modified every socket poll function that checks error queue Signed-off-by: Jacob Keller <> Cc: Jeffrey Kirsher <> Cc: Richard Cochran <> Cc: Matthew Vick <> Signed-off-by: David S. Miller <>
2013-02-21cris: use "int" for ssize_t to match size_tGeert Uytterhoeven1-5/+0
On cris-linux-gcc, __SIZE_TYPE__ expands to "unsigned int", as gcc-4.6.3-nolibc/cris-linux/lib/gcc/cris-linux/4.6.3/plugin/include/config/cris/linux.h has #define SIZE_TYPE "unsigned int" Hence __kernel_size_t is also "unsigned int". But __kernel_ssize_t is "long", which has a different base type, causing compiler warnings like: fs/quota/quota_tree.c:372:4: warning: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'ssize_t' [-Wformat] To fix this, __kernel_ssize_t should be changed to "int". Hence cris can just use the generic 32-bit versions from include/asm-generic/posix_types.h for all size-related types. Signed-off-by: Geert Uytterhoeven <> Cc: Mikael Starvik <> Acked-by: Jesper Nilsson <> Cc: Hans-Peter Nilsson <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2013-01-23soreuseport: infrastructureTom Herbert1-1/+1
Definitions and macros for implementing soreusport. Signed-off-by: Tom Herbert <> Signed-off-by: David S. Miller <>
2013-01-17sk-filter: Add ability to lock a socket filter programVincent Bernat1-0/+2
While a privileged program can open a raw socket, attach some restrictive filter and drop its privileges (or send the socket to an unprivileged program through some Unix socket), the filter can still be removed or modified by the unprivileged program. This commit adds a socket option to lock the filter (SO_LOCK_FILTER) preventing any modification of a socket filter program. This is similar to OpenBSD BIOCLOCK ioctl on bpf sockets, except even root is not allowed change/drop the filter. The state of the lock can be read with getsockopt(). No error is triggered if the state is not changed. -EPERM is returned when a user tries to remove the lock or to change/remove the filter while the lock is active. The check is done directly in sk_attach_filter() and sk_detach_filter() and does not affect only setsockopt() syscall. Signed-off-by: Vincent Bernat <> Signed-off-by: David S. Miller <>
2012-12-20Merge branch 'for-linus' of ↵Linus Torvalds1-6/+0
git:// Pull signal handling cleanups from Al Viro: "sigaltstack infrastructure + conversion for x86, alpha and um, COMPAT_SYSCALL_DEFINE infrastructure. Note that there are several conflicts between "unify SS_ONSTACK/SS_DISABLE definitions" and UAPI patches in mainline; resolution is trivial - just remove definitions of SS_ONSTACK and SS_DISABLED from arch/*/uapi/asm/signal.h; they are all identical and include/uapi/linux/signal.h contains the unified variant." Fixed up conflicts as per Al. * 'for-linus' of git:// alpha: switch to generic sigaltstack new helpers: __save_altstack/__compat_save_altstack, switch x86 and um to those generic compat_sys_sigaltstack() introduce generic sys_sigaltstack(), switch x86 and um to it new helper: compat_user_stack_pointer() new helper: restore_altstack() unify SS_ONSTACK/SS_DISABLE definitions new helper: current_user_stack_pointer() missing user_stack_pointer() instances Bury the conditionals from kernel_thread/kernel_execve series COMPAT_SYSCALL_DEFINE: infrastructure
2012-12-20UAPI: Fix up empty files in arch/cris/David Howells1-0/+3
Fix up three empty files in arch/cris/ by sticking placeholder comments in there to prevent the patch program from deleting them. I decided not to delete the arch-v*/Kbuild files as it's possibly someone might want to use them for genhdr-y lines in the future, but they could be deleted and the pointer lines removed from asm/Kbuild. The uapi/arch-v*/Kbuild files ought to be uneffected by such a change. asm/swab.h didn't have anything outside of __KERNEL__ so nothing appeared in uapi/asm/swab.h. The latter, however, is exported by Kbuild.asm. This needs to be applied after the CRIS UAPI disintegration patch. Signed-off-by: David Howells <> Signed-off-by: Jesper Nilsson <>
2012-12-20Merge tag 'disintegrate-cris-20121009' of ↵Jesper Nilsson35-0/+1591
git:// into for-linus2 UAPI Disintegration 2012-10-09 * tag 'disintegrate-cris-20121009' of git:// UAPI: (Scripted) Disintegrate arch/cris/include/asm UAPI: (Scripted) Disintegrate arch/cris/include/arch-v32/arch UAPI: (Scripted) Disintegrate arch/cris/include/arch-v10/arch
2012-10-09UAPI: (Scripted) Disintegrate arch/cris/include/asmDavid Howells35-0/+1590
Signed-off-by: David Howells <> Acked-by: Arnd Bergmann <> Acked-by: Thomas Gleixner <> Acked-by: Michael Kerrisk <> Acked-by: Paul E. McKenney <> Acked-by: Dave Jones <>
2012-10-02UAPI: (Scripted) Set up UAPI Kbuild filesDavid Howells1-0/+5
Set up empty UAPI Kbuild files to be populated by the header splitter. Signed-off-by: David Howells <> Acked-by: Arnd Bergmann <> Acked-by: Thomas Gleixner <> Acked-by: Paul E. McKenney <> Acked-by: Dave Jones <>