diff options
Diffstat (limited to 'arch/x86/include/asm/i387.h')
-rw-r--r-- | arch/x86/include/asm/i387.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h index 71c9e5183982..4aab52f8e41a 100644 --- a/arch/x86/include/asm/i387.h +++ b/arch/x86/include/asm/i387.h | |||
@@ -305,18 +305,18 @@ static inline void kernel_fpu_end(void) | |||
305 | /* | 305 | /* |
306 | * Some instructions like VIA's padlock instructions generate a spurious | 306 | * Some instructions like VIA's padlock instructions generate a spurious |
307 | * DNA fault but don't modify SSE registers. And these instructions | 307 | * DNA fault but don't modify SSE registers. And these instructions |
308 | * get used from interrupt context aswell. To prevent these kernel instructions | 308 | * get used from interrupt context as well. To prevent these kernel instructions |
309 | * in interrupt context interact wrongly with other user/kernel fpu usage, we | 309 | * in interrupt context interacting wrongly with other user/kernel fpu usage, we |
310 | * should use them only in the context of irq_ts_save/restore() | 310 | * should use them only in the context of irq_ts_save/restore() |
311 | */ | 311 | */ |
312 | static inline int irq_ts_save(void) | 312 | static inline int irq_ts_save(void) |
313 | { | 313 | { |
314 | /* | 314 | /* |
315 | * If we are in process context, we are ok to take a spurious DNA fault. | 315 | * If in process context and not atomic, we can take a spurious DNA fault. |
316 | * Otherwise, doing clts() in process context require pre-emption to | 316 | * Otherwise, doing clts() in process context requires disabling preemption |
317 | * be disabled or some heavy lifting like kernel_fpu_begin() | 317 | * or some heavy lifting like kernel_fpu_begin() |
318 | */ | 318 | */ |
319 | if (!in_interrupt()) | 319 | if (!in_atomic()) |
320 | return 0; | 320 | return 0; |
321 | 321 | ||
322 | if (read_cr0() & X86_CR0_TS) { | 322 | if (read_cr0() & X86_CR0_TS) { |