diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2007-01-08 16:28:06 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@athena.road.mcmartin.ca> | 2007-02-17 01:06:04 -0500 |
commit | 4650f0a5832033c78690811aa9b171764c11fc0f (patch) | |
tree | 8f201cd0f556780b5300d0f0e93e30eb31839190 /arch/parisc/kernel/entry.S | |
parent | 0bbdac0897a48f415eb788bf3263c92bd5e97ffb (diff) |
[PARISC] Add TIF_RESTORE_SIGMASK support
And unmask the pselect6/ppoll system calls.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc/kernel/entry.S')
-rw-r--r-- | arch/parisc/kernel/entry.S | 141 |
1 files changed, 58 insertions, 83 deletions
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 39a12c1fc6f5..f965673e6863 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -978,11 +978,39 @@ intr_check_resched: | |||
978 | LDREG TI_FLAGS(%r1),%r19 /* sched.h: TIF_NEED_RESCHED */ | 978 | LDREG TI_FLAGS(%r1),%r19 /* sched.h: TIF_NEED_RESCHED */ |
979 | bb,<,n %r19,31-TIF_NEED_RESCHED,intr_do_resched /* forward */ | 979 | bb,<,n %r19,31-TIF_NEED_RESCHED,intr_do_resched /* forward */ |
980 | 980 | ||
981 | .import do_notify_resume,code | ||
981 | intr_check_sig: | 982 | intr_check_sig: |
982 | /* As above */ | 983 | /* As above */ |
983 | mfctl %cr30,%r1 | 984 | mfctl %cr30,%r1 |
984 | LDREG TI_FLAGS(%r1),%r19 /* sched.h: TIF_SIGPENDING */ | 985 | LDREG TI_FLAGS(%r1),%r19 |
985 | bb,<,n %r19, 31-TIF_SIGPENDING, intr_do_signal /* forward */ | 986 | load32 (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK), %r20 |
987 | and,COND(<>) %r19, %r20, %r0 | ||
988 | b,n intr_restore /* skip past if we've nothing to do */ | ||
989 | |||
990 | /* This check is critical to having LWS | ||
991 | * working. The IASQ is zero on the gateway | ||
992 | * page and we cannot deliver any signals until | ||
993 | * we get off the gateway page. | ||
994 | * | ||
995 | * Only do signals if we are returning to user space | ||
996 | */ | ||
997 | LDREG PT_IASQ0(%r16), %r20 | ||
998 | CMPIB= 0,%r20,intr_restore /* backward */ | ||
999 | nop | ||
1000 | LDREG PT_IASQ1(%r16), %r20 | ||
1001 | CMPIB= 0,%r20,intr_restore /* backward */ | ||
1002 | nop | ||
1003 | |||
1004 | copy %r0, %r25 /* long in_syscall = 0 */ | ||
1005 | #ifdef CONFIG_64BIT | ||
1006 | ldo -16(%r30),%r29 /* Reference param save area */ | ||
1007 | #endif | ||
1008 | |||
1009 | BL do_notify_resume,%r2 | ||
1010 | copy %r16, %r26 /* struct pt_regs *regs */ | ||
1011 | |||
1012 | b intr_check_sig | ||
1013 | nop | ||
986 | 1014 | ||
987 | intr_restore: | 1015 | intr_restore: |
988 | copy %r16,%r29 | 1016 | copy %r16,%r29 |
@@ -1072,35 +1100,6 @@ intr_do_preempt: | |||
1072 | b,n intr_restore /* ssm PSW_SM_I done by intr_restore */ | 1100 | b,n intr_restore /* ssm PSW_SM_I done by intr_restore */ |
1073 | #endif /* CONFIG_PREEMPT */ | 1101 | #endif /* CONFIG_PREEMPT */ |
1074 | 1102 | ||
1075 | .import do_signal,code | ||
1076 | intr_do_signal: | ||
1077 | /* | ||
1078 | This check is critical to having LWS | ||
1079 | working. The IASQ is zero on the gateway | ||
1080 | page and we cannot deliver any signals until | ||
1081 | we get off the gateway page. | ||
1082 | |||
1083 | Only do signals if we are returning to user space | ||
1084 | */ | ||
1085 | LDREG PT_IASQ0(%r16), %r20 | ||
1086 | CMPIB= 0,%r20,intr_restore /* backward */ | ||
1087 | nop | ||
1088 | LDREG PT_IASQ1(%r16), %r20 | ||
1089 | CMPIB= 0,%r20,intr_restore /* backward */ | ||
1090 | nop | ||
1091 | |||
1092 | copy %r0, %r24 /* unsigned long in_syscall */ | ||
1093 | copy %r16, %r25 /* struct pt_regs *regs */ | ||
1094 | #ifdef CONFIG_64BIT | ||
1095 | ldo -16(%r30),%r29 /* Reference param save area */ | ||
1096 | #endif | ||
1097 | |||
1098 | BL do_signal,%r2 | ||
1099 | copy %r0, %r26 /* sigset_t *oldset = NULL */ | ||
1100 | |||
1101 | b intr_check_sig | ||
1102 | nop | ||
1103 | |||
1104 | /* | 1103 | /* |
1105 | * External interrupts. | 1104 | * External interrupts. |
1106 | */ | 1105 | */ |
@@ -2024,32 +2023,6 @@ sys32_sigaltstack_wrapper: | |||
2024 | nop | 2023 | nop |
2025 | #endif | 2024 | #endif |
2026 | 2025 | ||
2027 | .export sys_rt_sigsuspend_wrapper | ||
2028 | sys_rt_sigsuspend_wrapper: | ||
2029 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1 | ||
2030 | ldo TASK_REGS(%r1),%r24 | ||
2031 | reg_save %r24 | ||
2032 | |||
2033 | STREG %r2, -RP_OFFSET(%r30) | ||
2034 | #ifdef CONFIG_64BIT | ||
2035 | ldo FRAME_SIZE(%r30), %r30 | ||
2036 | BL sys_rt_sigsuspend,%r2 | ||
2037 | ldo -16(%r30),%r29 /* Reference param save area */ | ||
2038 | #else | ||
2039 | BL sys_rt_sigsuspend,%r2 | ||
2040 | ldo FRAME_SIZE(%r30), %r30 | ||
2041 | #endif | ||
2042 | |||
2043 | ldo -FRAME_SIZE(%r30), %r30 | ||
2044 | LDREG -RP_OFFSET(%r30), %r2 | ||
2045 | |||
2046 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1 | ||
2047 | ldo TASK_REGS(%r1),%r1 | ||
2048 | reg_restore %r1 | ||
2049 | |||
2050 | bv %r0(%r2) | ||
2051 | nop | ||
2052 | |||
2053 | .export syscall_exit | 2026 | .export syscall_exit |
2054 | syscall_exit: | 2027 | syscall_exit: |
2055 | 2028 | ||
@@ -2115,9 +2088,35 @@ syscall_check_resched: | |||
2115 | LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* long */ | 2088 | LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* long */ |
2116 | bb,<,n %r19, 31-TIF_NEED_RESCHED, syscall_do_resched /* forward */ | 2089 | bb,<,n %r19, 31-TIF_NEED_RESCHED, syscall_do_resched /* forward */ |
2117 | 2090 | ||
2091 | .import do_signal,code | ||
2118 | syscall_check_sig: | 2092 | syscall_check_sig: |
2119 | LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* get ti flags */ | 2093 | LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 |
2120 | bb,<,n %r19, 31-TIF_SIGPENDING, syscall_do_signal /* forward */ | 2094 | load32 (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK), %r26 |
2095 | and,COND(<>) %r19, %r26, %r0 | ||
2096 | b,n syscall_restore /* skip past if we've nothing to do */ | ||
2097 | |||
2098 | syscall_do_signal: | ||
2099 | /* Save callee-save registers (for sigcontext). | ||
2100 | * FIXME: After this point the process structure should be | ||
2101 | * consistent with all the relevant state of the process | ||
2102 | * before the syscall. We need to verify this. | ||
2103 | */ | ||
2104 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 | ||
2105 | ldo TASK_REGS(%r1), %r26 /* struct pt_regs *regs */ | ||
2106 | reg_save %r26 | ||
2107 | |||
2108 | #ifdef CONFIG_64BIT | ||
2109 | ldo -16(%r30),%r29 /* Reference param save area */ | ||
2110 | #endif | ||
2111 | |||
2112 | BL do_notify_resume,%r2 | ||
2113 | ldi 1, %r25 /* long in_syscall = 1 */ | ||
2114 | |||
2115 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 | ||
2116 | ldo TASK_REGS(%r1), %r20 /* reload pt_regs */ | ||
2117 | reg_restore %r20 | ||
2118 | |||
2119 | b,n syscall_check_sig | ||
2121 | 2120 | ||
2122 | syscall_restore: | 2121 | syscall_restore: |
2123 | /* Are we being ptraced? */ | 2122 | /* Are we being ptraced? */ |
@@ -2256,30 +2255,6 @@ syscall_do_resched: | |||
2256 | b syscall_check_bh /* if resched, we start over again */ | 2255 | b syscall_check_bh /* if resched, we start over again */ |
2257 | nop | 2256 | nop |
2258 | 2257 | ||
2259 | .import do_signal,code | ||
2260 | syscall_do_signal: | ||
2261 | /* Save callee-save registers (for sigcontext). | ||
2262 | FIXME: After this point the process structure should be | ||
2263 | consistent with all the relevant state of the process | ||
2264 | before the syscall. We need to verify this. */ | ||
2265 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 | ||
2266 | ldo TASK_REGS(%r1), %r25 /* struct pt_regs *regs */ | ||
2267 | reg_save %r25 | ||
2268 | |||
2269 | ldi 1, %r24 /* unsigned long in_syscall */ | ||
2270 | |||
2271 | #ifdef CONFIG_64BIT | ||
2272 | ldo -16(%r30),%r29 /* Reference param save area */ | ||
2273 | #endif | ||
2274 | BL do_signal,%r2 | ||
2275 | copy %r0, %r26 /* sigset_t *oldset = NULL */ | ||
2276 | |||
2277 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 | ||
2278 | ldo TASK_REGS(%r1), %r20 /* reload pt_regs */ | ||
2279 | reg_restore %r20 | ||
2280 | |||
2281 | b,n syscall_check_sig | ||
2282 | |||
2283 | /* | 2258 | /* |
2284 | * get_register is used by the non access tlb miss handlers to | 2259 | * get_register is used by the non access tlb miss handlers to |
2285 | * copy the value of the general register specified in r8 into | 2260 | * copy the value of the general register specified in r8 into |