Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96797
b: refs/heads/master
c: 0fb232f
h: refs/heads/master
i:
  96795: 9e33e48
v: v3
  • Loading branch information
Hidetoshi Seto authored and Tony Luck committed May 14, 2008
1 parent 8b3789f commit b474756
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2e513fe4903c62450a9f8c3759f75bc4cd7e4dfd
refs/heads/master: 0fb232fdb2a2674003ef4b874034e872b7256aa9
16 changes: 10 additions & 6 deletions trunk/arch/ia64/kernel/perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -5013,12 +5013,13 @@ pfm_context_force_terminate(pfm_context_t *ctx, struct pt_regs *regs)
}

static int pfm_ovfl_notify_user(pfm_context_t *ctx, unsigned long ovfl_pmds);

/*
* pfm_handle_work() can be called with interrupts enabled
* (TIF_NEED_RESCHED) or disabled. The down_interruptible
* call may sleep, therefore we must re-enable interrupts
* to avoid deadlocks. It is safe to do so because this function
* is called ONLY when returning to user level (PUStk=1), in which case
* is called ONLY when returning to user level (pUStk=1), in which case
* there is no risk of kernel stack overflow due to deep
* interrupt nesting.
*/
Expand All @@ -5034,7 +5035,8 @@ pfm_handle_work(void)

ctx = PFM_GET_CTX(current);
if (ctx == NULL) {
printk(KERN_ERR "perfmon: [%d] has no PFM context\n", task_pid_nr(current));
printk(KERN_ERR "perfmon: [%d] has no PFM context\n",
task_pid_nr(current));
return;
}

Expand All @@ -5058,11 +5060,12 @@ pfm_handle_work(void)
/*
* must be done before we check for simple-reset mode
*/
if (ctx->ctx_fl_going_zombie || ctx->ctx_state == PFM_CTX_ZOMBIE) goto do_zombie;

if (ctx->ctx_fl_going_zombie || ctx->ctx_state == PFM_CTX_ZOMBIE)
goto do_zombie;

//if (CTX_OVFL_NOBLOCK(ctx)) goto skip_blocking;
if (reason == PFM_TRAP_REASON_RESET) goto skip_blocking;
if (reason == PFM_TRAP_REASON_RESET)
goto skip_blocking;

/*
* restore interrupt mask to what it was on entry.
Expand Down Expand Up @@ -5110,7 +5113,8 @@ pfm_handle_work(void)
/*
* in case of interruption of down() we don't restart anything
*/
if (ret < 0) goto nothing_to_do;
if (ret < 0)
goto nothing_to_do;

skip_blocking:
pfm_resume_after_ovfl(ctx, ovfl_regs, regs);
Expand Down

0 comments on commit b474756

Please sign in to comment.