diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c index 0536d3b6979ac..63e2bbf1afbcd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c @@ -52,11 +52,7 @@ static int amdgpu_perf_event_init(struct perf_event *event) return -ENOENT; /* update the hw_perf_event struct with config data */ -#if defined(HAVE_HW_PERF_EVENT_CONF_MEMBER) - hwc->conf = event->attr.config; -#else hwc->config = event->attr.config; -#endif return 0; } @@ -78,13 +74,9 @@ static void amdgpu_perf_start(struct perf_event *event, int flags) switch (pe->pmu_perf_type) { case PERF_TYPE_AMDGPU_DF: if (!(flags & PERF_EF_RELOAD)) -#if defined(HAVE_HW_PERF_EVENT_CONF_MEMBER) - pe->adev->df.funcs->pmc_start(pe->adev, hwc->conf, 1); - pe->adev->df.funcs->pmc_start(pe->adev, hwc->conf, 0); -#else pe->adev->df.funcs->pmc_start(pe->adev, hwc->config, 1); + pe->adev->df.funcs->pmc_start(pe->adev, hwc->config, 0); -#endif break; default: break; @@ -109,13 +101,8 @@ static void amdgpu_perf_read(struct perf_event *event) switch (pe->pmu_perf_type) { case PERF_TYPE_AMDGPU_DF: -#if defined(HAVE_HW_PERF_EVENT_CONF_MEMBER) - pe->adev->df.funcs->pmc_get_count(pe->adev, hwc->conf, - &count); -#else pe->adev->df.funcs->pmc_get_count(pe->adev, hwc->config, &count); -#endif break; default: count = 0; @@ -139,11 +126,7 @@ static void amdgpu_perf_stop(struct perf_event *event, int flags) switch (pe->pmu_perf_type) { case PERF_TYPE_AMDGPU_DF: -#if defined(HAVE_HW_PERF_EVENT_CONF_MEMBER) - pe->adev->df.funcs->pmc_stop(pe->adev, hwc->conf, 0); -#else pe->adev->df.funcs->pmc_stop(pe->adev, hwc->config, 0); -#endif break; default: break; @@ -173,11 +156,7 @@ static int amdgpu_perf_add(struct perf_event *event, int flags) switch (pe->pmu_perf_type) { case PERF_TYPE_AMDGPU_DF: -#if defined(HAVE_HW_PERF_EVENT_CONF_MEMBER) - retval = pe->adev->df.funcs->pmc_start(pe->adev, hwc->conf, 1); -#else retval = pe->adev->df.funcs->pmc_start(pe->adev, hwc->config, 1); -#endif break; default: return 0; @@ -205,11 +184,7 @@ static void amdgpu_perf_del(struct perf_event *event, int flags) switch (pe->pmu_perf_type) { case PERF_TYPE_AMDGPU_DF: -#if defined(HAVE_HW_PERF_EVENT_CONF_MEMBER) - pe->adev->df.funcs->pmc_stop(pe->adev, hwc->conf, 1); -#else pe->adev->df.funcs->pmc_stop(pe->adev, hwc->config, 1); -#endif break; default: break;