Thread (78 messages) 78 messages, 10 authors, 2007-07-17

Re: [PATCH v2] powerpc: fix suspend states again

From: Paul Mackerras <hidden>
Date: 2007-04-30 00:14:11

Johannes Berg writes:
+void save_processor_state(void)
+{
+	/* Giveup the lazy FPU & vec so we don't have to back them
+	 * up from the low level code
+	 */
+	enable_kernel_fp();
+
+#ifdef CONFIG_ALTIVEC
+	if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC)
+		enable_kernel_altivec();
+#endif /* CONFIG_ALTIVEC */
+
+#ifdef CONFIG_SPE
+	enable_kernel_spe();
+#endif
+}
This achieves essentially the same effect as prepare_to_copy() in
arch/powerpc/kernel/process.c, except that we don't end up with fp,
altivec and/or spe enabled - but that's OK since the following code
doesn't actually need fp/altivec/spe.

It would be good to avoid this duplication, or at least to use the
flush_* calls instead of the enable_kernel_* calls.

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