Page MenuHomeFreeBSD

x86 cpususpend_handler: call wbinvd after setting suspend state bits
ClosedPublic

Authored by avg on May 4 2018, 2:13 PM.
Tags
None
Referenced Files
F132024375: D15295.id42228.diff
Mon, Oct 13, 1:15 AM
Unknown Object (File)
Sat, Oct 11, 1:49 AM
Unknown Object (File)
Mon, Oct 6, 5:10 AM
Unknown Object (File)
Fri, Sep 26, 11:54 PM
Unknown Object (File)
Fri, Sep 19, 9:08 PM
Unknown Object (File)
Aug 26 2025, 10:02 AM
Unknown Object (File)
Aug 3 2025, 12:07 AM
Unknown Object (File)
Aug 1 2025, 6:15 PM
Subscribers
None

Details

Summary

Without a subsequent wbinvd the changes to suspended_cpus (and
resuming_cpus) can be lost at least on AMD systems that use MOESI cache
coherency protocol. That can happen because one of APs ends up as an
Owner of the corresponding cache line(s) and the changes may never reach
the main memory before the AP is reset.

While here, move clearing of suspended_cpus a little bit earlier. Also,
rework the comment that describes the need for resuming_cpus.

Test Plan

Suspend to RAM now works on a previously broken AMD system.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.May 5 2018, 4:13 PM

Take suggestions from Bruce Evans

This revision now requires review to proceed.May 7 2018, 12:12 PM
This revision was not accepted when it landed; it landed in state Needs Review.May 7 2018, 12:22 PM
This revision was automatically updated to reflect the committed changes.