[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH RESEND] x86/cpu: Avoid endless loop to get the number of cache leaves
On Thu, Dec 06, 2018 at 03:26:13PM +0800, Pu Wen wrote:
> To get the number of cache leaves on AMD or Hygon platform, it should
> get the value of cpuid leaf 0x8000001d. But on certain broken platform
> such as a not fullly implemented virtual platform(for example Xen),
> the value of the cpuid leaf will nerver be CTYPE_NULL, so the kernel
> will run into an endless loop.
> To fix this problem, add a new enum type CTYPE_MAX to limit the maximum
> cpuid accessing.
> Signed-off-by: Pu Wen <>
> ---
> arch/x86/kernel/cpu/cacheinfo.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)

Did you not see my reply to this last time?


Good mailing practices for 400: avoid top-posting and trim the reply.

 \ /
  Last update: 2018-12-06 11:38    [W:0.039 / U:5.008 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site