]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/pmu: Return -EINVAL when selecting the inactive CPU
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 28 Nov 2017 10:55:15 +0000 (10:55 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 28 Nov 2017 17:04:40 +0000 (17:04 +0000)
commitd6cb2e0f0d1cdef9a599570cd4e3007a2915ec49
tree749dfd58e38eb4a25f98632ee13cb43ec110e068
parentf6cc42a718b61daf05bc45be14ff942b60863cbd
drm/i915/pmu: Return -EINVAL when selecting the inactive CPU

In commit 66cc73584c08 ("drm/i915/pmu: Only allow running on a single
CPU") I attempted to clarify the CPU hotplug logic in our PMU
implementation, but missed that a more logical error to return, when
attempting to initialize an event on a currently inactive CPU, is -EINVAL
rather than -ENODEV.

This is because i915 PMU explicitly disallows running counters on more
than one CPU at a time, and is not reporting that the requested CPU does
not exist, or is off-line.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171128105515.21998-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_pmu.c