diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2008-05-09 02:26:35 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-05-14 18:55:35 -0400 |
commit | 3633c7308005e8c1dab594f69ef904424f8b639a (patch) | |
tree | 0e215ec13d73a86d70da3f721adab14e7f4a510a /arch/ia64/kernel/entry.S | |
parent | f13ae30e1397e3bfb38feb3b6e889af5d021f13d (diff) |
[IA64] fix interrupt masking for pending works on kernel leave
[Bug-fix for "[BUG?][2.6.25-mm1] sleeping during IRQ disabled"]
This patch does:
- enable interrupts before calling schedule() as same as others, ex. x86
- enable interrupts during ia64_do_signal() and ia64_sync_krbs()
- do_notify_resume_user() is still called with interrupts disabled, since
we can take short path of fsys_mode if-statement quickly.
- pfm_handle_work() is also called with interrupts disabled, since
it can deal interrupt mask within itself.
- fix/add some comments/notes
Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/entry.S')
-rw-r--r-- | arch/ia64/kernel/entry.S | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index e49ad8c5dc69..ef6b0313c857 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 |
@@ -1170,8 +1173,8 @@ skip_rbs_switch: | |||
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 |
1177 | rsm psr.i // disable interrupts | 1180 | rsm psr.i // disable interrupts |
@@ -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) |