mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

The die ID in the Linux topology sysfs is a logical identifier that differs from the one presented in CPUID leaf 0x1F or via MSR 0x54. Introduce an interface that returns the Linux CPU die ID based on a given package ID and power domain ID. This mapping is stored during the CPU online callback in an array. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20250508230250.1186619-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
19 lines
506 B
C
19 lines
506 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Mapping of TPMI power domain and CPUs
|
|
*
|
|
* Copyright (c) 2024, Intel Corporation.
|
|
*/
|
|
|
|
#ifndef _TPMI_POWER_DOMAINS_H_
|
|
#define _TPMI_POWER_DOMAINS_H_
|
|
|
|
#include <linux/cpumask.h>
|
|
|
|
int tpmi_get_linux_cpu_number(int package_id, int die_id, int punit_core_id);
|
|
int tpmi_get_punit_core_number(int cpu_no);
|
|
int tpmi_get_power_domain_id(int cpu_no);
|
|
cpumask_t *tpmi_get_power_domain_mask(int cpu_no);
|
|
int tpmi_get_linux_die_id(int pkg_id, int domain_id);
|
|
|
|
#endif
|