Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755109Ab1BMVZP (ORCPT ); Sun, 13 Feb 2011 16:25:15 -0500 Received: from smtp-out.google.com ([216.239.44.51]:38423 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755047Ab1BMVZK convert rfc822-to-8bit (ORCPT ); Sun, 13 Feb 2011 16:25:10 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Od+7j34vmilJMPQYYkSquym3jjnGPeli7FrKDxzziseyjgQvlNc7rSHdvy9HKhb6Gc Np/NixnDTvHq3Sy/qPcQ== MIME-Version: 1.0 In-Reply-To: References: <1297373487-23902-1-git-send-email-ccross@android.com> <1297373487-23902-4-git-send-email-ccross@android.com> <1297426345.17584.99.camel@e102109-lin.cambridge.arm.com> Date: Sun, 13 Feb 2011 13:25:05 -0800 X-Google-Sender-Auth: zGpk07aiNHaY5BFJFAMM-EtSpsM Message-ID: Subject: Re: [RFC PATCH 3/3] ARM: vfp: Use cpu pm notifiers to save vfp state From: Colin Cross To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk, santosh.shilimkar@ti.com, Will Deacon , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1153 Lines: 27 On Fri, Feb 11, 2011 at 11:50 AM, Colin Cross 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/