]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/x86/intel/pmc: Add support for variable DMU offsets
authorXi Pardee <xi.pardee@linux.intel.com>
Tue, 5 May 2026 04:33:36 +0000 (21:33 -0700)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 8 May 2026 18:38:49 +0000 (21:38 +0300)
Add support for handling different DMU Die C6 offsets across platforms.
The previous implementation assumed a uniform DMU Die C6 offset for all
platforms, which is no longer valid after an upcoming change.

Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com>
Link: https://patch.msgid.link/20260505043342.2573556-6-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/pmc/arl.c
drivers/platform/x86/intel/pmc/core.c
drivers/platform/x86/intel/pmc/core.h
drivers/platform/x86/intel/pmc/mtl.c

index 95372a0807acff5e0df3c16c9c87d69c862ddedd..4d91ee010f6d0f7a85e01b2558be08f2becdc170 100644 (file)
@@ -729,6 +729,7 @@ struct pmc_dev_info arl_pmc_dev = {
        .init = arl_core_init,
        .sub_req = pmc_core_pmt_get_lpm_req,
        .ssram_hidden = true,
+       .die_c6_offset = MTL_PMT_DMU_DIE_C6_OFFSET,
 };
 
 static u32 ARL_H_PMT_DMU_GUIDS[] = {ARL_PMT_DMU_GUID, ARL_H_PMT_DMU_GUID, 0x0};
@@ -742,4 +743,5 @@ struct pmc_dev_info arl_h_pmc_dev = {
        .init = arl_h_core_init,
        .sub_req = pmc_core_pmt_get_lpm_req,
        .ssram_hidden = true,
+       .die_c6_offset = MTL_PMT_DMU_DIE_C6_OFFSET,
 };
index e0ac329e6723a1be0a107f873e4cf5c994ecc1b3..5d2e2681b0ebab886abf1da7384d471e135c393c 100644 (file)
@@ -1381,7 +1381,7 @@ void pmc_core_punit_pmt_init(struct pmc_dev *pmcdev, struct pmc_dev_info *pmc_de
                }
 
                pmcdev->punit_ep = ep;
-               pmcdev->die_c6_offset = MTL_PMT_DMU_DIE_C6_OFFSET;
+               pmcdev->die_c6_offset = pmc_dev_info->die_c6_offset;
        }
 
        if (pmc_dev_info->pc_guid) {
index f385a0eccd2c2d1e9e767de13a3f4e3a9eec6baf..ef69de160ffbca66cfbd5845d477a37fa78bfff7 100644 (file)
@@ -514,6 +514,7 @@ enum pmc_index {
  * @init:              Function to perform platform specific init action
  * @sub_req:           Function to achieve low power mode substate requirements
  * @ssram_hidden:      Some SSRAM devices are hidden on this platform
+ * @die_c6_offset:     Telemetry offset to read Die C6 residency
  */
 struct pmc_dev_info {
        u32 *dmu_guids;
@@ -530,6 +531,7 @@ struct pmc_dev_info {
        int (*init)(struct pmc_dev *pmcdev, struct pmc_dev_info *pmc_dev_info);
        int (*sub_req)(struct pmc_dev *pmcdev, struct pmc *pmc, struct telem_endpoint *ep);
        bool ssram_hidden;
+       u32 die_c6_offset;
 };
 
 extern const struct pmc_bit_map msr_map[];
index 193ebbe584023f3970fa4d68bcd2ada8a3b192b2..b724dd8c34dba67708afa71489e774e6e135b32a 100644 (file)
@@ -1003,4 +1003,5 @@ struct pmc_dev_info mtl_pmc_dev = {
        .init = mtl_core_init,
        .sub_req = pmc_core_pmt_get_lpm_req,
        .ssram_hidden = true,
+       .die_c6_offset = MTL_PMT_DMU_DIE_C6_OFFSET,
 };