This patch is unrelated to switching back from detailedd. I have still  
not finished fixing everything (and, when I get a chance, I need to  
post some questions about it).

I'm not sure why this patch is needed, since in takeOverFrom, at that  
point, _status is set to Running. Then, later on, when resume is  
called, since _status is Running, schedule is called. The only thing I  
could think of that would mess up that process would be if the status  
changed again before resume got called. If that was occurring, then  
that should probably be fixed instead of calling the schedule early.

I could not locate any discussion context related to this patch, but I  
did ask a related question some time back (see "Switching back to  
already used CPUs"). I was able to work around the problem by using  
fresh processors every time, but that is, of course, not a general  
solution.

        - Clint

On Jan 6, 2009, at 6:02 PM, nathan binkert wrote:

> I feel like I'm missing some context with this patch (though I will
> admit to not following the mailing list very closely after the last
> few months.  Was this the solution to us not being able to switch back
> to timing from detailed?  Can you write up a commit message?
>
> At first glance, it seems correct.  I'll just double check, and when I
> get your commit message, I'll apply it.
>
> Thanks for the patch!
>
>  Nate
>
>
>
> On Mon, Jan 5, 2009 at 12:16 AM, David A. Ramos <[email protected]>  
> wrote:
>> # HG changeset patch
>> # User David Ramos <[email protected]>
>> # Date 1231142438 18000
>> # Node ID 122cc03013a106e722593bee490d4b8210c623a4
>> # Parent  50c9d48de3caa629a27408bf5f3423656ae15da1
>> [mq]: switchtotimingsimplecpu.diff
>>
>> diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc
>> --- a/src/cpu/simple/timing.cc
>> +++ b/src/cpu/simple/timing.cc
>> @@ -194,6 +194,7 @@
>>        ThreadContext *tc = threadContexts[i];
>>        if (tc->status() == ThreadContext::Active && _status !=  
>> Running) {
>>            _status = Running;
>> +            schedule(fetchEvent, nextCycle());
>>            break;
>>        }
>>    }
>> _______________________________________________
>> m5-dev mailing list
>> [email protected]
>> http://m5sim.org/mailman/listinfo/m5-dev
>>
>>
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev

_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to