aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/ia32/tls32.c7
-rw-r--r--arch/x86/kernel/process_64.c6
2 files changed, 2 insertions, 11 deletions
diff --git a/arch/x86/ia32/tls32.c b/arch/x86/ia32/tls32.c
index 1cc4340de3ca..cac4b26b5895 100644
--- a/arch/x86/ia32/tls32.c
+++ b/arch/x86/ia32/tls32.c
@@ -85,11 +85,6 @@ asmlinkage long sys32_set_thread_area(struct user_desc __user *u_info)
85 * Get the current Thread-Local Storage area: 85 * Get the current Thread-Local Storage area:
86 */ 86 */
87 87
88#define GET_BASE(desc) ( \
89 (((desc)->a >> 16) & 0x0000ffff) | \
90 (((desc)->b << 16) & 0x00ff0000) | \
91 ( (desc)->b & 0xff000000) )
92
93#define GET_LIMIT(desc) ( \ 88#define GET_LIMIT(desc) ( \
94 ((desc)->a & 0x0ffff) | \ 89 ((desc)->a & 0x0ffff) | \
95 ((desc)->b & 0xf0000) ) 90 ((desc)->b & 0xf0000) )
@@ -117,7 +112,7 @@ int do_get_thread_area(struct thread_struct *t, struct user_desc __user *u_info)
117 112
118 memset(&info, 0, sizeof(struct user_desc)); 113 memset(&info, 0, sizeof(struct user_desc));
119 info.entry_number = idx; 114 info.entry_number = idx;
120 info.base_addr = GET_BASE(desc); 115 info.base_addr = get_desc_base(desc);
121 info.limit = GET_LIMIT(desc); 116 info.limit = GET_LIMIT(desc);
122 info.seg_32bit = GET_32BIT(desc); 117 info.seg_32bit = GET_32BIT(desc);
123 info.contents = GET_CONTENTS(desc); 118 info.contents = GET_CONTENTS(desc);
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index aa9414ed74c7..9ea1d7546f80 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -464,11 +464,7 @@ static inline void set_32bit_tls(struct task_struct *t, int tls, u32 addr)
464 464
465static inline u32 read_32bit_tls(struct task_struct *t, int tls) 465static inline u32 read_32bit_tls(struct task_struct *t, int tls)
466{ 466{
467 struct desc_struct *desc = (void *)t->thread.tls_array; 467 return get_desc_base(&t->thread.tls_array[tls]);
468 desc += tls;
469 return desc->base0 |
470 (((u32)desc->base1) << 16) |
471 (((u32)desc->base2) << 24);
472} 468}
473 469
474/* 470/*