diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-14 06:19:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-14 06:19:59 -0400 |
commit | 8d7ccaa545490cdffdfaff0842436a8dd85cf47b (patch) | |
tree | 8129b5907161bc6ae26deb3645ce1e280c5e1f51 /include/asm-x86/i387.h | |
parent | b2139aa0eec330c711c5a279db361e5ef1178e78 (diff) | |
parent | 30a2f3c60a84092c8084dfe788b710f8d0768cd4 (diff) |
Merge commit 'v2.6.27-rc3' into x86/prototypes
Conflicts:
include/asm-x86/dma-mapping.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/i387.h')
-rw-r--r-- | include/asm-x86/i387.h | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index 487898923830..b1733601df95 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -138,60 +138,6 @@ static inline void __save_init_fpu(struct task_struct *tsk) | |||
138 | task_thread_info(tsk)->status &= ~TS_USEDFPU; | 138 | task_thread_info(tsk)->status &= ~TS_USEDFPU; |
139 | } | 139 | } |
140 | 140 | ||
141 | /* | ||
142 | * Signal frame handlers. | ||
143 | */ | ||
144 | |||
145 | static inline int save_i387(struct _fpstate __user *buf) | ||
146 | { | ||
147 | struct task_struct *tsk = current; | ||
148 | int err = 0; | ||
149 | |||
150 | BUILD_BUG_ON(sizeof(struct user_i387_struct) != | ||
151 | sizeof(tsk->thread.xstate->fxsave)); | ||
152 | |||
153 | if ((unsigned long)buf % 16) | ||
154 | printk("save_i387: bad fpstate %p\n", buf); | ||
155 | |||
156 | if (!used_math()) | ||
157 | return 0; | ||
158 | clear_used_math(); /* trigger finit */ | ||
159 | if (task_thread_info(tsk)->status & TS_USEDFPU) { | ||
160 | err = save_i387_checking((struct i387_fxsave_struct __user *) | ||
161 | buf); | ||
162 | if (err) | ||
163 | return err; | ||
164 | task_thread_info(tsk)->status &= ~TS_USEDFPU; | ||
165 | stts(); | ||
166 | } else { | ||
167 | if (__copy_to_user(buf, &tsk->thread.xstate->fxsave, | ||
168 | sizeof(struct i387_fxsave_struct))) | ||
169 | return -1; | ||
170 | } | ||
171 | return 1; | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * This restores directly out of user space. Exceptions are handled. | ||
176 | */ | ||
177 | static inline int restore_i387(struct _fpstate __user *buf) | ||
178 | { | ||
179 | struct task_struct *tsk = current; | ||
180 | int err; | ||
181 | |||
182 | if (!used_math()) { | ||
183 | err = init_fpu(tsk); | ||
184 | if (err) | ||
185 | return err; | ||
186 | } | ||
187 | |||
188 | if (!(task_thread_info(current)->status & TS_USEDFPU)) { | ||
189 | clts(); | ||
190 | task_thread_info(current)->status |= TS_USEDFPU; | ||
191 | } | ||
192 | return restore_fpu_checking((__force struct i387_fxsave_struct *)buf); | ||
193 | } | ||
194 | |||
195 | #else /* CONFIG_X86_32 */ | 141 | #else /* CONFIG_X86_32 */ |
196 | 142 | ||
197 | extern void finit(void); | 143 | extern void finit(void); |