Commit 92f3b57c authored by Stéphane Eranian's avatar Stéphane Eranian Committed by David Mosberger

[PATCH] ia64: minor perfmon fixes

- remove extra include of asm/perfmon.h
- fix a bug if PFM_LOAD_CONTEXT by which it would not return an
  error if the task already had a context attached.
parent 922e56d1
...@@ -4322,6 +4322,7 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) ...@@ -4322,6 +4322,7 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
ret = pfm_reserve_session(current, ctx->ctx_fl_system, the_cpu); ret = pfm_reserve_session(current, ctx->ctx_fl_system, the_cpu);
if (ret) goto error; if (ret) goto error;
ret = -EBUSY;
/* /*
* task is necessarily stopped at this point. * task is necessarily stopped at this point.
* *
...@@ -4331,6 +4332,10 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) ...@@ -4331,6 +4332,10 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
* *
* XXX: needs to be atomic * XXX: needs to be atomic
*/ */
DPRINT(("[%d] before cmpxchg() old_ctx=%p new_ctx=%p\n",
current->pid,
thread->pfm_context, ctx));
old = ia64_cmpxchg("acq", &thread->pfm_context, NULL, ctx, sizeof(pfm_context_t *)); old = ia64_cmpxchg("acq", &thread->pfm_context, NULL, ctx, sizeof(pfm_context_t *));
if (old != NULL) { if (old != NULL) {
DPRINT(("load_pid [%d] already has a context\n", req->load_pid)); DPRINT(("load_pid [%d] already has a context\n", req->load_pid));
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/elf.h> #include <asm/elf.h>
#include <asm/perfmon.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/sal.h> #include <asm/sal.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment