lkml.org 
[lkml]   [2008]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Use v8086_mode helper, trivial unification
Harvey Harrison wrote:
>
> What do you think of:
>
> /*
> * (unsigned long)regs looks strange, but it's correct for x86_32. x86_32 CPUs
> * don't save the ss and esp registers if the CPU is already in kernel mode
> * when it traps. So &regs happens to be esp. Valid only for kernel-mode
> * pt_regs.
> */
> static inline unsigned long stack_pointer(struct pt_regs *regs)
> {
> #ifdef CONFIG_X86_32
> return (unsigned long)regs;
> #else
> return regs->sp;
> #endif
> }
>

Please highlight the last sentence better. That's a user restriction
and a highly important one.

-hpa


\
 
 \ /
  Last update: 2008-01-18 04:45    [W:0.069 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site