diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2025-02-01 02:11:32 +0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2025-02-05 18:49:43 +0300 |
commit | 87b593d79864e6e82cb00aa3d837094a1643e272 (patch) | |
tree | 283d9daa58c98895e37442865c29f5cfb6ce5df6 /rust/helpers/helpers.c | |
parent | c771600c6af14749609b49565ffb4cac2959710d (diff) | |
download | linux-87b593d79864e6e82cb00aa3d837094a1643e272.tar.xz |
drm/i915/pmu: Drop custom hotplug code
Since commit 4ba4f1afb6a9 ("perf: Generic hotplug support for a PMU with
a scope"), there's generic support for system-wide counters and
integration with cpu hotplug.
The i915 counters are system-wide, even though the migration code
is using the wrong topology mask:
target = cpumask_any_but(topology_sibling_cpumask(cpu), cpu);
So one could think the counter has core scope rather than system scope,
which is not the case. That was never caught in tests since they would
disable just one cpu at a time. After the removal of hotpluggable CPU0
in commit 5475abbde77f ("x86/smpboot: Remove the CPU0 hotplug kludge")
and commit e59e74dc48a3 ("x86/topology: Remove CPU0 hotplug option")
this became essentially non-testable for our systems.
Using the generic hotplug code, the same cpu0 is still reported in
cpumask - only if it was possible to unplug it, it would migrate to
another cpu, so there isn't much a change in behavior.
The one thing that changes is the return code for perf_event_open() if
an invalid cpu is used: previously i915 would return -EINVAL, but
generic perf code returns -ENODEV. That should be ok for all the users
and not cause breakages.
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131231304.4151998-2-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions