Losing VFP registers over suspend/resume

2 messages, 1 author, 2012-07-15 · open the first message on its own page

Losing VFP registers over suspend/resume

From: Daniel Drake <hidden>
Date: 2012-07-15 04:49:46

Hi,

Testing XO-1.75 ARMv7 hardfp, the following simple test gives bad results:

In one terminal, run this python program:

import math
answer = math.cos(3.1415)
while True:
    x = math.cos(3.1415)
    if x != answer:
        print "Bad answer", x


In another terminal:
while sleep 3; do rtcwake -s 3 -m mem; done


This sets up a FP-heavy app running while the system is suspending and
resuming every few seconds.
The results are that every few minutes, one of the cosine calculations
produces the wrong result, and after a few hours the program can even
crash.

Applying the patch "ARM: vfp: Always save VFP state in vfp_pm_suspend"
solves the issue.
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-February/042048.html
I tested with the above test case for several hours, and another OLPC
developer verified. No more bad calculations, no more crashes.

Any chance this effort could be revived? Looks like the patch was almost acked:
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-February/042930.html

Thanks
Daniel

Losing VFP registers over suspend/resume

From: Daniel Drake <hidden>
Date: 2012-07-15 21:49:03

On Sat, Jul 14, 2012 at 10:49 PM, Daniel Drake [off-list ref] wrote:
Applying the patch "ARM: vfp: Always save VFP state in vfp_pm_suspend"
solves the issue.
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-February/042048.html
I tested with the above test case for several hours, and another OLPC
developer verified. No more bad calculations, no more crashes.

Any chance this effort could be revived? Looks like the patch was almost acked:
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-February/042930.html
That was an old patch. We think the latest one is here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-May/051091.html

This no longer applies due to last_VFP_context being renamed. I'll
send a v5 patch now to fix that.

Thanks
Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help