]> git.notmuchmail.org Git - notmuch/blob - test/corpora/lkml/cur/1382298805.004906:2,
Import notmuch_0.27.orig.tar.gz
[notmuch] / test / corpora / lkml / cur / 1382298805.004906:2,
1 From: Colin Cross <ccross@android.com>
2 Subject: Re: [PATCH] ARM: vfp: Always save VFP state in vfp_pm_suspend
3 Date: Mon, 14 Feb 2011 10:35:37 -0800
4 Lines: 50
5 Message-ID: <AANLkTik_Jey_PtRmr530FVckA6RXHESeX+CyoJC=ZTkR@mail.gmail.com>
6 References: <1297638813-1315-1-git-send-email-ccross@android.com>
7         <1297683742.30092.11.camel@e102109-lin.cambridge.arm.com>
8 Mime-Version: 1.0
9 Content-Type: text/plain; charset=ISO-8859-1
10 Content-Transfer-Encoding: QUOTED-PRINTABLE
11 Cc: linux-arm-kernel@lists.infradead.org,
12         Russell King <linux@arm.linux.org.uk>,
13         linux-kernel@vger.kernel.org
14 To: Catalin Marinas <catalin.marinas@arm.com>
15 X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 19:36:14 2011
16 Return-path: <linux-kernel-owner@vger.kernel.org>
17 Envelope-to: glk-linux-kernel-3@lo.gmane.org
18 Received: from vger.kernel.org ([209.132.180.67])
19         by lo.gmane.org with esmtp (Exim 4.69)
20         (envelope-from <linux-kernel-owner@vger.kernel.org>)
21         id 1Pp3HR-0002ph-ME
22         for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 19:36:14 +0100
23 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
24         id S1751716Ab1BNSf7 convert rfc822-to-quoted-printable (ORCPT
25         <rfc822;glk-linux-kernel-3@m.gmane.org>);
26         Mon, 14 Feb 2011 13:35:59 -0500
27 Received: from smtp-out.google.com ([74.125.121.67]:16138 "EHLO
28         smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
29         with ESMTP id S1751472Ab1BNSf5 convert rfc822-to-8bit (ORCPT
30         <rfc822;linux-kernel@vger.kernel.org>);
31         Mon, 14 Feb 2011 13:35:57 -0500
32 Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78])
33         by smtp-out.google.com with ESMTP id p1EIZtnZ010066
34         for <linux-kernel@vger.kernel.org>; Mon, 14 Feb 2011 10:35:55 -0800
35 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta;
36         t=1297708556; bh=zHQvHco6EycqYjYMR9YZftpchts=;
37         h=MIME-Version:Sender:In-Reply-To:References:Date:Message-ID:
38          Subject:From:To:Cc:Content-Type:Content-Transfer-Encoding;
39         b=vMdLxEMc5VUxTbXeXOfO9iAKtgTlVwOwZrVZEhG7GNUReOYWZKzblAuPHuJUWHr5q
40          8s7bNLIdGKiRH4q28mv9w==
41 Received: from vws17 (vws17.prod.google.com [10.241.21.145])
42         by kpbe14.cbf.corp.google.com with ESMTP id p1EIYaTC004311
43         (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
44         for <linux-kernel@vger.kernel.org>; Mon, 14 Feb 2011 10:35:54 -0800
45 Received: by vws17 with SMTP id 17so3300387vws.2
46         for <linux-kernel@vger.kernel.org>; Mon, 14 Feb 2011 10:35:54 -0800 (PST)
47 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
48         d=google.com; s=beta;
49         h=domainkey-signature:mime-version:sender:in-reply-to:references:date
50          :x-google-sender-auth:message-id:subject:from:to:cc:content-type
51          :content-transfer-encoding;
52         bh=FyW95sl8WRQv1ev+TqjP0gzPcCabtWdW1//GAc6oFnY=;
53         b=MNkyYY1htITiUX23N5enGCjsYq2mGBCW4BadxXMha/29ZeIyVP6jrUHlViT88u79RG
54          SxLMzz7lijwW38xTiBfw==
55 DomainKey-Signature: a=rsa-sha1; c=nofws;
56         d=google.com; s=beta;
57         h=mime-version:sender:in-reply-to:references:date
58          :x-google-sender-auth:message-id:subject:from:to:cc:content-type
59          :content-transfer-encoding;
60         b=Lio4jom4+RruCzH/a6zheXvUcTpZvSX7eMk6Ld1+PQQybP02I0+Cv4+PgGac2GoAYX
61          tXciu0c/KOGts2phbyMg==
62 Received: by 10.220.94.201 with SMTP id a9mr1430388vcn.56.1297708537386; Mon,
63  14 Feb 2011 10:35:37 -0800 (PST)
64 Received: by 10.220.43.142 with HTTP; Mon, 14 Feb 2011 10:35:37 -0800 (PST)
65 In-Reply-To: <1297683742.30092.11.camel@e102109-lin.cambridge.arm.com>
66 X-Google-Sender-Auth: 47_39DbBbWrnAh28bpWvfpwmbLw
67 X-System-Of-Record: true
68 Sender: linux-kernel-owner@vger.kernel.org
69 Precedence: bulk
70 List-ID: <linux-kernel.vger.kernel.org>
71 X-Mailing-List: linux-kernel@vger.kernel.org
72 Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099943>
73
74 On Mon, Feb 14, 2011 at 3:42 AM, Catalin Marinas
75 <catalin.marinas@arm.com> wrote:
76 > On Sun, 2011-02-13 at 23:13 +0000, Colin Cross wrote:
77 >> vfp_pm_suspend should save the VFP state any time there is
78 >> a last_VFP_context. =A0If it only saves when the VFP is enabled,
79 >> the state can get lost when, on a UP system:
80 >> =A0 =A0Thread 1 uses the VFP
81 >> =A0 =A0Context switch occurs to thread 2, VFP is disabled but the
82 >> =A0 =A0 =A0 VFP context is not saved to allow lazy save and restore
83 >> =A0 =A0Thread 2 initiates suspend
84 >> =A0 =A0vfp_pm_suspend is called with the VFP disabled, but the
85 >> =A0 =A0 =A0 context has not been saved.
86 >
87 > At this point is it guaranteed that the thread won't migrate to anoth=
88 er
89 > CPU? If not, we should use get/put_cpu.
90
91 Yes, VFP suspend is implemented with a sysdev, which is suspended
92 after disable_nonboot_cpus.
93
94 >> --- a/arch/arm/vfp/vfpmodule.c
95 >> +++ b/arch/arm/vfp/vfpmodule.c
96 >> @@ -415,13 +415,12 @@ static int vfp_pm_suspend(struct sys_device *d=
97 ev, pm_message_t state)
98 >> =A0 =A0 =A0 =A0 struct thread_info *ti =3D current_thread_info();
99 >> =A0 =A0 =A0 =A0 u32 fpexc =3D fmrx(FPEXC);
100 >>
101 >> - =A0 =A0 =A0 /* if vfp is on, then save state for resumption */
102 >> - =A0 =A0 =A0 if (fpexc & FPEXC_EN) {
103 >> + =A0 =A0 =A0 /* save state for resume */
104 >> + =A0 =A0 =A0 if (last_VFP_context[ti->cpu]) {
105 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_DEBUG "%s: saving vfp st=
106 ate\n", __func__);
107 >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 vfp_save_state(&ti->vfpstate, fpexc);
108 >> -
109 >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* disable, just in case */
110 >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
111 >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 fmxr(FPEXC, fpexc | FPEXC_EN);
112 >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 vfp_save_state(last_VFP_context[ti->cp=
113 u], fpexc);
114 >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 fmxr(FPEXC, fpexc & ~FPEXC_EN);
115 >> =A0 =A0 =A0 =A0 }
116 >
117 > We may want to set the last_VFP_context to NULL so that after resumin=
118 g
119 > (to the same thread) we force the VFP reload from the vfpstate
120 > structure. The vfp_support_entry code ignores the reloading if the
121 > last_VFP_context is the same as vfpstate.
122
123 Right, will fix.
124
125