[PATCH 5/7 v3] x86: get rid of KERNEL_STACK_OFFSET

2015-02-25 Thread Denys Vlasenko
PER_CPU_VAR(kernel_stack) was set up in a way where it points five stack slots below the top of stack. Presumably, it was done to avoid one "sub $5*8,%rsp" in syscall/sysenter code paths, where iret frame needs to be created by hand. Ironically, none of them benefit from this optimization, since

[PATCH 5/7 v3] x86: get rid of KERNEL_STACK_OFFSET

2015-02-25 Thread Denys Vlasenko
PER_CPU_VAR(kernel_stack) was set up in a way where it points five stack slots below the top of stack. Presumably, it was done to avoid one sub $5*8,%rsp in syscall/sysenter code paths, where iret frame needs to be created by hand. Ironically, none of them benefit from this optimization, since