Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147267
b: refs/heads/master
c: 9aaa131
h: refs/heads/master
i:
  147265: 775dfec
  147263: d3b9d9f
v: v3
  • Loading branch information
Paul Mackerras authored and Ingo Molnar committed Apr 6, 2009
1 parent 3a51352 commit 0748147
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 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: db4fb5acf20295063d1d5105e67724eb51440207
refs/heads/master: 9aaa131a279834dff75c290c91f0058f62d72d46
9 changes: 5 additions & 4 deletions trunk/arch/powerpc/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,13 @@ hw_perf_counter_init(struct perf_counter *counter)
return NULL;
if ((s64)counter->hw_event.irq_period < 0)
return NULL;
ev = counter->hw_event.event_id;
if (!counter->hw_event.raw) {
if (ev >= ppmu->n_generic ||
ppmu->generic_events[ev] == 0)
if (!counter->hw_event.raw_type) {
ev = counter->hw_event.event_id;
if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0)
return NULL;
ev = ppmu->generic_events[ev];
} else {
ev = counter->hw_event.raw_event_id;
}
counter->hw.config_base = ev;
counter->hw.idx = 0;
Expand Down
12 changes: 12 additions & 0 deletions trunk/include/linux/perf_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <linux/types.h>
#include <linux/ioctl.h>
#include <asm/byteorder.h>

/*
* User-space ABI bits:
Expand Down Expand Up @@ -86,6 +87,7 @@ enum perf_counter_record_type {
*/
struct perf_counter_hw_event {
union {
#ifndef __BIG_ENDIAN_BITFIELD
struct {
__u64 event_id : 56,
type : 8;
Expand All @@ -94,6 +96,16 @@ struct perf_counter_hw_event {
__u64 raw_event_id : 63,
raw_type : 1;
};
#else
struct {
__u64 type : 8,
event_id : 56;
};
struct {
__u64 raw_type : 1,
raw_event_id : 63;
};
#endif /* __BIT_ENDIAN_BITFIELD */
__u64 event_config;
};

Expand Down

0 comments on commit 0748147

Please sign in to comment.