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@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;