All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] how to handle ERESTART_RESTARTBLOCK ?
@ 2003-08-12  6:02 Randolph Chung
  2003-10-26  7:37 ` [parisc-linux] " Randolph Chung
  0 siblings, 1 reply; 10+ messages in thread
From: Randolph Chung @ 2003-08-12  6:02 UTC (permalink / raw)
  To: parisc-linux

I commited some broken code into 2.6 cvs just now, so now i need some
help to fix it ;-) sorry for the verbose explanation below, but i need
to write this down to make sure i understand it myself :-)

Our signal handling code was not handling ERESTART_RESTARTBLOCK
correctly. as far as I can tell, the semantics of this is that if a
syscall function returns with that error code, we are supposed to
restart the syscall, but with a new syscall number
(__NR_restart_syscall -- which we don't define at the moment)

The problem is that our syscall mechanism doesn't really allow this
(afaict). Our syscall sequence looks like this:

    ble <address of gateway page>
    ldi <syscall number>, %r20
    [ we enter the kernel at this point ]

and the way we handle restarting other syscalls is to set the iaoq back
by two insns, so we do the ble again. there's a comment about this in
the code (signal.c)

                        /* Hooray for delayed branching.  We don't
                           have to restore %r20 (the system call
                           number) because it gets loaded in the delay
                           slot of the branch external instruction. */
                        regs->gr[31] -= 8;

which is all well and good, except i don't see how we can change the
syscall number to restart it for the ERESTART_RESTARTBLOCK case.

why is it bad to just call sys_restart_syscall directly from
do_signal()?

any suggestions on how to handle this properly?

thanks
randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-10-27  5:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-12  6:02 [parisc-linux] how to handle ERESTART_RESTARTBLOCK ? Randolph Chung
2003-10-26  7:37 ` [parisc-linux] " Randolph Chung
2003-10-26  7:39   ` Randolph Chung
2003-10-26 16:49   ` Carlos O'Donell
2003-10-26 19:18     ` Randolph Chung
2003-10-26 19:53       ` John David Anglin
2003-10-26 20:59         ` Randolph Chung
2003-10-26 21:02           ` Randolph Chung
2003-10-27  4:37             ` Carlos O'Donell
2003-10-27  5:06               ` Randolph Chung

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.