]> bbs.cooldavid.org Git - net-next-2.6.git/commit
ARM: vfp: fix vfp_sync_state()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 6 Feb 2010 11:27:45 +0000 (11:27 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 15 Feb 2010 21:39:53 +0000 (21:39 +0000)
commit54cb3dbb4a1cccd6b1bffc169ff638f8e74daf44
tree454b05810dc96b288eabcc4e11046adb0bc8b8ec
parent462f39a8c7496c95f4de91ef46d875f46e0fa271
ARM: vfp: fix vfp_sync_state()

The more I look at vfp_sync_state(), the more I believe it's trying
to do its job in a really obscure way.

Essentially, last_VFP_context[] tracks who owns the state in the VFP
hardware.  If last_VFP_context[] is the context for the thread which
we're interested in, then the VFP hardware has context which is not
saved in the software state - so we need to bring the software state
up to date.

If last_VFP_context[] is for some other thread, we really don't care
what state the VFP hardware is in; it doesn't contain any information
pertinent to the thread we're trying to deal with - so don't touch
the hardware.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/vfp/vfpmodule.c