lkml.org 
[lkml]   [2020]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86, smpboot: Disable frequency invariance when it's unsupported
Date
On the Intel SNR processors such as "Intel Atom(R) C6562", the
turbo_freq for 4C turbo may be zero which causes a divide by zero
exception and blocks the boot process when arch_scale_freq_tick().

When one of the preset base_freq or turbo_freq is meaningless,
we may disable frequency invariance.

Fixes: 1567c3e3467c ("x86, sched: Add support for frequency invariance")
Signed-off-by: Like Xu <like.xu@linux.intel.com>
---
arch/x86/kernel/smpboot.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index fe3ab9632f3b..741367ce4d14 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1958,6 +1958,9 @@ static bool core_set_max_freq_ratio(u64 *base_freq, u64 *turbo_freq)
*base_freq = (*base_freq >> 8) & 0xFF; /* max P state */
*turbo_freq = (*turbo_freq >> 24) & 0xFF; /* 4C turbo */

+ if (*turbo_freq == 0 || *base_freq == 0)
+ return false;
+
return true;
}

--
2.21.1
\
 
 \ /
  Last update: 2020-04-16 04:17    [W:3.139 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site