1 // SPDX-License-Identifier: GPL-2.0 1 2 /* 3 * Copyright(C) 2015 Linaro Limited. All right 4 * Author: Mathieu Poirier <mathieu.poirier@li 5 */ 6 7 #include <string.h> 8 #include <linux/coresight-pmu.h> 9 #include <linux/perf_event.h> 10 #include <linux/string.h> 11 12 #include "arm-spe.h" 13 #include "hisi-ptt.h" 14 #include "../../../util/cpumap.h" 15 #include "../../../util/pmu.h" 16 #include "../../../util/cs-etm.h" 17 #include "../../arm64/util/mem-events.h" 18 19 void perf_pmu__arch_init(struct perf_pmu *pmu) 20 { 21 struct perf_cpu_map *intersect; 22 23 #ifdef HAVE_AUXTRACE_SUPPORT 24 if (!strcmp(pmu->name, CORESIGHT_ETM_P 25 /* add ETM default config here 26 pmu->auxtrace = true; 27 pmu->selectable = true; 28 pmu->perf_event_attr_init_defa 29 #if defined(__aarch64__) 30 } else if (strstarts(pmu->name, ARM_SP 31 pmu->auxtrace = true; 32 pmu->selectable = true; 33 pmu->is_uncore = false; 34 pmu->perf_event_attr_init_defa 35 if (strstarts(pmu->name, "arm_ 36 pmu->mem_events = perf 37 } else if (strstarts(pmu->name, HISI_P 38 pmu->auxtrace = true; 39 pmu->selectable = true; 40 #endif 41 } 42 #endif 43 /* Workaround some ARM PMU's failing t 44 intersect = perf_cpu_map__intersect(cp 45 perf_cpu_map__put(pmu->cpus); 46 pmu->cpus = intersect; 47 } 48
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.