From: Jonas Bonn <jonas@southpole.se>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Cc: Jonas Bonn <jonas@southpole.se>
Subject: [PATCH RFC 0/8] Signal: harmonize syscall restart logic
Date: Sun, 23 Oct 2011 12:19:54 +0200 [thread overview]
Message-ID: <cover.1319364492.git.jonas@southpole.se> (raw)
I've been looking into trying to harmonize the architecture specific
signal handling code. With a couple of helper functions to mask some
of the architecture specific bits, the code for do_signal and handle_signal
(implemented by essentially everybody) start to look identical across
all arch's and could likely be made generic.
The big helper is the one in this series. This one moves the syscall
restart logic out to a common helper. The arch specific bit here is
the register manipulations required to actually effect the restart;
this patch series moves those manipulations to the asm/syscall.h header
which already attempts to define a generic syscall interface for several
arch's today.
Where this series remains an RFC is due to a couple of open questions:
i) ARM (and a few arch's copied from it) does its restart logic in two
steps so that a debugger can intervene; is there still value in
this approach or would the single step approach in this patch series
be sufficient for ARM (and others)?
ii) The syscall.h interface requires that the information needed to do
the register manipulations be in the pt_regs struct. This isn't
the case for all arch's today. Are there any issues with putting that
info into pt_regs for those arch's?
With the rest of the cleanups in this series it currently comes to 64
patches, so I'm just posting a couple of the syscall restart patches
now for comment in order not to flood the lists. I'll post the remainder
of the series later based on the feedback from this series.
/Jonas
Jonas Bonn (8):
signal: introduce generic syscall restart logic
blackfin: implement syscall restart generically
frv: implement syscall restart generically
mips: implement syscall restart generically
x86: implement syscall restart generically
m68k: implement syscall restart generically
ia64: implement syscall restart generically
tile: implement syscall restart generically
arch/blackfin/include/asm/syscall.h | 26 +++++++++-
arch/blackfin/kernel/signal.c | 47 +-----------------
arch/frv/include/asm/syscall.h | 23 ++++++++-
arch/frv/kernel/signal.c | 48 +-----------------
arch/ia64/include/asm/syscall.h | 21 ++++++++
arch/ia64/kernel/signal.c | 54 +--------------------
arch/m68k/include/asm/syscall.h | 87 +++++++++++++++++++++++++++++++++
arch/m68k/kernel/signal_mm.c | 45 +----------------
arch/m68k/kernel/signal_no.c | 46 +----------------
arch/mips/include/asm/syscall.h | 91 +++++++++++++++++++++++++++++++++++
arch/mips/kernel/signal.c | 40 +--------------
arch/tile/include/asm/syscall.h | 28 ++++++++++-
arch/tile/kernel/signal.c | 52 ++------------------
arch/x86/include/asm/syscall.h | 21 ++++++++
arch/x86/kernel/signal.c | 43 +---------------
include/asm-generic/syscall.h | 46 +++++++++++++++++-
include/linux/signal.h | 3 +
kernel/signal.c | 72 +++++++++++++++++++++++++++-
18 files changed, 435 insertions(+), 358 deletions(-)
create mode 100644 arch/m68k/include/asm/syscall.h
create mode 100644 arch/mips/include/asm/syscall.h
--
1.7.5.4
next reply other threads:[~2011-10-23 10:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-23 10:19 Jonas Bonn [this message]
2011-10-23 10:19 ` [PATCH RFC 0/8] Signal: harmonize syscall restart logic 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
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=cover.1319364492.git.jonas@southpole.se \
--to=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).