From: Chris Metcalf <cmetcalf@tilera.com>
To: Jonas Bonn <jonas@southpole.se>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH RFC 8/8] tile: implement syscall restart generically
Date: Mon, 31 Oct 2011 11:48:21 -0400 [thread overview]
Message-ID: <4EAEC345.90704@tilera.com> (raw)
In-Reply-To: <e790f266cc75b291d44726cf6bf8641d1bf7af5d.1319364492.git.jonas@southpole.se>
On 10/23/2011 6:20 AM, Jonas Bonn wrote:
> Manipulating task state to effect re-execution of an interrupted syscall
> used to be purely architecture specific code. However, as most arch's
> were essentially just making minor adjustments to almost identical logic,
> this code could be moved to a common implementation.
>
> The generic variant introduces the function handle_syscall_restart() to be
> called after get_signal_to_deliver(). The architecture specific register
> manipulations required to effect the actual restart are now implemented
> in the generic syscall interface found in asm/syscall.h
>
> This patch transitions this architecture's signal handling code over to
> using the generic syscall restart code by:
>
> i) Implementing the register manipulations in asm/syscall.h
> ii) Replacing the restart logic with a call to handle_syscall_restart
>
> Cc: Chris Metcalf <cmetcalf@tilera.com>
> Signed-off-by: Jonas Bonn <jonas@southpole.se>
I like the idea, though the patch isn't quite right:
- You need to move the definition of INT_SWINT_1_SIGRETURN from
<asm/sigframe.h> to <asm/syscall.h>. You then have to add #includes of
<asm/syscall.h> to signal.c and stack.c in arch/tile/kernel. (And probably
use syscall_clear() in signal.c.)
- In syscall_do_restartblock() you need to use regs->regs[], not regs->gprs[].
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
next prev parent reply other threads:[~2011-10-31 15:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-23 10:19 [PATCH RFC 0/8] Signal: harmonize syscall restart logic Jonas Bonn
2011-10-23 10:19 ` Jonas Bonn
2011-10-23 10:19 ` [PATCH RFC 1/8] signal: introduce generic " Jonas Bonn
2011-10-23 10:19 ` Jonas Bonn
2011-10-23 10:19 ` [PATCH RFC 2/8] blackfin: implement syscall restart generically Jonas Bonn
2011-10-26 0:01 ` Mike Frysinger
2011-10-26 6:16 ` Jonas Bonn
2011-10-26 7:35 ` [uclinux-dist-devel] " Mike Frysinger
2011-10-26 7:35 ` Mike Frysinger
2011-10-23 10:19 ` [PATCH RFC 3/8] frv: " Jonas Bonn
2011-10-23 10:19 ` [PATCH RFC 4/8] mips: " Jonas Bonn
2011-10-23 10:19 ` Jonas Bonn
2011-11-04 9:32 ` Ralf Baechle
2011-11-04 9:32 ` Ralf Baechle
2011-11-04 9:50 ` Jonas Bonn
2011-10-23 10:19 ` [PATCH RFC 5/8] x86: " Jonas Bonn
2011-10-23 10:20 ` [PATCH RFC 6/8] m68k: " Jonas Bonn
2011-10-23 10:20 ` Jonas Bonn
2011-10-23 10:20 ` [PATCH RFC 7/8] ia64: " Jonas Bonn
2011-10-23 10:20 ` [PATCH RFC 8/8] tile: " Jonas Bonn
2011-10-23 10:20 ` Jonas Bonn
2011-10-31 15:48 ` Chris Metcalf [this message]
2011-10-31 15:48 ` Chris Metcalf
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=4EAEC345.90704@tilera.com \
--to=cmetcalf@tilera.com \
--cc=jonas@southpole.se \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).