git: cputimer/tsc: Prevent rdtsc reordering

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


commit 59878316de1fa796e54feb16f91bf83b87629bea
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Mon Jun 1 22:19:07 2015 +0800

    cputimer/tsc: Prevent rdtsc reordering
    
    Use lfence on Intel and mfence on AMD to make sure that all instructions
    before rdtsc are completed.  This should prevent time warps, if TSC is
    selected as cputimer.

Summary of changes:
 sys/platform/pc64/isa/clock.c | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/59878316de1fa796e54feb16f91bf83b87629bea


-- 
DragonFly BSD source repository



More information about the Commits mailing list