[coreboot-gerrit] Change in coreboot[master]: soc/intel/common/block/acpi: fix P-States extra entry

Julien Viard de Galbert (Code Review) gerrit at coreboot.org
Thu Mar 29 15:07:57 CEST 2018


Julien Viard de Galbert has uploaded this change for review. ( https://review.coreboot.org/25429


Change subject: soc/intel/common/block/acpi: fix P-States extra entry
......................................................................

soc/intel/common/block/acpi: fix P-States extra entry

The ratio_max step is appearing twice when PSS_RATIO_STEP is 1

This is because in this case there are no rounding down of ratio_max in
the for loop.

Change-Id: I91090b4d87eb82b57055c24271d679d1cbb3b7a7
Signed-off-by: Julien Viard de Galbert <jviarddegalbert at online.net>
---
M src/soc/intel/common/block/acpi/acpi.c
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/25429/1

diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c
index ae0617d..68fe944 100644
--- a/src/soc/intel/common/block/acpi/acpi.c
+++ b/src/soc/intel/common/block/acpi/acpi.c
@@ -324,7 +324,9 @@
 
 	/* Determine ratio points */
 	ratio_step = PSS_RATIO_STEP;
-	num_entries = ((ratio_max - ratio_min) / ratio_step) + 1;
+	num_entries = ((ratio_max - ratio_min) / ratio_step);
+	if (PSS_RATIO_STEP != 1)
+		num_entries += 1;
 	if (num_entries > PSS_MAX_ENTRIES) {
 		ratio_step += 1;
 		num_entries = ((ratio_max - ratio_min) / ratio_step) + 1;

-- 
To view, visit https://review.coreboot.org/25429
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I91090b4d87eb82b57055c24271d679d1cbb3b7a7
Gerrit-Change-Number: 25429
Gerrit-PatchSet: 1
Gerrit-Owner: Julien Viard de Galbert <jviarddegalbert at online.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180329/3e2f741d/attachment-0001.html>


More information about the coreboot-gerrit mailing list