[RFC PATCH 3/3] ARM: vfp: Use cpu pm notifiers to save vfp state
Colin Cross
ccross at android.com
Sun Feb 13 16:25:05 EST 2011
On Fri, Feb 11, 2011 at 11:50 AM, Colin Cross <ccross at android.com> wrote:
>> Something like below (untested):
>>
>> if (last_VFP_context[cpu]) {
>> vfp_save_state(last_VFP_context[cpu], fpexc);
>> /* force a reload when coming back from idle */
>> last_VFP_context[cpu] = NULL;
>> fmxr(FPEXC, fpexc & ~FPEXC_EN);
>> }
One more fix is necessary, the VFP will usually not be enabled when
this is called. The VFP needs to be enabled before vfp_save_state,
and then disabled after.
> /* save state for resumption */
> if (last_VFP_context[ti->cpu]) {
> printk(KERN_DEBUG "%s: saving vfp state\n", __func__);
> vfp_save_state(last_VFP_context[ti->cpu], fpexc);
>
> /* disable, just in case */
> fmxr(FPEXC, fpexc & ~FPEXC_EN);
> }
Same fix is needed here.
More information about the linux-arm-kernel
mailing list