<p>Julien Viard de Galbert has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/25429">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/common/block/acpi: fix P-States extra entry<br><br>The ratio_max step is appearing twice when PSS_RATIO_STEP is 1<br><br>This is because in this case there are no rounding down of ratio_max in<br>the for loop.<br><br>Change-Id: I91090b4d87eb82b57055c24271d679d1cbb3b7a7<br>Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net><br>---<br>M src/soc/intel/common/block/acpi/acpi.c<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/25429/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c</span><br><span>index ae0617d..68fe944 100644</span><br><span>--- a/src/soc/intel/common/block/acpi/acpi.c</span><br><span>+++ b/src/soc/intel/common/block/acpi/acpi.c</span><br><span>@@ -324,7 +324,9 @@</span><br><span> </span><br><span>   /* Determine ratio points */</span><br><span>         ratio_step = PSS_RATIO_STEP;</span><br><span style="color: hsl(0, 100%, 40%);">-    num_entries = ((ratio_max - ratio_min) / ratio_step) + 1;</span><br><span style="color: hsl(120, 100%, 40%);">+     num_entries = ((ratio_max - ratio_min) / ratio_step);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (PSS_RATIO_STEP != 1)</span><br><span style="color: hsl(120, 100%, 40%);">+              num_entries += 1;</span><br><span>    if (num_entries > PSS_MAX_ENTRIES) {</span><br><span>              ratio_step += 1;</span><br><span>             num_entries = ((ratio_max - ratio_min) / ratio_step) + 1;</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/25429">change 25429</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/25429"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I91090b4d87eb82b57055c24271d679d1cbb3b7a7 </div>
<div style="display:none"> Gerrit-Change-Number: 25429 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Julien Viard de Galbert <jviarddegalbert@online.net> </div>