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
Unknown Object (File)
Fri, Jan 24, 12:41 PM
Unknown Object (File)
Jan 2 2025, 12:54 PM
Unknown Object (File)
Dec 26 2024, 3:31 AM
Unknown Object (File)
Dec 17 2024, 8:19 PM
Unknown Object (File)
Nov 10 2024, 4:16 PM
Unknown Object (File)
Nov 5 2024, 12:11 PM
Unknown Object (File)
Sep 27 2024, 7:01 AM
Unknown Object (File)
Sep 24 2024, 3:47 AM
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.