]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
x86: cpufunc: Add rdtsc_ordered()
authorAdam Fenn <adam@fenn.io>
Wed, 28 Jul 2021 17:12:00 +0000 (10:12 -0700)
committerKonstantin Belousov <kib@FreeBSD.org>
Sat, 14 Aug 2021 12:57:53 +0000 (15:57 +0300)
commit652ae7b11485d9f991ea66a56aa79d4dd9cd1103
treecddfcfc8796374a569d74cffc99e6b524ab29279
parent908e277230ef1a80589f85687f5b422b0e863e79
x86: cpufunc: Add rdtsc_ordered()

Add a variant of 'rdtsc()' that performs the ordered version of 'rdtsc'
appropriate for the invoking x86 variant.

Also, expose the 'lfence'-ed and 'mfence'-ed 'rdtsc()' variants needed
by 'rdtsc_ordered()' for general use.

Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D31416
sys/amd64/include/cpufunc.h
sys/i386/include/cpufunc.h
sys/x86/include/x86_var.h
sys/x86/x86/cpu_machdep.c