Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hendrik Brueckner and committed by
Martin Schwidefsky
20ba46da 4d6e51c7

+3 -3
+2 -2
arch/s390/include/asm/perf_event.h
··· 1 1 /* 2 2 * Performance event support - s390 specific definitions. 3 3 * 4 - * Copyright IBM Corp. 2009, 2013 4 + * Copyright IBM Corp. 2009, 2017 5 5 * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com> 6 6 * Hendrik Brueckner <brueckner@linux.vnet.ibm.com> 7 7 */ ··· 47 47 }; 48 48 49 49 /* Perf PMU definitions for the counter facility */ 50 - #define PERF_CPUM_CF_MAX_CTR 256 50 + #define PERF_CPUM_CF_MAX_CTR 0xffffUL /* Max ctr for ECCTR */ 51 51 52 52 /* Perf PMU definitions for the sampling facility */ 53 53 #define PERF_CPUM_SF_MAX_CTR 2
+1 -1
arch/s390/kernel/perf_cpum_cf.c
··· 370 370 if (ev == -1) 371 371 return -ENOENT; 372 372 373 - if (ev >= PERF_CPUM_CF_MAX_CTR) 373 + if (ev > PERF_CPUM_CF_MAX_CTR) 374 374 return -EINVAL; 375 375 376 376 /* Use the hardware perf event structure to store the counter number