summaryrefslogtreecommitdiffstats
path: root/arch/arm/vfp/vfphw.S
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-12-18 12:26:54 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-12-18 21:21:34 +0000
commitfc0b7a20368193e1f7cf1376624eed419b9c33e6 (patch)
tree6b1364b1b4bb7cee7bec720d28bd75ba4794aff9 /arch/arm/vfp/vfphw.S
parentc95a44329e816d2f9da21b27e74615d5ee0d2333 (diff)
downloadop-kernel-dev-fc0b7a20368193e1f7cf1376624eed419b9c33e6.zip
op-kernel-dev-fc0b7a20368193e1f7cf1376624eed419b9c33e6.tar.gz
[ARM] 5349/1: VFP: Add PM code to save and restore current VFP state
When CONFIG_PM is selected, the VFP code does not have any handler installed to deal with either saving the VFP state of the current task, nor does it do anything to try and restore the VFP after a resume. On resume, the VFP will have been reset and the co-processor access control registers are in an indeterminate state (very probably the CP10 and CP11 the VFP uses will have been disabled by the ARM core reset). When this happens, resume will break as soon as it tries to unfreeze the tasks and restart scheduling. Add a sys device to allow us to hook the suspend call to save the current thread state if the thread is using VFP and a resume hook which restores the CP10/CP11 access and ensures the VFP is disabled so that the lazy swapping will take place on next access. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/vfp/vfphw.S')
-rw-r--r--arch/arm/vfp/vfphw.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
index 3c73aaf..c92a08b 100644
--- a/arch/arm/vfp/vfphw.S
+++ b/arch/arm/vfp/vfphw.S
@@ -172,7 +172,7 @@ process_exception:
@ retry the faulted instruction
ENDPROC(vfp_support_entry)
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) || defined(CONFIG_PM)
ENTRY(vfp_save_state)
@ Save the current VFP state
@ r0 - save location
OpenPOWER on IntegriCloud