xref: /linux/tools/perf/arch/s390/util/pmu.c (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 /*
4  * Copyright IBM Corp. 2023
5  * Author(s): Thomas Richter <tmricht@linux.ibm.com>
6  */
7 
8 #include <string.h>
9 
10 #include "../../../util/pmu.h"
11 
12 #define	S390_PMUPAI_CRYPTO	"pai_crypto"
13 #define	S390_PMUPAI_EXT		"pai_ext"
14 #define	S390_PMUCPUM_CF		"cpum_cf"
15 
16 void perf_pmu__arch_init(struct perf_pmu *pmu)
17 {
18 	if (!strcmp(pmu->name, S390_PMUPAI_CRYPTO) ||
19 	    !strcmp(pmu->name, S390_PMUPAI_EXT) ||
20 	    !strcmp(pmu->name, S390_PMUCPUM_CF))
21 		pmu->selectable = true;
22 }
23