forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/tools/testing/selftests/powerpc/pmu/per_event_excludes.c
....@@ -1,6 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright 2014, Michael Ellerman, IBM Corp.
3
- * Licensed under GPLv2.
44 */
55
66 #define _GNU_SOURCE
....@@ -23,12 +23,9 @@
2323 static int per_event_excludes(void)
2424 {
2525 struct event *e, events[4];
26
- char *platform;
2726 int i;
2827
29
- platform = (char *)get_auxv_entry(AT_BASE_PLATFORM);
30
- FAIL_IF(!platform);
31
- SKIP_IF(strcmp(platform, "power8") != 0);
28
+ SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07));
3229
3330 /*
3431 * We need to create the events disabled, otherwise the running/enabled