s390/cpum_cf: update counter numbers to ecctr limits
Use the highest counter number that can be specified for the ecctr (extract CPU counter) instruction for perf. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
4d6e51c740
commit
20ba46da36
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Performance event support - s390 specific definitions.
|
* Performance event support - s390 specific definitions.
|
||||||
*
|
*
|
||||||
* Copyright IBM Corp. 2009, 2013
|
* Copyright IBM Corp. 2009, 2017
|
||||||
* Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
|
* Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
|
||||||
* Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
|
* Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
|
||||||
*/
|
*/
|
||||||
|
@ -47,7 +47,7 @@ struct perf_sf_sde_regs {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Perf PMU definitions for the counter facility */
|
/* Perf PMU definitions for the counter facility */
|
||||||
#define PERF_CPUM_CF_MAX_CTR 256
|
#define PERF_CPUM_CF_MAX_CTR 0xffffUL /* Max ctr for ECCTR */
|
||||||
|
|
||||||
/* Perf PMU definitions for the sampling facility */
|
/* Perf PMU definitions for the sampling facility */
|
||||||
#define PERF_CPUM_SF_MAX_CTR 2
|
#define PERF_CPUM_SF_MAX_CTR 2
|
||||||
|
|
|
@ -370,7 +370,7 @@ static int __hw_perf_event_init(struct perf_event *event)
|
||||||
if (ev == -1)
|
if (ev == -1)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
if (ev >= PERF_CPUM_CF_MAX_CTR)
|
if (ev > PERF_CPUM_CF_MAX_CTR)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* Use the hardware perf event structure to store the counter number
|
/* Use the hardware perf event structure to store the counter number
|
||||||
|
|
Loading…
Reference in New Issue