Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334738
b: refs/heads/master
c: f47586b
h: refs/heads/master
v: v3
  • Loading branch information
Hendrik Brueckner authored and Martin Schwidefsky committed Oct 18, 2012
1 parent 813f3c4 commit 7dc8d57
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 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: cec8546638dc634824b629e33968d6c68f8b07d6
refs/heads/master: f47586b24c43adadd19c7e3f532a601d6eed728d
2 changes: 1 addition & 1 deletion trunk/arch/s390/include/asm/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <asm/cpu_mf.h>

/* CPU-measurement counter facility */
#define PERF_CPUM_CF_MAX_CTR 160
#define PERF_CPUM_CF_MAX_CTR 256

/* Per-CPU flags for PMU states */
#define PMU_F_RESERVED 0x1000
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/s390/kernel/perf_cpum_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static int get_counter_set(u64 event)
set = CPUMF_CTR_SET_USER;
else if (event < 128)
set = CPUMF_CTR_SET_CRYPTO;
else if (event < 160)
else if (event < 256)
set = CPUMF_CTR_SET_EXT;

return set;
Expand Down Expand Up @@ -138,6 +138,10 @@ static int validate_ctr_version(const struct hw_perf_event *hwc)
case CPUMF_CTR_SET_EXT:
if (cpuhw->info.csvn < 1)
err = -EOPNOTSUPP;
if ((cpuhw->info.csvn == 1 && hwc->config > 159) ||
(cpuhw->info.csvn == 2 && hwc->config > 175) ||
(cpuhw->info.csvn > 2 && hwc->config > 255))
err = -EOPNOTSUPP;
break;
}

Expand Down

0 comments on commit 7dc8d57

Please sign in to comment.