Messages in this thread | | | Date | Sat, 1 Feb 2014 17:47:48 -0800 | Subject | Re: [PATCH] Make math_state_restore() save and restore the interrupt flag | From | Linus Torvalds <> |
| |
On Sat, Feb 1, 2014 at 5:43 PM, H. Peter Anvin <hpa@zytor.com> wrote: > What does the inner if clause do? It looks like it returns either way...
Suresh broke it with his suggested version.
The inner if-statement is supposed to avoid the stts *if* we had used math *and* the FPU restore worked.
But with the extra "else" that Suresh added, it now always avoids the stts for the eager-fpu case, which breaks the whole logic for "hey, if the process hadn't used math, we don't waste time restoring data that doesn't exist". And, as you say, making the inner if clause pointless.
Linus
| |