diff options
| author | Kan Liang <kan.liang@linux.intel.com> | 2023-01-12 12:01:01 -0800 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2023-01-21 00:06:11 +0100 |
| commit | dbf061b26221fa1a99e6489dd61f5b4ee97a24e8 (patch) | |
| tree | 58f0211c5963e2b5c9131e47d15937abdf674206 /arch/x86/events/intel/uncore.h | |
| parent | perf/core: Call perf_prepare_sample() before running BPF (diff) | |
| download | linux-dbf061b26221fa1a99e6489dd61f5b4ee97a24e8.tar.gz linux-dbf061b26221fa1a99e6489dd61f5b4ee97a24e8.zip | |
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
Diffstat (limited to 'arch/x86/events/intel/uncore.h')
| -rw-r--r-- | arch/x86/events/intel/uncore.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/events/intel/uncore.h b/arch/x86/events/intel/uncore.h index e278e2e7c051..8d493bea9eb6 100644 --- a/arch/x86/events/intel/uncore.h +++ b/arch/x86/events/intel/uncore.h @@ -208,6 +208,7 @@ struct pci2phy_map { struct pci2phy_map *__find_pci2phy_map(int segment); int uncore_pcibus_to_dieid(struct pci_bus *bus); int uncore_die_to_segment(int die); +int uncore_device_to_die(struct pci_dev *dev); ssize_t uncore_event_show(struct device *dev, struct device_attribute *attr, char *buf); |
