Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191304
b: refs/heads/master
c: de902d9
h: refs/heads/master
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed May 8, 2010
1 parent 22d8c2f commit 9a08fab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 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: 6e85158cf5a2385264316870256fb6ad681156a0
refs/heads/master: de902d967feb96f2dfddfbe9dbd69dc22fd5ebcb
29 changes: 14 additions & 15 deletions trunk/arch/x86/kernel/cpu/perf_event_p4.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,21 +439,20 @@ static int p4_hw_config(struct perf_event *event)
if (p4_ht_active() && p4_ht_thread(cpu))
event->hw.config = p4_set_ht_bit(event->hw.config);

if (event->attr.type != PERF_TYPE_RAW)
return 0;

/*
* We don't control raw events so it's up to the caller
* to pass sane values (and we don't count the thread number
* on HT machine but allow HT-compatible specifics to be
* passed on)
*
* XXX: HT wide things should check perf_paranoid_cpu() &&
* CAP_SYS_ADMIN
*/
event->hw.config |= event->attr.config &
(p4_config_pack_escr(P4_ESCR_MASK_HT) |
p4_config_pack_cccr(P4_CCCR_MASK_HT));
if (event->attr.type == PERF_TYPE_RAW) {
/*
* We don't control raw events so it's up to the caller
* to pass sane values (and we don't count the thread number
* on HT machine but allow HT-compatible specifics to be
* passed on)
*
* XXX: HT wide things should check perf_paranoid_cpu() &&
* CAP_SYS_ADMIN
*/
event->hw.config |= event->attr.config &
(p4_config_pack_escr(P4_ESCR_MASK_HT) |
p4_config_pack_cccr(P4_CCCR_MASK_HT));
}

return x86_setup_perfctr(event);
}
Expand Down

0 comments on commit 9a08fab

Please sign in to comment.