git: tsc: Factor out rdtsc_ordered()

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Wed Jun 3 20:23:35 PDT 2015


commit ea9728cac4b72010117b60e0ef32827a631c5046
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Mon Jun 1 21:41:44 2015 +0800

    tsc: Factor out rdtsc_ordered()
    
    Use lfence on Intel and mfence on AMD to make sure that all instructions
    before rdtsc are completed.
    
    While I'm here
    - Remove redundant functions declaration in lwkt_thread.c to unbreak
      compile.
    - Add cpu_vendor_id for vkernel64; extra work is needed to set it to a
      proper value.

Summary of changes:
 sys/cpu/i386/include/cpufunc.h             | 15 +++++++++++++++
 sys/cpu/x86_64/include/cpufunc.h           | 15 +++++++++++++++
 sys/kern/lwkt_thread.c                     |  5 -----
 sys/platform/pc64/isa/clock.c              |  9 +++------
 sys/platform/vkernel64/include/md_var.h    |  1 +
 sys/platform/vkernel64/x86_64/vm_machdep.c |  2 ++
 6 files changed, 36 insertions(+), 11 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ea9728cac4b72010117b60e0ef32827a631c5046


-- 
DragonFly BSD source repository



More information about the Commits mailing list