Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754316AbbHFFyt (ORCPT ); Thu, 6 Aug 2015 01:54:49 -0400 Received: from mail-bn1on0147.outbound.protection.outlook.com ([157.56.110.147]:31367 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753368AbbHFFye (ORCPT ); Thu, 6 Aug 2015 01:54:34 -0400 X-Greylist: delayed 70992 seconds by postgrey-1.27 at vger.kernel.org; Thu, 06 Aug 2015 01:54:34 EDT Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; lists.ozlabs.org; dkim=none (message not signed) header.d=none; Date: Thu, 6 Aug 2015 13:54:26 +0800 From: Chenhui Zhao Subject: Re: [PATCH 1/3] Powerpc: mpc85xx: refactor the PM operations To: Scott Wood CC: , , , Tang Yuantian , "linuxppc-dev@lists.ozlabs.org" Message-ID: <1438840466.23384.2@remotesmtp.freescale.net> In-Reply-To: <1438839985.2097.151.camel@freescale.com> References: <1438334444-31919-1-git-send-email-b29983@freescale.com> <1438387178.19345.77.camel@freescale.com> <1438601578.7515.2@remotesmtp.freescale.net> <1438633568.2097.35.camel@freescale.com> <1438769477.21522.0@remotesmtp.freescale.net> <1438829848.2097.129.camel@freescale.com> <1438834837.23384.0@remotesmtp.freescale.net> <1438839985.2097.151.camel@freescale.com> X-Mailer: geary/0.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC011;1:4f7FKc0KyieXuevsG6LKDBuLqiejGWpl1qfIGIvrA15qPNQXb3MnEQOXvFBG70CR//KgMXY3989131iTOUup9tqEgY9V8YvANU0FMtFx00Uie+HtH77gSk4L2DzexrhTlCZ0B7B39KAzr4CH0RL0f++Op8NpD1nFe2m7FzHy5GSLG8TTP3qGiz26WfYZ4ygRz/8VDgCu9HVeQ/GA6ox5mpQ7jz+S3Q9Dhnk33hROmEdcSi4uGzX8xp739dvTOyFeJvmFwXH6uJT6efdJN54U7RmusNDgaAVbWAJQ1q2YiKPe7qvYnJcpQ8YW5Fjz4CEznM3IdMJY6RVb4TkrWKNyag== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(377424004)(377454003)(57704003)(24454002)(199003)(50226001)(62966003)(46102003)(85426001)(50986999)(76176999)(77156002)(4001450100002)(23676002)(77096005)(68736005)(19580405001)(19580395003)(6806004)(87936001)(88526003)(2950100001)(86362001)(92566002)(47776003)(69596002)(105606002)(189998001)(93886004)(106466001)(50466002)(4001540100001)(5001960100002)(64706001)(104016003)(5001830100001)(97736004)(81156007)(5001860100001)(110136002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR03MB573;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB573;2:hzu0klmKSTX+IfQ6JfnxI3FR2qS3+fye8V6kq5/FCmOgSrgyQW7P7bWJ1ur9IUwYbMN9mwOSjFEUr8zePZU09GXIMNfmwRQG4z173GR2k6Fpk3Cw5bXaPzr1+6XmMAgK1Nm91OtKuPm89G0LzZqklN8mTFtOQ0UIfhwC/btq9Vw=;3:Gu/QCxgoHyjLNHMkMKTaOyNdK4WBNStzNX6nulGQCuFiSq2Y+R9JiEogxXRW9noDL+sC7kMjuhgdYgt1e6CLooAXcHRjEFiHNQblZHtB/U3jUen7CBktYKj6rQTxMfbSP+2f0AP8jBNVDEIKXuDXU2e/QjcahZ3Bul2w+PeFUkmsKfqaDGrS6sH0ryDbzBMUmPYrQc9J5yQ+BB3FpjWO8TNhJnInHerFD/VJA83rGAY=;25:05e2FFiODrrsAPY1qdmPhkDLjfj/j25D8p4lb9px1tFrjztqR3b8IwNMtL5fsSF1YSNiYa8ijemfs/DshhduB38xD9yWOfJBso5RxwKtPDBOgUO6aqTHifj1GthpEPIeannUuN6Rf377tEbMUQl2MhdNQODDJvrZ35LKNdTcUb/N71J8EKdzKs4R5OrxpvSnJ9cpiM5dL0kgwvQw5MOZpSy/to0+w9zrTVpBeS0jWaQ7fqE9vU5p16c9GJ9Rgh+P X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB573; X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB573;20:/BACGXZuNECxe51rVDO8kIDij06T4fk0LrUjhztN0btOQmIS0wBwOQQutBEWTKlzC9lJAF+ZbNPr+ZpZUqkiflX7yfjYATmR+ZybsJj6R05NQRv7e6Vvgzp1gvjBLxVoLDuFankqbd53PWtr+43j2A5J9JQe6fFeufrIsf5r8tgub7bJbIF04COyve20w+gmi/vrO1lCzLVmWNAuko+YSM9D4mNSXMplg6TsEJ+t/CWUQms6K+M6HaomecAWQOIjiWcMYjKYRZYnwGRGtws/5J+TqLFvQvKOlWiphx7VcKI5jmLQEi9o/haFCjolayEI3EorZ5BeMctwXoS6C6QnfN23BB7fCBXD1TulxLBdlvA=;4:09+VvValAPJ/CVj44hkQaD554uGvCL/1WHYJw+N207GtV5mOT+ADlQdj7VwWYDaOtVySAQJ7K8QvK7gp3DtQgMXfvBud7p+36VEgkbQlLDcWRhqEq+xf9jysEWjhh2MfCS4WOmi+DkGRncHRAQebxaoEFwwC19KzQIo1q6vgY/AsuZwlTxJgGiyWNGPD9RZntIFIw4eaI6a1HNj9DrH65+Tw+ZO2RnnenhkUUTzEv5TZxYYtjaHD53NESzxNIzfkXILg3NYjytaFcOvApnV3OFlaOdkQpXMAjaUblNxwo1o= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:DM2PR03MB573;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB573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;24:941LdVKLhyaaFXGzWOdxkmxjXxIEnpwQnVXqTm5iYU27i3L3WVPmn2s3sRRZCE/b9BL1FwLUFB8UpUOyzNel35biQGwyYZF4tEHSEk99qEQ=;20:CWmxLEiwREAuf4fdBc/nSR2NF2RErzH+E2db00CY7kQcUQwnKZ3XQvlqaZoH66rxdEVdf9J4wnlimg+r/te2Aw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2015 05:54:31.3322 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB573 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2108 Lines: 70 On Thu, Aug 6, 2015 at 1:46 PM, Scott Wood wrote: > On Thu, 2015-08-06 at 12:20 +0800, Chenhui Zhao wrote: >> On Thu, Aug 6, 2015 at 10:57 AM, Scott Wood >> >> wrote: >> > On Wed, 2015-08-05 at 18:11 +0800, Chenhui Zhao wrote: >> > > On Tue, Aug 4, 2015 at 4:26 AM, Scott Wood >> >> > > wrote: >> > > > On Mon, 2015-08-03 at 19:32 +0800, Chenhui Zhao wrote: >> > > > > > >> > > > >> > > > > On Sat, Aug 1, 2015 at 7:59 AM, Scott Wood >> > > >> > > > > wrote: >> > > > >> > > > > > >> > > > > > Could you explain irq_mask()? Why would there still be >> IRQs >> > > > > destined >> > > > > > for >> > > > > > this CPU at this point? >> > > > > >> > > > > This function just masks irq by setting the registers in >> RCPM >> > > (for >> > > > > example, RCPM_CPMIMR, RCPM_CPMCIMR). Actually, all irqs to >> > > this CPU >> > > > > have been migrated to other CPUs. >> > > > >> > > > So why do we need to set those bits in RCPM? Is it just >> caution? >> > > >> > > Setting these bits can mask interrupts signalled to RCPM from >> MPIC >> > > as a >> > > means of >> > > waking up from a lower power state. So, cores will not be >> waked up >> > > unexpectedly. >> > >> > Why would the MPIC be signalling those interrupts if they've been >> > masked at >> > the MPIC? >> > >> > -Scott >> > >> >> The interrupts to RCPM from MPIC are IRQ, Machine Check, NMI and >> Critical interrupts. Some of them didn't be masked in MPIC. > > What interrupt could actually happen to a sleeping cpu that this > protects > against? > > -Scott Not sure. Maybe spurious interrupts or hardware exceptions. However, setting them make sure dead cpus can not be waked up unexpectedly. -Chenhui -- 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/