Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327335
b: refs/heads/master
c: 7ac2ed2
h: refs/heads/master
i:
  327333: b9702ab
  327331: f061c2a
  327327: ddad391
v: v3
  • Loading branch information
David S. Miller committed Aug 19, 2012
1 parent 41c741d commit 40e5f73
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 5344303ca8dad9881def6cfb45ad01201dba16de
refs/heads/master: 7ac2ed286f9338ea6437831096cc36ce8395b6fc
16 changes: 12 additions & 4 deletions trunk/arch/sparc/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ struct sparc_pmu {
int upper_shift;
int lower_shift;
int event_mask;
int user_bit;
int priv_bit;
int hv_bit;
int irq_bit;
int upper_nop;
Expand Down Expand Up @@ -306,6 +308,8 @@ static const struct sparc_pmu ultra3_pmu = {
.upper_shift = 11,
.lower_shift = 4,
.event_mask = 0x3f,
.user_bit = PCR_UTRACE,
.priv_bit = PCR_STRACE,
.upper_nop = 0x1c,
.lower_nop = 0x14,
.flags = (SPARC_PMU_ALL_EXCLUDES_SAME |
Expand Down Expand Up @@ -440,6 +444,8 @@ static const struct sparc_pmu niagara1_pmu = {
.upper_shift = 0,
.lower_shift = 4,
.event_mask = 0x7,
.user_bit = PCR_UTRACE,
.priv_bit = PCR_STRACE,
.upper_nop = 0x0,
.lower_nop = 0x0,
.flags = (SPARC_PMU_ALL_EXCLUDES_SAME |
Expand Down Expand Up @@ -571,7 +577,9 @@ static const struct sparc_pmu niagara2_pmu = {
.upper_shift = 19,
.lower_shift = 6,
.event_mask = 0xfff,
.hv_bit = 0x8,
.user_bit = PCR_UTRACE,
.priv_bit = PCR_STRACE,
.hv_bit = PCR_N2_HTRACE,
.irq_bit = 0x30,
.upper_nop = 0x220,
.lower_nop = 0x220,
Expand Down Expand Up @@ -771,7 +779,7 @@ static void sparc_pmu_disable(struct pmu *pmu)
cpuc->n_added = 0;

val = cpuc->pcr;
val &= ~(PCR_UTRACE | PCR_STRACE |
val &= ~(sparc_pmu->user_bit | sparc_pmu->priv_bit |
sparc_pmu->hv_bit | sparc_pmu->irq_bit);
cpuc->pcr = val;

Expand Down Expand Up @@ -1177,9 +1185,9 @@ static int sparc_pmu_event_init(struct perf_event *event)
/* We save the enable bits in the config_base. */
hwc->config_base = sparc_pmu->irq_bit;
if (!attr->exclude_user)
hwc->config_base |= PCR_UTRACE;
hwc->config_base |= sparc_pmu->user_bit;
if (!attr->exclude_kernel)
hwc->config_base |= PCR_STRACE;
hwc->config_base |= sparc_pmu->priv_bit;
if (!attr->exclude_hv)
hwc->config_base |= sparc_pmu->hv_bit;

Expand Down

0 comments on commit 40e5f73

Please sign in to comment.