Review Board 2.0.15


Simulation.py: Bug in setting switch_cpus

Review Request #954 - Created Dec. 25, 2011 and discarded

Information
Nilay Vaish
gem5
default
Reviewers
Default
Simulation.py: Bug in setting switch_cpus
switch_cpus is being set whenever the CPU class is specified. This
results in error when restoring from a checkpoint as switch_cpus
are not connected to anything.

   
Posted (Jan. 1, 2012, 8:40 a.m.)
See comment below. Also, please put information in your commit message about when something breaks and how this fixes it. 
  1. If that line of code is present, then on restoring from a checkpoint
    with a timing cpu (and not atomic cpu) enabled, the following error
    is received --
    
    panic: Pio port not connected to anything!
    @ cycle 0
    [init:build/X86_FS/dev/io_device.cc, line 74]
    Memory Usage: 3370604 KBytes
    Program aborted at cycle 0
    
    It is the pio port of switch_cpus.interrupts which is not attached to
    anything. Hence, we need to remove this particular line. To me it seems
    that switch_cpus variable is required only when the option for switching
    cpus has been specified. This is means that the line should appear 
    where this option is being checked, where it already does appear.
    In fact, I don't even see the point in creating switch_cpus variable
    with out checking this particular option.
configs/common/Simulation.py (Diff revision 1)
 
 
Does normal switching fo CPUs work with this code removed?  I guess you removed to for ruby running with a timing cpu? 
  1. As I said above, this line again appears under the option
    for switched cpus. Therefore, I expect switching of CPUs
    to work as before.
    
    Secondly, this change has nothing to do with Ruby. It is about
    restoring from a checkpoint with a timing cpu.