diff options
Diffstat (limited to 'arch/ia64/kernel/perfmon.c')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index c1ad27de2dd2..71d05133f556 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -5013,12 +5013,13 @@ pfm_context_force_terminate(pfm_context_t *ctx, struct pt_regs *regs) | |||
5013 | } | 5013 | } |
5014 | 5014 | ||
5015 | static int pfm_ovfl_notify_user(pfm_context_t *ctx, unsigned long ovfl_pmds); | 5015 | static int pfm_ovfl_notify_user(pfm_context_t *ctx, unsigned long ovfl_pmds); |
5016 | |||
5016 | /* | 5017 | /* |
5017 | * pfm_handle_work() can be called with interrupts enabled | 5018 | * pfm_handle_work() can be called with interrupts enabled |
5018 | * (TIF_NEED_RESCHED) or disabled. The down_interruptible | 5019 | * (TIF_NEED_RESCHED) or disabled. The down_interruptible |
5019 | * call may sleep, therefore we must re-enable interrupts | 5020 | * call may sleep, therefore we must re-enable interrupts |
5020 | * to avoid deadlocks. It is safe to do so because this function | 5021 | * to avoid deadlocks. It is safe to do so because this function |
5021 | * is called ONLY when returning to user level (PUStk=1), in which case | 5022 | * is called ONLY when returning to user level (pUStk=1), in which case |
5022 | * there is no risk of kernel stack overflow due to deep | 5023 | * there is no risk of kernel stack overflow due to deep |
5023 | * interrupt nesting. | 5024 | * interrupt nesting. |
5024 | */ | 5025 | */ |
@@ -5034,7 +5035,8 @@ pfm_handle_work(void) | |||
5034 | 5035 | ||
5035 | ctx = PFM_GET_CTX(current); | 5036 | ctx = PFM_GET_CTX(current); |
5036 | if (ctx == NULL) { | 5037 | if (ctx == NULL) { |
5037 | printk(KERN_ERR "perfmon: [%d] has no PFM context\n", task_pid_nr(current)); | 5038 | printk(KERN_ERR "perfmon: [%d] has no PFM context\n", |
5039 | task_pid_nr(current)); | ||
5038 | return; | 5040 | return; |
5039 | } | 5041 | } |
5040 | 5042 | ||
@@ -5058,11 +5060,12 @@ pfm_handle_work(void) | |||
5058 | /* | 5060 | /* |
5059 | * must be done before we check for simple-reset mode | 5061 | * must be done before we check for simple-reset mode |
5060 | */ | 5062 | */ |
5061 | if (ctx->ctx_fl_going_zombie || ctx->ctx_state == PFM_CTX_ZOMBIE) goto do_zombie; | 5063 | if (ctx->ctx_fl_going_zombie || ctx->ctx_state == PFM_CTX_ZOMBIE) |
5062 | 5064 | goto do_zombie; | |
5063 | 5065 | ||
5064 | //if (CTX_OVFL_NOBLOCK(ctx)) goto skip_blocking; | 5066 | //if (CTX_OVFL_NOBLOCK(ctx)) goto skip_blocking; |
5065 | if (reason == PFM_TRAP_REASON_RESET) goto skip_blocking; | 5067 | if (reason == PFM_TRAP_REASON_RESET) |
5068 | goto skip_blocking; | ||
5066 | 5069 | ||
5067 | /* | 5070 | /* |
5068 | * restore interrupt mask to what it was on entry. | 5071 | * restore interrupt mask to what it was on entry. |
@@ -5110,7 +5113,8 @@ do_zombie: | |||
5110 | /* | 5113 | /* |
5111 | * in case of interruption of down() we don't restart anything | 5114 | * in case of interruption of down() we don't restart anything |
5112 | */ | 5115 | */ |
5113 | if (ret < 0) goto nothing_to_do; | 5116 | if (ret < 0) |
5117 | goto nothing_to_do; | ||
5114 | 5118 | ||
5115 | skip_blocking: | 5119 | skip_blocking: |
5116 | pfm_resume_after_ovfl(ctx, ovfl_regs, regs); | 5120 | pfm_resume_after_ovfl(ctx, ovfl_regs, regs); |