Drop scratch register for 0x1a/0x80
Subsystems (2)
cover Drop scratch register for 0x1a/0x80
This platform doesn't support idle mask in scratch register. Drop it and make sure matching debugfs doesn't show up to return an error.
Mario Limonciello (2):
platform/x86/amd: pmc: Only create amd_pmc_idlemask if scratch defined platform/x86/amd: pmc: Drop scratch_reg from amd_1ah_m80_cpu_info
drivers/platform/x86/amd/pmc/pmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/2 platform/x86/amd: pmc: Only create amd_pmc_idlemask if scratch defined
If the scratch register isn't defined for a platform, the debugfs file will always fail. Only create it when declared.
--- drivers/platform/x86/amd/pmc/pmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/platform/x86/amd/pmc/pmc.c +3 -2
@@ -517,8 +517,9 @@ static void amd_pmc_dbgfs_register(struct amd_pmc_dev *dev) &smu_fw_info_fops);debugfs_create_file ("s0ix_stats" ,0644 , dev->dbgfs_dir, dev, &s0ix_stats_fops); -debugfs_create_file ("amd_pmc_idlemask" ,0644 , dev->dbgfs_dir, dev, - &amd_pmc_idlemask_fops); +if (dev->cpu_info->scratch_reg) +debugfs_create_file ("amd_pmc_idlemask" ,0644 , dev->dbgfs_dir, dev, + &amd_pmc_idlemask_fops); }static char *amd_pmc_get_msg_port (struct amd_pmc_dev *dev)
Signature · 1 line
2.43.0
PATCH 2/2 platform/x86/amd: pmc: Drop scratch_reg from amd_1ah_m80_cpu_info
In reply to Mario LimoncielloThis platform does no longer populate this register.
--- drivers/platform/x86/amd/pmc/pmc.c | 1 - 1 file changed, 1 deletion(-)
drivers/platform/x86/amd/pmc/pmc.c +0 -1
@@ -182,7 +182,6 @@ static const struct amd_pmc_cpu_info amd_1ah_m80_cpu_info = { .smu_arg = AMD_PMC_REGISTER_ARG_1AH_80H, .smu_rsp = AMD_PMC_REGISTER_RSP_1AH_80H, .num_ips = ARRAY_SIZE(soc15_ip_blk_v3), - .scratch_reg = AMD_PMC_SCRATCH_REG_1AH, .ips_ptr = soc15_ip_blk_v3, .os_hint = MSG_OS_HINT_RN, };
Signature · 1 line
2.43.0
Ilpo Järvinen
maintainerQuoted 8 lines · Mario Limonciello
This platform doesn't support idle mask in scratch register. Drop it and make sure matching debugfs doesn't show up to return an error.
Mario Limonciello (2):
platform/x86/amd: pmc: Only createamd_pmc_idlemaskif scratch defined platform/x86/amd: pmc: Dropscratch_regfromamd_1ah_m80_cpu_info[...]
Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also fixes are mostly routed through for-next unless the fix is for a commit introduced in the most recent cycle or is clearly a regression fix.
The list of commits applied:
[1/2] platform/x86/amd: pmc: Only create amd_pmc_idlemask if scratch defined
commit: 4f368b44557c0adba84ee4e790f5a85f6e3043c1
[2/2] platform/x86/amd: pmc: Drop scratch_reg from amd_1ah_m80_cpu_info
commit: 4234b341f1c2e24a38e490d8ac6067cd6ef7f1ca--
i.