lkml.org 
[lkml]   [2013]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arch: avr32: add dummy syscalls
On Sun, Jan 27, 2013 at 08:57:14PM +0100, Hans-Christian Egtvedt wrote:
> Around Sun 27 Jan 2013 13:50:15 +0100 or thereabout, Matthias Brugger wrote:
> > This patch adds dummy syscalls so that compiling
> > for this architecture does not provoke warnings when
> > checksyscalls.sh is called.
>
> Does any of these syscalls take more than 5 arguments? If so, it is also
> needed to do some stack handling. I would rather not add syscalls that cause
> the kernel to misbehave.

BTW, it might make sense to teach SYSCALL_DEFINE6 to generate such a wrapper
on avr32. How about something along the lines of
* SYSCALL_DEFINE6(foo, ...) generating (via asm volatile, right next to
sys_foo())
__sys_##foo:
pushm lr
st.w --sp, r3
call sys_##foo
sub sp, -4
popm pc
* SYSCALL_DEFINE[0..5](foo, ...) generating
SYSCALL_ALIAS(__sys_foo, sys_foo)
* syscall_table.S beginning with
.section .rodata,"a",@progbits
.type sys_call_table,@object
.global sys_call_table
.align 2
#define SYS(name) __sys_##name
sys_call_table:
SYS(restart_syscall)
SYS(exit)
SYS(fork)
...

If you are OK with going that way, I could probably put together patches doing
just that. Note that for rt_sigsuspend/rt_sigreturn/sigaltstack the wrappers
are not needed at all - they can just use current_pt_regs() in syscall body.
IOW, all of syscall-stubs.S could be killed.


\
 
 \ /
  Last update: 2013-01-27 22:01    [W:0.063 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site