summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ips.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2010-10-19 16:55:35 +1100
committerIngo Molnar <mingo@elte.hu>2010-10-19 09:18:34 +0200
commit57fa7214330be2e292ddb1402834ff0b221ef29a (patch)
tree7d7007dd943baf0ddda54534a2810baea85cda9d /drivers/scsi/ips.c
parent1fa41266e9d20f6d66f9d7d067d9825e2c1002b9 (diff)
downloadblackbird-op-linux-57fa7214330be2e292ddb1402834ff0b221ef29a.tar.gz
blackbird-op-linux-57fa7214330be2e292ddb1402834ff0b221ef29a.zip
perf, powerpc: Fix power_pmu_event_init to not use event->ctx
Commit c3f00c70 ("perf: Separate find_get_context() from event initialization") changed the generic perf_event code to call perf_event_alloc, which calls the arch-specific event_init code, before looking up the context for the new event. Unfortunately, power_pmu_event_init uses event->ctx->task to see whether the new event is a per-task event or a system-wide event, and thus crashes since event->ctx is NULL at the point where power_pmu_event_init gets called. (The reason it needs to know whether it is a per-task event is because there are some hardware events on Power systems which only count when the processor is not idle, and there are some fixed-function counters which count such events. For example, the "run cycles" event counts cycles when the processor is not idle. If the user asks to count cycles, we can use "run cycles" if this is a per-task event, since the processor is running when the task is running, by definition. We can't use "run cycles" if the user asks for "cycles" on a system-wide counter.) Fortunately the information we need is in the event->attach_state field, so we just use that instead. Signed-off-by: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20101019055535.GA10398@drongo> Signed-off-by: Ingo Molnar <mingo@elte.hu> Reported-by: Alexey Kardashevskiy <aik@au1.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/scsi/ips.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud