xref: /openbmc/linux/tools/perf/arch/s390/util/pmu.c (revision 745b7908)
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 struct perf_event_attr *perf_pmu__get_default_config(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 	return NULL;
23 }
24