]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf/amd/ibs: Add ->check_period() callback
authorRavi Bangoria <ravi.bangoria@amd.com>
Wed, 15 Jan 2025 05:44:36 +0000 (05:44 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 3 Feb 2025 10:46:06 +0000 (11:46 +0100)
commit1afbdd970f50f2e0431fae26b25d4e54e561fa7f
treee67027c74b9477d4234dde0923ea2cce616145bc
parentb2fc7b282bf7c1253b01c8da84e894539a3e709d
perf/amd/ibs: Add ->check_period() callback

IBS Fetch and IBS Op PMUs have constraints on sample period. The sample
period is verified at the time of opening an event but not at the ioctl()
interface. Hence, a user can open an event with valid period but change
it later with ioctl(). Add a ->check_period() callback to verify the
period provided at ioctl() is also valid.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/r/20250115054438.1021-8-ravi.bangoria@amd.com
arch/x86/events/amd/ibs.c