platform/x86: ISST: Do Not Restore SST MSRs on CPU Online Operation
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 5 May 2025 20:27:22 +0000 (13:27 -0700)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 8 May 2025 13:04:10 +0000 (16:04 +0300)
During CPU offline/online operations, the hardware retains MSR settings.
Even if all CPUs are offlined, the package does not lose its MSR
settings.

Therefore, it is unnecessary to restore MSRs which are modified during
the online operation, and this extra step can be removed.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20250505202722.1048675-1-srinivas.pandruvada@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/speed_select_if/isst_if_common.c

index 31239a9..3c4198c 100644 (file)
@@ -198,25 +198,6 @@ void isst_resume_common(void)
 }
 EXPORT_SYMBOL_GPL(isst_resume_common);
 
-static void isst_restore_msr_local(int cpu)
-{
-       struct isst_cmd *sst_cmd;
-       int i;
-
-       mutex_lock(&isst_hash_lock);
-       for (i = 0; i < ARRAY_SIZE(punit_msr_white_list); ++i) {
-               if (!punit_msr_white_list[i])
-                       break;
-
-               hash_for_each_possible(isst_hash, sst_cmd, hnode,
-                                      punit_msr_white_list[i]) {
-                       if (!sst_cmd->mbox_cmd_type && sst_cmd->cpu == cpu)
-                               wrmsrl_safe(sst_cmd->cmd, sst_cmd->data);
-               }
-       }
-       mutex_unlock(&isst_hash_lock);
-}
-
 /**
  * isst_if_mbox_cmd_invalid() - Check invalid mailbox commands
  * @cmd: Pointer to the command structure to verify.
@@ -434,8 +415,6 @@ static int isst_if_cpu_online(unsigned int cpu)
 set_punit_id:
        isst_cpu_info[cpu].punit_cpu_id = data;
 
-       isst_restore_msr_local(cpu);
-
        return 0;
 }