lkml.org 
[lkml]   [2012]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 8/8] x86, cleanups: Simplify sync_core() in the case of no CPUID
On 11/28/2012 12:41 PM, Borislav Petkov wrote:
>
> While at it, you could correct this comment to adhere to kernel coding
> style:
>
> /*
> * cpuid is a barrier...
> * ...
> */
>
>> + asm volatile("cpuid" : "=a" (tmp) : "0" (1)
>> + : "ebx", "ecx", "edx", "memory");
>
> ... and then write this in its shorter form:
>
> tmp = cpuid_eax(1);
>
> to have it a bit easier on the eyes.
>

Thinking about it some more, there is another reason to not do this,
which is that we don't want this particular CPUID to be paravirtualized;
we're after the synchronizing side effect, not the CPUID return value
itself.

So let's leave it as a primitive; it gets too confusing otherwise.

-hpa




\
 
 \ /
  Last update: 2012-11-29 22:41    [W:0.156 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site