HomeFreeBSD

Add a custom implementation of cpu_lock_delay() for x86.

Description

Add a custom implementation of cpu_lock_delay() for x86.

Avoid using DELAY() since it can try to use spin locks on CPUs without
a P-state invariant TSC. For cpu_lock_delay(), always use the TSC if
it exists (even if it is not P-state invariant) to delay for a
microsecond. If the TSC does not exist, read from I/O port 0x84 to
delay instead.

PR: 228768
Reported by: Roger Hammerstein <cheeky.m@live.com>
Reviewed by: kib
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D17851

Details

Provenance
jhbAuthored on
Reviewer
kib
Differential Revision
D17851: Add a custom implementation of cpu_lock_delay() for x86.
Parents
rS340169: elfdump: Add -E to test if a file is an ELF binary.
Branches
Unknown
Tags
Unknown