diff options
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r-- | arch/x86/include/asm/processor.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 63def9537a2d..984a7bf17f6a 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -389,9 +389,9 @@ struct thread_struct { | |||
389 | unsigned short fsindex; | 389 | unsigned short fsindex; |
390 | unsigned short gsindex; | 390 | unsigned short gsindex; |
391 | #endif | 391 | #endif |
392 | #ifdef CONFIG_X86_32 | 392 | |
393 | unsigned long ip; | 393 | u32 status; /* thread synchronous flags */ |
394 | #endif | 394 | |
395 | #ifdef CONFIG_X86_64 | 395 | #ifdef CONFIG_X86_64 |
396 | unsigned long fsbase; | 396 | unsigned long fsbase; |
397 | unsigned long gsbase; | 397 | unsigned long gsbase; |
@@ -438,6 +438,15 @@ struct thread_struct { | |||
438 | }; | 438 | }; |
439 | 439 | ||
440 | /* | 440 | /* |
441 | * Thread-synchronous status. | ||
442 | * | ||
443 | * This is different from the flags in that nobody else | ||
444 | * ever touches our thread-synchronous status, so we don't | ||
445 | * have to worry about atomic accesses. | ||
446 | */ | ||
447 | #define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/ | ||
448 | |||
449 | /* | ||
441 | * Set IOPL bits in EFLAGS from given mask | 450 | * Set IOPL bits in EFLAGS from given mask |
442 | */ | 451 | */ |
443 | static inline void native_set_iopl_mask(unsigned mask) | 452 | static inline void native_set_iopl_mask(unsigned mask) |
@@ -724,8 +733,6 @@ static inline void spin_lock_prefetch(const void *x) | |||
724 | .addr_limit = KERNEL_DS, \ | 733 | .addr_limit = KERNEL_DS, \ |
725 | } | 734 | } |
726 | 735 | ||
727 | extern unsigned long thread_saved_pc(struct task_struct *tsk); | ||
728 | |||
729 | /* | 736 | /* |
730 | * TOP_OF_KERNEL_STACK_PADDING reserves 8 bytes on top of the ring0 stack. | 737 | * TOP_OF_KERNEL_STACK_PADDING reserves 8 bytes on top of the ring0 stack. |
731 | * This is necessary to guarantee that the entire "struct pt_regs" | 738 | * This is necessary to guarantee that the entire "struct pt_regs" |
@@ -776,17 +783,13 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); | |||
776 | .addr_limit = KERNEL_DS, \ | 783 | .addr_limit = KERNEL_DS, \ |
777 | } | 784 | } |
778 | 785 | ||
779 | /* | ||
780 | * Return saved PC of a blocked thread. | ||
781 | * What is this good for? it will be always the scheduler or ret_from_fork. | ||
782 | */ | ||
783 | #define thread_saved_pc(t) READ_ONCE_NOCHECK(*(unsigned long *)((t)->thread.sp - 8)) | ||
784 | |||
785 | #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.sp0 - 1) | 786 | #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.sp0 - 1) |
786 | extern unsigned long KSTK_ESP(struct task_struct *task); | 787 | extern unsigned long KSTK_ESP(struct task_struct *task); |
787 | 788 | ||
788 | #endif /* CONFIG_X86_64 */ | 789 | #endif /* CONFIG_X86_64 */ |
789 | 790 | ||
791 | extern unsigned long thread_saved_pc(struct task_struct *tsk); | ||
792 | |||
790 | extern void start_thread(struct pt_regs *regs, unsigned long new_ip, | 793 | extern void start_thread(struct pt_regs *regs, unsigned long new_ip, |
791 | unsigned long new_sp); | 794 | unsigned long new_sp); |
792 | 795 | ||