diff options
Diffstat (limited to 'arch/x86/include/asm/thread_info.h')
-rw-r--r-- | arch/x86/include/asm/thread_info.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index 0abf7ab20ce2..ae9c2f13b476 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -207,10 +207,12 @@ static inline unsigned long current_stack_pointer(void) _ASM_SUB $(THREAD_SIZE-KERNEL_STACK_OFFSET),reg ; /* - * Same if PER_CPU_VAR(kernel_stack) is, perhaps with some offset, already in - * a certain register (to be used in assembler memory operands). + * ASM operand which evaluates to thread_info address + * if it is known that "reg" is exactly "off" bytes below stack top. + * Example (fetch thread_info->fieldname): + * mov TI_fieldname+THREAD_INFO(reg, off),%eax */ -#define THREAD_INFO(reg, off) KERNEL_STACK_OFFSET+(off)-THREAD_SIZE(reg) +#define THREAD_INFO(reg, off) ((off)-THREAD_SIZE)(reg) #endif |