Skip to contentSkip to conversation

tools/power/x86/intel-speed-select: Bug fixes for

PATCH New Srinivas Pandruvada 1 participant 3 messages Mar 3, 2020

Subsystems (2)
lore
Share & tools
lore

Srinivas Pandruvada

author maintainer
#0 lore raw

cover tools/power/x86/intel-speed-select: Bug fixes for

The latest code at 5.6-* cycle has two bugs related to CPU count and sending of CLOS_PM_QOS_CONFIG.

Srinivas Pandruvada (2):
tools/power/x86/intel-speed-select: Fix mailbox usage for
CLOS_PM_QOS_CONFIG
tools/power/x86/intel-speed-select: Fix last cpu number

 tools/power/x86/intel-speed-select/isst-config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.24.1
author maintainer
#1 lore raw

PATCH 1/2 tools/power/x86/intel-speed-select: Fix mailbox usage for CLOS_PM_QOS_CONFIG

Even for the products using MMIO, this message needs to be sent via mail box. The previous fix done for this didn't properly address this. That fix simply removed sending command via MMIO, but still didn't trigger sending via mailbox.

Add additional condition to check for CLOS_PM_QOS_CONFIG, when MMIO is supported on a platform.

Fixes cd0e63706549 (tools/power/x86/intel-speed-select: Use mailbox for CLOS_PM_QOS_CONFIG)
---
 tools/power/x86/intel-speed-select/isst-config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/power/x86/intel-speed-select/isst-config.c +2 -1
index 0cf3548681f8..50db0cd23d8c 100644
@@ -572,7 +572,8 @@ int isst_send_mbox_command(unsigned int cpu, unsigned char command,
 		"mbox_send: cpu:%d command:%x sub_command:%x parameter:%x req_data:%x\n",
 		cpu, command, sub_command, parameter, req_data);
 
-	if (isst_platform_info.mmio_supported && command == CONFIG_CLOS) {
+	if (isst_platform_info.mmio_supported && command == CONFIG_CLOS &&
+	    sub_command != CLOS_PM_QOS_CONFIG) {
 		unsigned int value;
 		int write = 0;
 		int clos_id, core_id, ret = 0;
Signature · 1 line
2.24.1
author maintainer
#2 lore raw

PATCH 2/2 tools/power/x86/intel-speed-select: Fix last cpu number

In reply to Srinivas Pandruvada

Here topology_max_cpus is used for total CPU count, not the last CPU number. So remove "-1".

---
 tools/power/x86/intel-speed-select/isst-config.c | 1 -
 1 file changed, 1 deletion(-)
tools/power/x86/intel-speed-select/isst-config.c +0 -1
index 50db0cd23d8c..c922cfd7ba50 100644
@@ -313,7 +313,6 @@ static void set_max_cpu_num(void)
 	while (fscanf(filep, "%lx,", &dummy) == 1)
 		topo_max_cpus += BITMASK_SIZE;
 	fclose(filep);
-	topo_max_cpus--; /* 0 based */
 
 	debug_printf("max cpus %d\n", topo_max_cpus);
 }
Signature · 1 line
2.24.1