All of lore.kernel.org
 help / color / mirror / Atom feed
* Losing VFP registers over suspend/resume
@ 2012-07-15  4:49 Daniel Drake
  2012-07-15 21:49 ` Daniel Drake
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drake @ 2012-07-15  4:49 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Losing VFP registers over suspend/resume
  2012-07-15  4:49 Losing VFP registers over suspend/resume Daniel Drake
@ 2012-07-15 21:49 ` Daniel Drake
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Drake @ 2012-07-15 21:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jul 14, 2012 at 10:49 PM, Daniel Drake <dsd@laptop.org> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-15 21:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-15  4:49 Losing VFP registers over suspend/resume Daniel Drake
2012-07-15 21:49 ` Daniel Drake

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.