]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "perf test 6: Fix missing kvm module load for s390"
authorSasha Levin <sashal@kernel.org>
Wed, 28 Aug 2019 02:58:51 +0000 (22:58 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:18:13 +0000 (10:18 +0200)
This reverts commit 5f18429ae48faebefc00533cb24afdd01064754c.

Which was upstream commit 53fe307dfd309e425b171f6272d64296a54f4dff.

Ben Hutchings reports that this commit depends on new code added in
v4.18, and so is irrelevant on older kernels, and breaks the build.

Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/tests/parse-events.c

index 1a35ab044c11d307e65e1b856734a264074b4322..54af2f2e2ee4f6b724249a466e88bc1599881cf1 100644 (file)
 #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \
                             PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD)
 
-#if defined(__s390x__)
-/* Return true if kvm module is available and loaded. Test this
- * and retun success when trace point kvm_s390_create_vm
- * exists. Otherwise this test always fails.
- */
-static bool kvm_s390_create_vm_valid(void)
-{
-       char *eventfile;
-       bool rc = false;
-
-       eventfile = get_events_file("kvm-s390");
-
-       if (eventfile) {
-               DIR *mydir = opendir(eventfile);
-
-               if (mydir) {
-                       rc = true;
-                       closedir(mydir);
-               }
-               put_events_file(eventfile);
-       }
-
-       return rc;
-}
-#endif
-
 static int test__checkevent_tracepoint(struct perf_evlist *evlist)
 {
        struct perf_evsel *evsel = perf_evlist__first(evlist);
@@ -1587,7 +1561,6 @@ static struct evlist_test test__events[] = {
        {
                .name  = "kvm-s390:kvm_s390_create_vm",
                .check = test__checkevent_tracepoint,
-               .valid = kvm_s390_create_vm_valid,
                .id    = 100,
        },
 #endif