Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1161122
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/4] x86, mwaitt: add monitorx and mwaitx instruction |
| Date | 2015-06-09 10:30 +0200 |
| Message-ID | <pzn4Z-Yi-11@gated-at.bofh.it> (permalink) |
| References | <pzieZ-2kK-3@gated-at.bofh.it> <pzieZ-2kK-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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));
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/4] x86, mwaitt: add monitorx and mwaitx instruction Huang Rui <ray.huang@amd.com> - 2015-06-09 05:20 +0200
Re: [PATCH v2 1/4] x86, mwaitt: add monitorx and mwaitx instruction Peter Zijlstra <peterz@infradead.org> - 2015-06-09 10:30 +0200
Re: [PATCH v2 1/4] x86, mwaitt: add monitorx and mwaitx instruction Huang Rui <ray.huang@amd.com> - 2015-06-10 04:50 +0200
csiph-web