From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFF43C43381 for ; Wed, 20 Mar 2019 03:08:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ABCEC20857 for ; Wed, 20 Mar 2019 03:08:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nW86/Gn9"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="UWZqvhlI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABCEC20857 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BJwzQCjBGYf3L9W9OFDHFpNhXn0BcdTL5cR42cemu1w=; b=nW86/Gn9tZiaVq 0m1VW1aTB2hDUoww+Oj9PLP+C4T0vucHO4r4isWdoUo6Z6t7qkhS3xdFD17JAttbhFDmL083aw4B4 S5Ej1slN0WqqRs5Pg0p5OLTy6DDB+prlmsAKar1gGR90BLE5avunfCksPaxhK+k9yRkFqShaaHdQC l0Mx31dEFijDWsn9iwA/yFsQCO/RtOja/VafRfiqpXW0+oobRqc2ZxDv3fdC9d1/PY0rh3SQ8TOwe 9dLYfovsr7jR8pCQQxUeRDzliAOvS2oLPl8o9Z6FG5w5Nxf3emmFWuF8HsNOTZGfLli213PxQqMN0 PVEmeo/rVbQN7T9YmeOg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6RaX-00010T-Ow; Wed, 20 Mar 2019 03:08:21 +0000 Received: from mail-eopbgr140042.outbound.protection.outlook.com ([40.107.14.42] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6RaU-000105-OM for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2019 03:08:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OfAonbtoa7L/3KthU/cxioQUCVSHGm10hn2KO0NMvnA=; b=UWZqvhlIB6Zrb+n9hW2fvQ1Ypj/WZKd0VVZ0XGtLZrTTi2PQhamQ7KK1qnK4S4ho9xaUqxCD6I9XhJzT09vpNlr3XzBV7S+XZmICtFsF+FHi5kvNwzkMHlLWH4vwCtC2aDAmZrdac6CZs0+sB2AVi/BDvAcRePG3CLi9XRNe8AA= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.92.158) by AM0PR04MB5681.eurprd04.prod.outlook.com (20.178.118.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Wed, 20 Mar 2019 03:08:13 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::50ed:d1b5:c043:3b79]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::50ed:d1b5:c043:3b79%2]) with mapi id 15.20.1709.015; Wed, 20 Mar 2019 03:08:13 +0000 From: Aisheng Dong To: Peng Fan , Kohji Okuno , "shawnguo@kernel.org" Subject: RE: [PATCH] ARM: imx6: cpuidle: omit the unnecessary unmask of GINT Thread-Topic: [PATCH] ARM: imx6: cpuidle: omit the unnecessary unmask of GINT Thread-Index: AQHU09WXdRmxj6gwKkilEwqZbYFJ6qYS/V4AgAC8rICAABIigIAAH7+g Date: Wed, 20 Mar 2019 03:08:13 +0000 Message-ID: References: <20190306032107.GI26041@dragon> <20190306043042.8926-1-okuno.kohji@jp.panasonic.com> <20190319125148.GB28063@dragon> <20190320.090707.1700756583765376970.okuno.kohji@jp.panasonic.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-originating-ip: [92.121.36.197] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 79c122c3-44ce-4115-35f8-08d6ace14a57 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB5681; x-ms-traffictypediagnostic: AM0PR04MB5681: x-microsoft-antispam-prvs: x-forefront-prvs: 098291215C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(39860400002)(396003)(346002)(376002)(199004)(189003)(13464003)(53234004)(4326008)(33656002)(53936002)(105586002)(93886005)(11346002)(106356001)(71190400001)(71200400001)(476003)(316002)(68736007)(8936002)(6246003)(446003)(110136005)(5660300002)(6506007)(14444005)(25786009)(256004)(97736004)(54906003)(9686003)(102836004)(2501003)(6436002)(55016002)(76176011)(81156014)(81166006)(52536014)(6116002)(66066001)(186003)(305945005)(14454004)(86362001)(229853002)(2906002)(8676002)(486006)(44832011)(74316002)(7696005)(478600001)(99286004)(26005)(3846002)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB5681; H:AM0PR04MB4211.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 6auawuLM3zYGAPEHG+kDRXpKYr3x79fu4Ni05CKLWa7xp/K1ywsNLcmbmPgzyiKGcMRTcTOV9oPgqX458ClKrQeLkb4vdgoU5+chC8KVK7ZnVri967FdFx8gyuuf6zpvihrlr9AF8XTqWNJI9FcOnwqNjCu+2/vj1AoAtmcKsXZipNkoHKhFY7ePmjVXYf2trrRS7UNKf+x8b/HcKakVUtFRSS+jUGsOQHtzdXk41pc0sTEoeQATIYtKiKB21/Vx4ZEXzp37eOXH48xcs/G55GgfOWXXU73i3h7k/cKTWkQCwYuFI/iqhIGkVa3uDinZtXgBV3m5jSaJlS2RBVQD7IoDwFbrzXjFnHd4+Ilqu2L3aOAdW2AKY5nyIasQ74tPPOwpDE9JMS4cBplFNgrjL+UD38YxRMZiHS+8a626Vsk= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79c122c3-44ce-4115-35f8-08d6ace14a57 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2019 03:08:13.3731 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5681 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190319_200818_893015_A4B05C04 X-CRM114-Status: GOOD ( 22.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "s.hauer@pengutronix.de" , "festevam@gmail.com" , "kernel@pengutronix.de" , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org > From: Peng Fan > > -----Original Message----- > > From: Kohji Okuno [mailto:okuno.kohji@jp.panasonic.com] > > Subject: Re: [PATCH] ARM: imx6: cpuidle: omit the unnecessary unmask > > of GINT > > > > Hi Peng and Shawn, > > > > This patch was made by Peng. Peng, could you explain about this? > > My guess is that the patch is to eliminate the unnecessary processing. > > Yes. This is optimization, there is no need to unmask/mask when > WAIT_CLOCKED. See the errata description. > /* > * ERR007265: CCM: When improper low-power sequence is used, > * the SoC enters low power mode before the ARM core executes WFI. > * > * Software workaround: > * 1) Software should trigger IRQ #32 (IOMUX) to be always pending > * by setting IOMUX_GPR1_GINT. > * 2) Software should then unmask IRQ #32 in GPC before setting CCM > * Low-Power mode. > * 3) Software should mask IRQ #32 right after CCM Low-Power mode > * is set (set bits 0-1 of CCM_CLPCR). > * > * Note that IRQ #32 is GIC SPI #0. > */ Your code comments did not mention it's only for WAIT_CLOCKED. For errata, I saw it seems also affect STOP mode. Can you explain a bit more on why it's safe for all other modes except WAIT_CLOCKED? Regards Dong Aisheng > Regards, > Peng. > > > > > Best regards, > > Kohji Okuno > > > > Shawn Guo wrote: > > > On Wed, Mar 06, 2019 at 01:30:42PM +0900, Kohji Okuno wrote: > > >> In imx6_set_lpm, we only need to unmask GINT when not > > WAIT_CLOCKED, > > >> so add a check condition. > > > > > > Can you elaborate the problem we have without this code change? > > > > > > Shawn > > > > > >> > > >> Signed-off-by: Peng Fan > > >> Signed-off-by: Kohji Okuno > > >> --- > > >> arch/arm/mach-imx/pm-imx6.c | 6 ++++-- > > >> 1 file changed, 4 insertions(+), 2 deletions(-) > > >> > > >> diff --git a/arch/arm/mach-imx/pm-imx6.c > > >> b/arch/arm/mach-imx/pm-imx6.c index 87f45b926c78..54add0178b96 > > 100644 > > >> --- a/arch/arm/mach-imx/pm-imx6.c > > >> +++ b/arch/arm/mach-imx/pm-imx6.c > > >> @@ -354,9 +354,11 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode > > mode) > > >> * > > >> * Note that IRQ #32 is GIC SPI #0. > > >> */ > > >> - imx_gpc_hwirq_unmask(0); > > >> + if (mode != WAIT_CLOCKED) > > >> + imx_gpc_hwirq_unmask(0); > > >> writel_relaxed(val, ccm_base + CLPCR); > > >> - imx_gpc_hwirq_mask(0); > > >> + if (mode != WAIT_CLOCKED) > > >> + imx_gpc_hwirq_mask(0); > > >> > > >> return 0; > > >> } > > >> -- > > >> 2.17.1 > > >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel