All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
	Haavard Skinnemoen <hskinnemoen@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	David Howells <dhowells@redhat.com>,
	Dave Jones <davej@redhat.com>, Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch: avr32: add dummy syscalls
Date: Sun, 27 Jan 2013 20:30:09 +0000	[thread overview]
Message-ID: <20130127203009.GG4503@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20130127195714.GA11224@samfundet.no>

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.

  reply	other threads:[~2013-01-27 20:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27 12:50 [PATCH] arch: avr32: add dummy syscalls Matthias Brugger
2013-01-27 19:57 ` Hans-Christian Egtvedt
2013-01-27 20:30   ` Al Viro [this message]
2013-01-27 20:39     ` Hans-Christian Egtvedt
2013-02-04  0:10       ` Al Viro
2013-02-04  0:30         ` Al Viro
2013-02-04  1:31           ` Al Viro
2013-02-04  3:02             ` Al Viro
2013-02-04  4:52               ` Håvard Skinnemoen
2013-02-04  5:05                 ` Al Viro
2013-02-04  5:35                   ` Håvard Skinnemoen
2013-02-04 15:39                     ` Al Viro
2013-02-04 16:34                       ` Håvard Skinnemoen
2013-02-04 22:53                         ` Al Viro
2013-02-05  8:06                         ` Hans-Christian Egtvedt
2013-02-04  3:21             ` H. Peter Anvin
2013-01-28  2:45 ` Håvard Skinnemoen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130127203009.GG4503@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=davej@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=egtvedt@samfundet.no \
    --cc=hskinnemoen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.