* [PATCH 0/2] platform/x86: ISST: SST-PP failure handling
@ 2026-08-11 22:21 Srinivas Pandruvada
2026-08-11 22:21 ` [PATCH 1/2] platform/x86: ISST: Return error during profile addition Srinivas Pandruvada
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Srinivas Pandruvada @ 2026-08-11 22:21 UTC (permalink / raw)
To: ilpo.jarvinen, hansg
Cc: platform-driver-x86, linux-kernel, sammiee5311, Srinivas Pandruvada
Some optimizations to fail on SST-PP and add sst_instance check
for a package.
This series is dependent on series "platform/x86: ISST: Validate
inputs."
Srinivas Pandruvada (2):
platform/x86: ISST: Return error during profile addition
platform/x86: ISST: Add a NULL check for sst_inst[]
.../x86/intel/speed_select_if/isst_tpmi_core.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] platform/x86: ISST: Return error during profile addition 2026-08-11 22:21 [PATCH 0/2] platform/x86: ISST: SST-PP failure handling Srinivas Pandruvada @ 2026-08-11 22:21 ` Srinivas Pandruvada 2026-08-11 22:21 ` [PATCH 2/2] platform/x86: ISST: Add a NULL check for sst_inst[] Srinivas Pandruvada 2026-08-18 14:07 ` [PATCH 0/2] platform/x86: ISST: SST-PP failure handling Ilpo Järvinen 2 siblings, 0 replies; 4+ messages in thread From: Srinivas Pandruvada @ 2026-08-11 22:21 UTC (permalink / raw) To: ilpo.jarvinen, hansg Cc: platform-driver-x86, linux-kernel, sammiee5311, Srinivas Pandruvada, stable If sst_add_perf_profiles() fails for memory allocation, it continues to allow SST-CP (core-power) feature. But in practice this is not very useful as to achieve some frequencies via SST-CP, an SST-PP (perf-profile) level change is required. Fixes: 0ab147bb840f ("platform/x86: ISST: Parse SST MMIO and update instance") Cc: HyeongJun An <sammiee5311@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> --- .../x86/intel/speed_select_if/isst_tpmi_core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c index a8c89970993c..68c3a06004eb 100644 --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c @@ -339,7 +339,7 @@ static int sst_add_perf_profiles(struct auxiliary_device *auxdev, if (!pd_info->perf_levels) { pd_info->pp_header.allowed_level_mask = 0; pd_info->pp_header.level_en_mask = 0; - return 0; + return -ENOMEM; } pd_info->ratio_unit = pd_info->pp_header.ratio_unit; @@ -370,7 +370,7 @@ static int sst_add_perf_profiles(struct auxiliary_device *auxdev, static int sst_main(struct auxiliary_device *auxdev, struct tpmi_per_power_domain_info *pd_info) { struct device *dev = &auxdev->dev; - int i, mask, levels; + int i, ret, mask, levels; *((u64 *)&pd_info->sst_header) = readq(pd_info->sst_base); pd_info->sst_header.cp_offset *= 8; @@ -402,8 +402,12 @@ static int sst_main(struct auxiliary_device *auxdev, struct tpmi_per_power_domai levels = i; mask <<= 1; } + + ret = sst_add_perf_profiles(auxdev, pd_info, levels + 1); + if (ret) + return ret; + pd_info->max_level = levels; - sst_add_perf_profiles(auxdev, pd_info, levels + 1); return 0; } -- 2.55.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] platform/x86: ISST: Add a NULL check for sst_inst[] 2026-08-11 22:21 [PATCH 0/2] platform/x86: ISST: SST-PP failure handling Srinivas Pandruvada 2026-08-11 22:21 ` [PATCH 1/2] platform/x86: ISST: Return error during profile addition Srinivas Pandruvada @ 2026-08-11 22:21 ` Srinivas Pandruvada 2026-08-18 14:07 ` [PATCH 0/2] platform/x86: ISST: SST-PP failure handling Ilpo Järvinen 2 siblings, 0 replies; 4+ messages in thread From: Srinivas Pandruvada @ 2026-08-11 22:21 UTC (permalink / raw) To: ilpo.jarvinen, hansg Cc: platform-driver-x86, linux-kernel, sammiee5311, Srinivas Pandruvada, stable To be consistent with other places, add a NULL check for failed socket loading by checking isst_common.sst_inst[]. Fixes: d805456c712f ("platform/x86: ISST: Enumerate TPMI SST and create framework") Cc: stable@vger.kernel.org Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> --- drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c index 68c3a06004eb..e6d370907c01 100644 --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c @@ -1433,6 +1433,8 @@ static int isst_if_get_tpmi_instance_count(void __user *argp) return -EINVAL; sst_inst = isst_common.sst_inst[tpmi_inst.socket_id]; + if (!sst_inst) + return -EINVAL; tpmi_inst.count = isst_instance_count(sst_inst); -- 2.55.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] platform/x86: ISST: SST-PP failure handling 2026-08-11 22:21 [PATCH 0/2] platform/x86: ISST: SST-PP failure handling Srinivas Pandruvada 2026-08-11 22:21 ` [PATCH 1/2] platform/x86: ISST: Return error during profile addition Srinivas Pandruvada 2026-08-11 22:21 ` [PATCH 2/2] platform/x86: ISST: Add a NULL check for sst_inst[] Srinivas Pandruvada @ 2026-08-18 14:07 ` Ilpo Järvinen 2 siblings, 0 replies; 4+ messages in thread From: Ilpo Järvinen @ 2026-08-18 14:07 UTC (permalink / raw) To: hansg, Srinivas Pandruvada; +Cc: platform-driver-x86, linux-kernel, sammiee5311 On Tue, 11 Aug 2026 15:21:32 -0700, Srinivas Pandruvada wrote: > Some optimizations to fail on SST-PP and add sst_instance check > for a package. > > This series is dependent on series "platform/x86: ISST: Validate > inputs." > > Srinivas Pandruvada (2): > platform/x86: ISST: Return error during profile addition > platform/x86: ISST: Add a NULL check for sst_inst[] > > [...] 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: ISST: Return error during profile addition commit: 4ff76db9d76cc13e83d60ea6650ee19ec97d0106 [2/2] platform/x86: ISST: Add a NULL check for sst_inst[] commit: 47e50bee2a2cbb70b9a479c22c959a79857d9531 -- i. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-18 14:08 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-08-11 22:21 [PATCH 0/2] platform/x86: ISST: SST-PP failure handling Srinivas Pandruvada 2026-08-11 22:21 ` [PATCH 1/2] platform/x86: ISST: Return error during profile addition Srinivas Pandruvada 2026-08-11 22:21 ` [PATCH 2/2] platform/x86: ISST: Add a NULL check for sst_inst[] Srinivas Pandruvada 2026-08-18 14:07 ` [PATCH 0/2] platform/x86: ISST: SST-PP failure handling Ilpo Järvinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®