diff options
Diffstat (limited to 'arch/ia64/kernel/entry.S')
-rw-r--r-- | arch/ia64/kernel/entry.S | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index e49ad8c5dc69..ca2bb95726de 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1156,6 +1156,9 @@ skip_rbs_switch: | |||
1156 | * r31 = current->thread_info->flags | 1156 | * r31 = current->thread_info->flags |
1157 | * On exit: | 1157 | * On exit: |
1158 | * p6 = TRUE if work-pending-check needs to be redone | 1158 | * p6 = TRUE if work-pending-check needs to be redone |
1159 | * | ||
1160 | * Interrupts are disabled on entry, reenabled depend on work, and | ||
1161 | * disabled on exit. | ||
1159 | */ | 1162 | */ |
1160 | .work_pending_syscall: | 1163 | .work_pending_syscall: |
1161 | add r2=-8,r2 | 1164 | add r2=-8,r2 |
@@ -1164,16 +1167,16 @@ skip_rbs_switch: | |||
1164 | st8 [r2]=r8 | 1167 | st8 [r2]=r8 |
1165 | st8 [r3]=r10 | 1168 | st8 [r3]=r10 |
1166 | .work_pending: | 1169 | .work_pending: |
1167 | tbit.z p6,p0=r31,TIF_NEED_RESCHED // current_thread_info()->need_resched==0? | 1170 | tbit.z p6,p0=r31,TIF_NEED_RESCHED // is resched not needed? |
1168 | (p6) br.cond.sptk.few .notify | 1171 | (p6) br.cond.sptk.few .notify |
1169 | #ifdef CONFIG_PREEMPT | 1172 | #ifdef CONFIG_PREEMPT |
1170 | (pKStk) dep r21=-1,r0,PREEMPT_ACTIVE_BIT,1 | 1173 | (pKStk) dep r21=-1,r0,PREEMPT_ACTIVE_BIT,1 |
1171 | ;; | 1174 | ;; |
1172 | (pKStk) st4 [r20]=r21 | 1175 | (pKStk) st4 [r20]=r21 |
1173 | ssm psr.i // enable interrupts | ||
1174 | #endif | 1176 | #endif |
1177 | ssm psr.i // enable interrupts | ||
1175 | br.call.spnt.many rp=schedule | 1178 | br.call.spnt.many rp=schedule |
1176 | .ret9: cmp.eq p6,p0=r0,r0 // p6 <- 1 | 1179 | .ret9: cmp.eq p6,p0=r0,r0 // p6 <- 1 (re-check) |
1177 | rsm psr.i // disable interrupts | 1180 | rsm psr.i // disable interrupts |
1178 | ;; | 1181 | ;; |
1179 | #ifdef CONFIG_PREEMPT | 1182 | #ifdef CONFIG_PREEMPT |
@@ -1182,13 +1185,13 @@ skip_rbs_switch: | |||
1182 | (pKStk) st4 [r20]=r0 // preempt_count() <- 0 | 1185 | (pKStk) st4 [r20]=r0 // preempt_count() <- 0 |
1183 | #endif | 1186 | #endif |
1184 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end | 1187 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end |
1185 | br.cond.sptk.many .work_processed_kernel // re-check | 1188 | br.cond.sptk.many .work_processed_kernel |
1186 | 1189 | ||
1187 | .notify: | 1190 | .notify: |
1188 | (pUStk) br.call.spnt.many rp=notify_resume_user | 1191 | (pUStk) br.call.spnt.many rp=notify_resume_user |
1189 | .ret10: cmp.ne p6,p0=r0,r0 // p6 <- 0 | 1192 | .ret10: cmp.ne p6,p0=r0,r0 // p6 <- 0 (don't re-check) |
1190 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end | 1193 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end |
1191 | br.cond.sptk.many .work_processed_kernel // don't re-check | 1194 | br.cond.sptk.many .work_processed_kernel |
1192 | 1195 | ||
1193 | .work_pending_syscall_end: | 1196 | .work_pending_syscall_end: |
1194 | adds r2=PT(R8)+16,r12 | 1197 | adds r2=PT(R8)+16,r12 |
@@ -1196,7 +1199,7 @@ skip_rbs_switch: | |||
1196 | ;; | 1199 | ;; |
1197 | ld8 r8=[r2] | 1200 | ld8 r8=[r2] |
1198 | ld8 r10=[r3] | 1201 | ld8 r10=[r3] |
1199 | br.cond.sptk.many .work_processed_syscall // re-check | 1202 | br.cond.sptk.many .work_processed_syscall |
1200 | 1203 | ||
1201 | END(ia64_leave_kernel) | 1204 | END(ia64_leave_kernel) |
1202 | 1205 | ||
@@ -1234,9 +1237,12 @@ GLOBAL_ENTRY(ia64_invoke_schedule_tail) | |||
1234 | END(ia64_invoke_schedule_tail) | 1237 | END(ia64_invoke_schedule_tail) |
1235 | 1238 | ||
1236 | /* | 1239 | /* |
1237 | * Setup stack and call do_notify_resume_user(). Note that pSys and pNonSys need to | 1240 | * Setup stack and call do_notify_resume_user(), keeping interrupts |
1238 | * be set up by the caller. We declare 8 input registers so the system call | 1241 | * disabled. |
1239 | * args get preserved, in case we need to restart a system call. | 1242 | * |
1243 | * Note that pSys and pNonSys need to be set up by the caller. | ||
1244 | * We declare 8 input registers so the system call args get preserved, | ||
1245 | * in case we need to restart a system call. | ||
1240 | */ | 1246 | */ |
1241 | ENTRY(notify_resume_user) | 1247 | ENTRY(notify_resume_user) |
1242 | .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) | 1248 | .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) |