[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 02/15] x86/msr: Move rdtsc{,_ordered}() to <asm/tsc.h>



On 5/2/2025 1:18 AM, Ingo Molnar wrote:

* Xin Li (Intel) <xin@xxxxxxxxx> wrote:

For some reason, there are some TSC-related functions in the MSR
   ^^^^^^^^^^^^^^^
header even though there is a tsc.h header.

The real reason is that the rdtsc{,_ordered}() methods use the
EAX_EDX_*() macros to optimize their EDX/EAX assembly accessors, which
is why these methods were in <asm/msr.h>.

Your followup patch tacitly acknowledges this by silently creating
duplicate copies of these facilities in both headers ...

I've cleaned it all up in tip:x86/msr via these preparatory patches:

   x86/msr: Improve the comments of the 
DECLARE_ARGS()/EAX_EDX_VAL()/EAX_EDX_RET() facility
   x86/msr: Rename DECLARE_ARGS() to EAX_EDX_DECLARE_ARGS
   x86/msr: Move the EAX_EDX_*() methods from <asm/msr.h> to <asm/asm.h>


Brilliant!



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.