> Why the switch_to() macro saves on the stack the values of
> ebx, esi and edi (ebp is used by gcc because of the
> -fno-omit-frame-pointer option) ?
ebx, esi and edi have to be callee-saved on x86.
> We tried the following patch (2.1.131) and it worked just fine.
just by pure luck, switch_to() is at the end of schedule(), so esi and edi
are not used later on. I guess you compiled the kernel on UP? If you
compile the kernel as SMP sched.c already uses edi after the switch_to
call ...
> By the way, why inserting the following code in the __switch_to() function?
> As far as I know, the debug registers can only be accessed in Kernel Mode
> and (as far as I could see) Linux doesn't provide any support to change their
> values stored in TSSs.
take a look at arch/i386/kernel/ptrace.c ...
-- mingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/