perf/amd/ibs: Use ->is_visible callback for dynamic attributes
authorRavi Bangoria <ravi.bangoria@amd.com>
Mon, 9 May 2022 04:49:08 +0000 (10:19 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 11 May 2022 14:27:09 +0000 (16:27 +0200)
commit2a7a7e658682bfd7501dc6b4c9d365aa6c79788a
tree0eaf8a139624bf6d767a3937e24517f2a545a1ab
parent39b2ca75eec8a33e2ffdb8aa0c4840ec3e3b472c
perf/amd/ibs: Use ->is_visible callback for dynamic attributes

Currently, some attributes are added at build time whereas others
at boot time depending on IBS pmu capabilities. Instead, we can
just add all attribute groups at build time but hide individual
group at boot time using more appropriate ->is_visible() callback.

Also, struct perf_ibs has bunch of fields for pmu attributes which
just pass on the pointer, does not do anything else. Remove them.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220509044914.1473-3-ravi.bangoria@amd.com
arch/x86/events/amd/ibs.c