Review Board 2.0.15


cpu: Fix broken thread context handover

Review Request #1565 - Created Dec. 6, 2012 and submitted - Latest diff uploaded

Information
Ali Saidi
gem5
default
Reviewers
Default
Changeset 9414:5e4e5314dd4d
---------------------------
cpu: Fix broken thread context handover

The thread context handover code used to break when multiple handovers
were performed during the same quiesce period. Previously, the thread
contexts would assign the TC pointer in the old quiesce event to the
new TC. This obviously broke in cases where multiple switches were
performed within the same quiesce period, in which case the TC pointer
in the quiesce event would point to an old CPU.

The new implementation deschedules pending quiesce events in the old
TC and schedules a new quiesce event in the new TC. The code has been
refactored to remove most of the code duplication.