lkml.org 
[lkml]   [2014]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 16/28] nios2: System calls handling
On Fri 2014-04-18 20:26:59, Ley Foon Tan wrote:
> This patch adds support for system calls from userspaces. It uses the
> asm-generic/unistd.h definitions with architecture spcific syscall. The sys_call_table
> is just an array defined in a C file and it contains pointers to the syscall functions.
>
> Signed-off-by: Ley Foon Tan <lftan@altera.com>


> +/* Additional Nios II specific syscalls. */
> +#define __NR_cacheflush (__NR_arch_specific_syscall)
> +__SYSCALL(__NR_cacheflush, sys_cacheflush)

I guess you should Cc: Michael Kerrisk on this one.

Also... explanation why you need this syscall while other
architectures live happily without it would be nice.

> +/* sys_cacheflush -- flush the processor cache. */
> +asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len,
> + unsigned int op)
> +{
> + struct vm_area_struct *vma;
> +
> + if (len == 0)
> + return 0;

op is being ignored? You should remove it... or if (op) return -EINVAL
if you want future extensions.

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2014-04-19 18:41    [W:1.541 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site