diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-14 01:56:14 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-14 01:56:14 +0400 |
commit | 5b1cbac37798805c1fee18c8cebe5c0a13975b17 (patch) | |
tree | e56487f2338b236d21913f74f66a779fd71a5d7c /arch/unicore32 | |
parent | be98c2cdb15ba26148cd2bd58a857d4f7759ed38 (diff) | |
download | linux-5b1cbac37798805c1fee18c8cebe5c0a13975b17.tar.xz |
i387: make irq_fpu_usable() tests more robust
Some code - especially the crypto layer - wants to use the x86
FP/MMX/AVX register set in what may be interrupt (typically softirq)
context.
That *can* be ok, but the tests for when it was ok were somewhat
suspect. We cannot touch the thread-specific status bits either, so
we'd better check that we're not going to try to save FP state or
anything like that.
Now, it may be that the TS bit is always cleared *before* we set the
USEDFPU bit (and only set when we had already cleared the USEDFP
before), so the TS bit test may actually have been sufficient, but it
certainly was not obviously so.
So this explicitly verifies that we will not touch the TS_USEDFPU bit,
and adds a few related sanity-checks. Because it seems that somehow
AES-NI is corrupting user FP state. The cause is not clear, and this
patch doesn't fix it, but while debugging it I really wanted the code to
be more obviously correct and robust.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/unicore32')
0 files changed, 0 insertions, 0 deletions