Commit f2dc3735 authored by Richard Henderson's avatar Richard Henderson

Merge dorothy.sfbay.redhat.com:/dorothy/rth/linux/linus-2.5

into dorothy.sfbay.redhat.com:/dorothy/rth/linux/axp-2.5
parents b46aedbc d6f7dad9
...@@ -587,6 +587,10 @@ syscall_restart(unsigned long r0, unsigned long r19, ...@@ -587,6 +587,10 @@ syscall_restart(unsigned long r0, unsigned long r19,
regs->r19 = r19; regs->r19 = r19;
regs->pc -= 4; regs->pc -= 4;
break; break;
case ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn = do_no_restart_syscall;
regs->r0 = EINTR;
break;
} }
} }
...@@ -628,13 +632,22 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw, ...@@ -628,13 +632,22 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
return 1; return 1;
} }
if (r0 && if (r0) {
(regs->r0 == ERESTARTNOHAND || switch (regs->r0) {
regs->r0 == ERESTARTSYS || case ERESTARTNOHAND:
regs->r0 == ERESTARTNOINTR)) { case ERESTARTSYS:
regs->r0 = r0; /* reset v0 and a3 and replay syscall */ case ERESTARTNOINTR:
/* Reset v0 and a3 and replay syscall. */
regs->r0 = r0;
regs->r19 = r19; regs->r19 = r19;
regs->pc -= 4; regs->pc -= 4;
break;
case ERESTART_RESTARTBLOCK:
/* Force v0 to the restart syscall and reply. */
regs->r0 = __NR_restart_syscall;
regs->pc -= 4;
break;
}
} }
if (single_stepping) if (single_stepping)
ptrace_set_bpt(current); /* re-set breakpoint */ ptrace_set_bpt(current); /* re-set breakpoint */
......
...@@ -431,6 +431,7 @@ sys_call_table: ...@@ -431,6 +431,7 @@ sys_call_table:
.quad sys_epoll_wait .quad sys_epoll_wait
.quad sys_remap_file_pages /* 410 */ .quad sys_remap_file_pages /* 410 */
.quad sys_set_tid_address .quad sys_set_tid_address
.quad sys_restart_syscall
.size sys_call_table, . - sys_call_table .size sys_call_table, . - sys_call_table
.type sys_call_table, @object .type sys_call_table, @object
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* a0 = unaligned address of the last *word* written * a0 = unaligned address of the last *word* written
* a2 = the number of full words left in COUNT * a2 = the number of full words left in COUNT
* *
* Furthermore, v0, a3-a5, t11, t12, and $at are untouched. * Furthermore, v0, a3-a5, t11, and $at are untouched.
* *
* Much of the information about 21264 scheduling/coding comes from: * Much of the information about 21264 scheduling/coding comes from:
* Compiler Writer's Guide for the Alpha 21264 * Compiler Writer's Guide for the Alpha 21264
...@@ -324,7 +324,7 @@ $u_eoc: ...@@ -324,7 +324,7 @@ $u_eoc:
extqh t2, a1, t0 # U : extract low bits for last word (stall) extqh t2, a1, t0 # U : extract low bits for last word (stall)
or t1, t0, t1 # E : (stall) or t1, t0, t1 # E : (stall)
cmpbge zero, t1, t8 # E : 1: cmpbge zero, t1, t8 # E :
mov t1, t0 # E : mov t1, t0 # E :
$u_eocfin: # end-of-count, final word $u_eocfin: # end-of-count, final word
...@@ -350,17 +350,17 @@ $unaligned: ...@@ -350,17 +350,17 @@ $unaligned:
mskql t6, a0, t6 # U : mskql t6, a0, t6 # U :
nop nop
nop nop
1: subq a1, t4, a1 # E : sub dest misalignment from src addr subq a1, t4, a1 # E : sub dest misalignment from src addr
/* If source misalignment is larger than dest misalignment, we need /* If source misalignment is larger than dest misalignment, we need
extra startup checks to avoid SEGV. */ extra startup checks to avoid SEGV. */
cmplt t4, t5, t12 # E : 1: cmplt t4, t5, t12 # E :
extql t1, a1, t1 # U : shift src into place extql t1, a1, t1 # U : shift src into place
lda t2, -1 # E : for creating masks later lda t2, -1 # E : for creating masks later
beq t12, $u_head # U : (stall) beq t12, $u_head # U : (stall)
mskqh t2, t5, t2 # U : begin src byte validity mask nop
cmpbge zero, t1, t8 # E : is there a zero? cmpbge zero, t1, t8 # E : is there a zero?
extql t2, a1, t2 # U : extql t2, a1, t2 # U :
or t8, t10, t5 # E : test for end-of-count too or t8, t10, t5 # E : test for end-of-count too
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* a0 = unaligned address of the last *word* written * a0 = unaligned address of the last *word* written
* a2 = the number of full words left in COUNT * a2 = the number of full words left in COUNT
* *
* Furthermore, v0, a3-a5, t11, t12, and $at are untouched. * Furthermore, v0, a3-a5, t11, and $at are untouched.
*/ */
#include <asm/regdef.h> #include <asm/regdef.h>
...@@ -269,7 +269,7 @@ $u_final: ...@@ -269,7 +269,7 @@ $u_final:
t1 == the shifted high-order bits from the previous source word */ t1 == the shifted high-order bits from the previous source word */
$u_eoc: $u_eoc:
and a1, 7, t6 # e1 : and a1, 7, t6 # e1 :
sll t12, t6, t6 # e0 : sll t10, t6, t6 # e0 :
and t6, 0xff, t6 # e0 : and t6, 0xff, t6 # e0 :
bne t6, 1f # .. e1 : bne t6, 1f # .. e1 :
...@@ -303,18 +303,17 @@ $unaligned: ...@@ -303,18 +303,17 @@ $unaligned:
ldq_u t0, 0(a0) # e0 : ldq_u t0, 0(a0) # e0 :
lda t6, -1 # .. e1 : lda t6, -1 # .. e1 :
mskql t6, a0, t6 # e0 : mskql t6, a0, t6 # e0 :
1:
subq a1, t4, a1 # .. e1 : sub dest misalignment from src addr subq a1, t4, a1 # .. e1 : sub dest misalignment from src addr
/* If source misalignment is larger than dest misalignment, we need /* If source misalignment is larger than dest misalignment, we need
extra startup checks to avoid SEGV. */ extra startup checks to avoid SEGV. */
cmplt t4, t5, t12 # e1 : 1: cmplt t4, t5, t12 # e1 :
extql t1, a1, t1 # .. e0 : shift src into place extql t1, a1, t1 # .. e0 : shift src into place
lda t2, -1 # e0 : for creating masks later lda t2, -1 # e0 : for creating masks later
beq t12, $u_head # e1 : beq t12, $u_head # .. e1 :
mskqh t2, t5, t2 # e0 : begin src byte validity mask nop # e0 :
cmpbge zero, t1, t8 # .. e1 : is there a zero? cmpbge zero, t1, t8 # .. e1 : is there a zero?
extql t2, a1, t2 # e0 : extql t2, a1, t2 # e0 :
or t8, t10, t5 # .. e1 : test for end-of-count too or t8, t10, t5 # .. e1 : test for end-of-count too
......
#ifndef _ALPHA_CURRENT_H #ifndef _ALPHA_CURRENT_H
#define _ALPHA_CURRENT_H #define _ALPHA_CURRENT_H
#include <asm/thread_info.h> #include <linux/thread_info.h>
#define get_current() (current_thread_info()->task + 0) #define get_current() (current_thread_info()->task + 0)
#define current get_current() #define current get_current()
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/scatterlist.h> #include <asm/scatterlist.h>
#include <asm/machvec.h> #include <asm/machvec.h>
#include <asm/io.h>
/* /*
* The following structure is used to manage multiple PCI busses. * The following structure is used to manage multiple PCI busses.
......
...@@ -25,6 +25,8 @@ struct thread_info { ...@@ -25,6 +25,8 @@ struct thread_info {
int bpt_nsaved; int bpt_nsaved;
unsigned long bpt_addr[2]; /* breakpoint handling */ unsigned long bpt_addr[2]; /* breakpoint handling */
unsigned int bpt_insn[2]; unsigned int bpt_insn[2];
struct restart_block restart_block;
}; };
/* /*
...@@ -35,6 +37,9 @@ struct thread_info { ...@@ -35,6 +37,9 @@ struct thread_info {
task: &tsk, \ task: &tsk, \
exec_domain: &default_exec_domain, \ exec_domain: &default_exec_domain, \
addr_limit: KERNEL_DS, \ addr_limit: KERNEL_DS, \
.restart_block = { \
.fn = do_no_restart_syscall, \
}, \
} }
#define init_thread_info (init_thread_union.thread_info) #define init_thread_info (init_thread_union.thread_info)
......
...@@ -349,7 +349,8 @@ ...@@ -349,7 +349,8 @@
#define __NR_sys_epoll_wait 409 #define __NR_sys_epoll_wait 409
#define __NR_remap_file_pages 410 #define __NR_remap_file_pages 410
#define __NR_set_tid_address 411 #define __NR_set_tid_address 411
#define NR_SYSCALLS 412 #define __NR_restart_syscall 412
#define NR_SYSCALLS 413
#if defined(__GNUC__) #if defined(__GNUC__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment