perf/x86/uncore: Factor out uncore_device_to_die()
authorKan Liang <kan.liang@linux.intel.com>
Thu, 12 Jan 2023 20:01:01 +0000 (12:01 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 20 Jan 2023 23:06:11 +0000 (00:06 +0100)
commitdbf061b26221fa1a99e6489dd61f5b4ee97a24e8
tree58f0211c5963e2b5c9131e47d15937abdf674206
parent0eed28220598cd990d094b7b9f8c832c425080c0
perf/x86/uncore: Factor out uncore_device_to_die()

The same code is used to retrieve the logical die ID with a given PCI
device in both the discovery code and the code that supports a system
with > 8 nodes.

Factor out uncore_device_to_die() to replace the duplicate code.

No functional change.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Petlan <mpetlan@redhat.com>
Link: https://lore.kernel.org/r/20230112200105.733466-2-kan.liang@linux.intel.com
arch/x86/events/intel/uncore.c
arch/x86/events/intel/uncore.h
arch/x86/events/intel/uncore_discovery.c
arch/x86/events/intel/uncore_snbep.c