Skip to content

Commit

Permalink
i387: fix sense of sanity check
Browse files Browse the repository at this point in the history
The check for save_init_fpu() (introduced in commit 5b1cbac: "i387:
make irq_fpu_usable() tests more robust") was the wrong way around, but
I hadn't noticed, because my "tests" were bogus: the FPU exceptions are
disabled by default, so even doing a divide by zero never actually
triggers this code at all unless you do extra work to enable them.

So if anybody did enable them, they'd get one spurious warning.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Feb 15, 2012
1 parent 7ada1dd commit c38e234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/i387.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ static inline void irq_ts_restore(int TS_state)
*/
static inline void save_init_fpu(struct task_struct *tsk)
{
WARN_ON_ONCE(task_thread_info(tsk)->status & TS_USEDFPU);
WARN_ON_ONCE(!(task_thread_info(tsk)->status & TS_USEDFPU));
preempt_disable();
__save_init_fpu(tsk);
stts();
Expand Down

0 comments on commit c38e234

Please sign in to comment.