perf/x86/intel/uncore: Clear attr_update properly
authorAlexander Antonov <alexander.antonov@linux.intel.com>
Thu, 17 Nov 2022 12:28:25 +0000 (12:28 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:58:50 +0000 (11:58 +0100)
commita777b90a057519346e96b2723f6aee7c12aedff8
tree1fbc5288233ad7d0773512006949b02f0750068a
parentca77ac238c1e735cf40d3df01f6d2ef36928c493
perf/x86/intel/uncore: Clear attr_update properly

commit 6532783310e2b2f50dc13f46c49aa6546cb6e7a3 upstream.

Current clear_attr_update procedure in pmu_set_mapping() sets attr_update
field in NULL that is not correct because intel_uncore_type pmu types can
contain several groups in attr_update field. For example, SPR platform
already has uncore_alias_group to update and then UPI topology group will
be added in next patches.

Fix current behavior and clear attr_update group related to mapping only.

Fixes: bb42b3d39781 ("perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping")
Signed-off-by: Alexander Antonov <alexander.antonov@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20221117122833.3103580-4-alexander.antonov@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/events/intel/uncore_snbep.c