Commit | Line | Data |
---|---|---|
8a9fd832 | 1 | // SPDX-License-Identifier: GPL-2.0 |
7e21b0d5 MP |
2 | /* |
3 | * Copyright(C) 2015 Linaro Limited. All rights reserved. | |
4 | * Author: Mathieu Poirier <mathieu.poirier@linaro.org> | |
7e21b0d5 MP |
5 | */ |
6 | ||
7 | #include <string.h> | |
8 | #include <linux/coresight-pmu.h> | |
9 | #include <linux/perf_event.h> | |
10 | ||
3becf452 | 11 | #include "cs-etm.h" |
ffd3d18c | 12 | #include "arm-spe.h" |
7e21b0d5 MP |
13 | #include "../../util/pmu.h" |
14 | ||
15 | struct perf_event_attr | |
16 | *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused) | |
17 | { | |
18 | #ifdef HAVE_AUXTRACE_SUPPORT | |
19 | if (!strcmp(pmu->name, CORESIGHT_ETM_PMU_NAME)) { | |
20 | /* add ETM default config here */ | |
21 | pmu->selectable = true; | |
3becf452 | 22 | pmu->set_drv_config = cs_etm_set_drv_config; |
ffd3d18c KP |
23 | #if defined(__aarch64__) |
24 | } else if (strstarts(pmu->name, ARM_SPE_PMU_NAME)) { | |
25 | return arm_spe_pmu_default_config(pmu); | |
26 | #endif | |
7e21b0d5 | 27 | } |
ffd3d18c | 28 | |
7e21b0d5 MP |
29 | #endif |
30 | return NULL; | |
31 | } |