diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/include/asm/perf_event.h | 2 | ||||
-rw-r--r-- | arch/s390/kernel/perf_cpum_cf.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/s390/include/asm/perf_event.h b/arch/s390/include/asm/perf_event.h index 7941968e12b4..5f0173a31693 100644 --- a/arch/s390/include/asm/perf_event.h +++ b/arch/s390/include/asm/perf_event.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <asm/cpu_mf.h> | 9 | #include <asm/cpu_mf.h> |
10 | 10 | ||
11 | /* CPU-measurement counter facility */ | 11 | /* CPU-measurement counter facility */ |
12 | #define PERF_CPUM_CF_MAX_CTR 160 | 12 | #define PERF_CPUM_CF_MAX_CTR 256 |
13 | 13 | ||
14 | /* Per-CPU flags for PMU states */ | 14 | /* Per-CPU flags for PMU states */ |
15 | #define PMU_F_RESERVED 0x1000 | 15 | #define PMU_F_RESERVED 0x1000 |
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index 9871b1971ed7..c4e7269d4a09 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c | |||
@@ -94,7 +94,7 @@ static int get_counter_set(u64 event) | |||
94 | set = CPUMF_CTR_SET_USER; | 94 | set = CPUMF_CTR_SET_USER; |
95 | else if (event < 128) | 95 | else if (event < 128) |
96 | set = CPUMF_CTR_SET_CRYPTO; | 96 | set = CPUMF_CTR_SET_CRYPTO; |
97 | else if (event < 160) | 97 | else if (event < 256) |
98 | set = CPUMF_CTR_SET_EXT; | 98 | set = CPUMF_CTR_SET_EXT; |
99 | 99 | ||
100 | return set; | 100 | return set; |
@@ -138,6 +138,10 @@ static int validate_ctr_version(const struct hw_perf_event *hwc) | |||
138 | case CPUMF_CTR_SET_EXT: | 138 | case CPUMF_CTR_SET_EXT: |
139 | if (cpuhw->info.csvn < 1) | 139 | if (cpuhw->info.csvn < 1) |
140 | err = -EOPNOTSUPP; | 140 | err = -EOPNOTSUPP; |
141 | if ((cpuhw->info.csvn == 1 && hwc->config > 159) || | ||
142 | (cpuhw->info.csvn == 2 && hwc->config > 175) || | ||
143 | (cpuhw->info.csvn > 2 && hwc->config > 255)) | ||
144 | err = -EOPNOTSUPP; | ||
141 | break; | 145 | break; |
142 | } | 146 | } |
143 | 147 | ||