On 6 July 2013 01:36, Alexander Graf <ag...@suse.de> wrote: > When we create a new thread, there is no reason to reset it. I'm fairly sure > the code has mostly been left in there because nobody understood why it was > there in the first place.
We had a big discussion on this on IRC. This code is here because of commit b4558d748, which attempted to fix a breakage introduced when commit b55a37c9 made these CPUs no longer do a reset as part of their cpu_init(). However, it's in the wrong place -- this reset needs to go into cpu_copy(), so it doesn't undo the copying work done by that function. > Remove the reset. A new thread's kernel sided state should be identical to > the old one's. Just deleting the reset isn't right. We should standardize whether we think cpu_init() ought to give you a cleanly reset CPU or not (I think it should); until then, we should put a cpu_reset() immediately after cpu_init() in cpu_copy(). It doesn't need to be ifdef-guarded either. thanks -- PMM