lkml.org 
[lkml]   [1998]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2 switch_to() puzzles

On Mon, 7 Dec 1998, Project BRAVO wrote:

> 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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.206 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site