]> xenbits.xensource.com Git - people/pauldu/xen.git/commit
x86/time: Rework pv_soft_rdtsc() to aid further cleanup
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 19 Feb 2018 14:54:57 +0000 (14:54 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 27 Feb 2018 10:47:23 +0000 (10:47 +0000)
commit5b0426207998cd1f381b46299907bbcdf8bd240d
treeb97294eabe0450e907c6e7fc053b0a60b741c7c4
parentcc0e45db277922b5723a7b1d9657d6f744230cf1
x86/time: Rework pv_soft_rdtsc() to aid further cleanup

Having pv_soft_rdtsc() emulate all parts of an rdtscp is awkward, and gets in
the way of some intended cleanup.

 * Drop the rdtscp parameter and always make the caller responsible for ecx
   updates when appropriate.
 * Switch the function from being void, and return the main timestamp in the
   return value.

The regs parameter is still needed, but only for the stats collection, once
again bringing into question their utility.  The parameter can however switch
to being const.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/pv/emul-inv-op.c
xen/arch/x86/pv/emul-priv-op.c
xen/arch/x86/time.c
xen/include/asm-x86/time.h