lkml.org 
[lkml]   [2015]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/4] x86, mwaitt: add monitorx and mwaitx instruction
On Tue, Jun 09, 2015 at 11:13:38AM +0800, Huang Rui wrote:
>
> MWAITX ECX[1]: enable timer if set
> MWAITX EBX[31:0]: max wait time expressed in SW P0 clocks
>
> The software P0 frequency is the same as the TSC frequency.
>
> Max timeout = EBX/(TSC frequency)

^ that, would make a lovely comment for this v

> +static inline void __mwaitx(unsigned long eax, unsigned long ebx,
> + unsigned long ecx)
> +{
> + /* "mwaitx %eax, %ebx, %ecx;" */
> + asm volatile(".byte 0x0f, 0x01, 0xfb;"
> + :: "a" (eax), "b" (ebx), "c" (ecx));
> +}


\
 
 \ /
  Last update: 2015-06-09 10:41    [W:0.317 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site