[PATCH 2/5] powerpc: fix suspend states again

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Mar 20 03:06:05 EST 2007


> +
> +int 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 */
> +
> +	return 0;
> +}

You need to check if there's an FPU I suppose for enable_kernel_fp()
since this is generic code potentially used with embedded CPUs as well.
In fact, it would be good to also add some of the freescale stuff.

Ben.





More information about the Linuxppc-dev mailing list