Page MenuHomeFreeBSD

x86: cpufunc: Add rdtsc_ordered()
ClosedPublic

Authored by adam_fenn.io on Aug 5 2021, 2:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 12:52 AM
Unknown Object (File)
Fri, Nov 1, 3:40 PM
Unknown Object (File)
Sun, Oct 20, 1:49 PM
Unknown Object (File)
Tue, Oct 15, 6:24 AM
Unknown Object (File)
Oct 7 2024, 6:39 AM
Unknown Object (File)
Oct 1 2024, 1:10 PM
Unknown Object (File)
Oct 1 2024, 4:43 AM
Unknown Object (File)
Sep 30 2024, 6:02 PM

Details

Summary

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

Test Plan

Tested as part of testing D29733.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40860
Build 37749: arc lint + arc unit

Event Timeline

adam_fenn.io held this revision as a draft.
sys/x86/x86/rdtsc_ordered.c
54

I would add rdtsc_ordered_*fence() functions to cpufunc.h as well.

63

I suppose this branch did not caused a warning from the compiler? I suggest to add {} around the body of the case. Or write it as

return (cpu_is_amd ? rdtsc_ordered_mfence : rdtsc_ordered_lfence);
sys/conf/files.x86
322

Drop this file at all.

sys/i386/include/cpufunc.h
836

Move this to x86/include/md_var.h

sys/x86/x86/rdtsc_ordered.c
55

Move this to x86/cpu_machdep.c

This revision was not accepted when it landed; it landed in state Needs Review.Aug 14 2021, 12:59 PM
Closed by commit rG652ae7b11485: x86: cpufunc: Add rdtsc_ordered() (authored by adam_fenn.io, committed by kib). · Explain Why
This revision was automatically updated to reflect the committed changes.