]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
perf evsel: Fix incorrect handling of type _TERM_DRV_CFG
authorMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 10 Jan 2018 20:46:51 +0000 (13:46 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 11 Jan 2018 14:56:07 +0000 (11:56 -0300)
Commit ("d0565132605f perf evsel: Enable type checking for
perf_evsel_config_term types") assumes PERF_EVSEL__CONFIG_TERM_DRV_CFG
isn't used and as such adds a BUG_ON().

Since the enumeration type is used in macro ADD_CONFIG_TERM() the change
break CoreSight trace acquisition.

This patch restores the original code.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: d0565132605f ("perf evsel: Enable type checking for perf_evsel_config_term types")
Link: http://lkml.kernel.org/r/1515617211-32024-1-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c

index d934f04e3110ed5bcbccb16971ef2c9336d6065c..4eea3b404507be87ab6435d0971b97a82f571cf6 100644 (file)
@@ -781,7 +781,7 @@ static void apply_config_terms(struct perf_evsel *evsel,
                        attr->write_backward = term->val.overwrite ? 1 : 0;
                        break;
                case PERF_EVSEL__CONFIG_TERM_DRV_CFG:
-                       BUG_ON(1);
+                       break;
                default:
                        break;
                }