Re: [PATCH v4 02/15] x86/msr: Move rdtsc{,_ordered}() to <asm/tsc.h>
From: Ingo Molnar
Date: Fri May 02 2025 - 04:19:07 EST
* 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>
Thanks,
Ingo