x86/uaccess: Move thread_info::addr_limit to thread_struct
struct thread_info is a legacy mess. To prepare for its partial removal, move thread_info::addr_limit out. As an added benefit, this way is simpler. Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/15bee834d09402b47ac86f2feccdf6529f9bc5b0.1468527351.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:

committed by
Ingo Molnar

parent
2a53ccbc0d
commit
13d4ea097d
@@ -57,7 +57,6 @@ struct thread_info {
|
||||
__u32 flags; /* low level flags */
|
||||
__u32 status; /* thread synchronous flags */
|
||||
__u32 cpu; /* current CPU */
|
||||
mm_segment_t addr_limit;
|
||||
};
|
||||
|
||||
#define INIT_THREAD_INFO(tsk) \
|
||||
@@ -65,7 +64,6 @@ struct thread_info {
|
||||
.task = &tsk, \
|
||||
.flags = 0, \
|
||||
.cpu = 0, \
|
||||
.addr_limit = KERNEL_DS, \
|
||||
}
|
||||
|
||||
#define init_thread_info (init_thread_union.thread_info)
|
||||
@@ -184,11 +182,6 @@ static inline unsigned long current_stack_pointer(void)
|
||||
# define cpu_current_top_of_stack (cpu_tss + TSS_sp0)
|
||||
#endif
|
||||
|
||||
/* Load thread_info address into "reg" */
|
||||
#define GET_THREAD_INFO(reg) \
|
||||
_ASM_MOV PER_CPU_VAR(cpu_current_top_of_stack),reg ; \
|
||||
_ASM_SUB $(THREAD_SIZE),reg ;
|
||||
|
||||
/*
|
||||
* ASM operand which evaluates to a 'thread_info' address of
|
||||
* the current task, if it is known that "reg" is exactly "off"
|
||||
|
Reference in New Issue
Block a user