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=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 11A53C10F00 for ; Wed, 27 Mar 2019 18:40:27 +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 DB97F2087C for ; Wed, 27 Mar 2019 18:40: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="H2aCxDY5"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="X7N9vDyF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB97F2087C 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:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WAVyEqyigaLPdSwBOoyc0xKLwTcbigL97PiqTcXntus=; b=H2aCxDY5c4rjVz d/L7k7IAkdx4+KyLtivY3OYOoZovpV4v7YLvgxYnxSnmREkzIlk8DvFdRrGcMBA8eQnsWFZkjsOPy uBYwmn9JMdlrVgQhHXJOxGgA29pMmkQpQY4WbO5cfXjoWrrlOY5RRyjHn/UJUXm8RwIBWas9iYLKE DFdevQQMhD97NcXemw9SFw0Y3jQFyZEb8h1GhpSKqgYAbqxMFGLsp/GHI86h4mK2rKjBTAdz1UlPG QuOStlRKqg5zHkUvlFKvyQOS+HeGazEnppQYANdKo6T++1l2Ri2aa5S3+vH7IqWL+JWT938yum5Bz ZrWtxYOOEtQyKiXGgzww==; 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 1h9DTK-0004R2-0p; Wed, 27 Mar 2019 18:40:22 +0000 Received: from mail-ve1eur03on060e.outbound.protection.outlook.com ([2a01:111:f400:fe09::60e] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9DTD-0004OM-NH for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2019 18:40: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=h8rw+wHOGFYHNOfVf8hGO/HG0SCOcp/4cNhIwpCp96o=; b=X7N9vDyFvQ/DBfovPuVayLeB/e+/lDuA765G0MA/xb6apzPjqYSqnnpIZmAJvUEOY9RV13jfLL7GBxZzCt8TCIjF32cj/9gQVEo+KCkshuDeV4Irv0peSB3fPUxduvPXdZkKIxt71IVNA/G/E4dTTAHP2l/DUXnUsFpmqo0Hjtw= Received: from VI1PR04MB5533.eurprd04.prod.outlook.com (20.178.122.159) by VI1PR04MB3214.eurprd04.prod.outlook.com (10.170.227.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.19; Wed, 27 Mar 2019 18:40:07 +0000 Received: from VI1PR04MB5533.eurprd04.prod.outlook.com ([fe80::35aa:e13a:52ea:e5e6]) by VI1PR04MB5533.eurprd04.prod.outlook.com ([fe80::35aa:e13a:52ea:e5e6%4]) with mapi id 15.20.1730.019; Wed, 27 Mar 2019 18:40:07 +0000 From: Leonard Crestez To: "l.stach@pengutronix.de" , "marc.zyngier@arm.com" , Abel Vesa , Jacky Bai Subject: Re: [RFC 0/7] cpuidle: Add poking mechanism to support non-IPI wakeup Thread-Topic: [RFC 0/7] cpuidle: Add poking mechanism to support non-IPI wakeup Thread-Index: AQHU5J/uL6RBBX3AA0GxPKCBIrMc4KYfnrmAgAADs4CAAAJMgIAAG7sAgAAPSwA= Date: Wed, 27 Mar 2019 18:40:07 +0000 Message-ID: References: <1553692845-20983-1-git-send-email-abel.vesa@nxp.com> <1553701479.2561.38.camel@pengutronix.de> <564216aa-1144-71de-e887-00c58f466bf5@arm.com> <1553702767.2561.40.camel@pengutronix.de> <85c91392-9cbf-a5fc-b037-3d58f2b0ac9c@arm.com> In-Reply-To: <85c91392-9cbf-a5fc-b037-3d58f2b0ac9c@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Evolution 3.28.5-0ubuntu0.18.04.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-originating-ip: [212.146.100.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 576f9c5a-28e5-454a-3a02-08d6b2e3a26e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB3214; x-ms-traffictypediagnostic: VI1PR04MB3214: x-microsoft-antispam-prvs: x-forefront-prvs: 0989A7979C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(376002)(39860400002)(346002)(199004)(189003)(71190400001)(486006)(256004)(14444005)(14454004)(186003)(53546011)(44832011)(6116002)(6486002)(478600001)(229853002)(6436002)(3846002)(4326008)(6512007)(81156014)(81166006)(25786009)(305945005)(8676002)(118296001)(66066001)(6636002)(53936002)(106356001)(97736004)(105586002)(7416002)(446003)(93886005)(54906003)(110136005)(316002)(7736002)(68736007)(6506007)(2501003)(99286004)(5660300002)(86362001)(26005)(76176011)(2616005)(71200400001)(476003)(102836004)(50226002)(11346002)(8936002)(2906002)(36756003)(6246003)(99106002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB3214; H:VI1PR04MB5533.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: U0ChtDnwpg+ALZq4yCxxWHnmRCK0/i5Deh1yZ/YRQ8hipECobkStNvICGKUOyH9KhOr4Tv/X4FvEf5AVmGnOkvg+KyTyZJ/PLv6dIB5vNHluysoR54+aBpyuLXdgbdbz5JN79WfPBHyUNMSue3/cpBIvLpge19xWxJXDSHFOxrmETIoofb8viJ4TzIILrGWtTDIIDovk7OIdPp9D51oQ4+4TGT0V2nls297dwezwhaA/3uZFSjNwX0w0js3XZ3OLb7KElM3UzlkB2h5dFy0u2o4QXXRtqhhSUtyGTI/TnHzTep9bWrY1d3weBneHmtX6BAzKY14hnCzVUDjq3wIhKcIQcKJSJ1Hw0BxR889hLUQBu1lGy/LLmNrwirwzLFEk4Pe2tYZIDr3rFQyUJBL8pYzqXvdM8/tD2dBLI6KafFs= Content-ID: <8783C4B4E8222A499CD541DF8BB5C3CD@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 576f9c5a-28e5-454a-3a02-08d6b2e3a26e X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2019 18:40:07.0946 (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: VI1PR04MB3214 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190327_114018_261324_A3502135 X-CRM114-Status: GOOD ( 26.32 ) 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: Aisheng Dong , "mark.rutland@arm.com" , "lorenzo.pieralisi@arm.com" , Anson Huang , "linux-pm@vger.kernel.org" , "catalin.marinas@arm.com" , "rjw@rjwysocki.net" , "linux-kernel@vger.kernel.org" , "will.deacon@arm.com" , dl-linux-imx , "kernel@pengutronix.de" , "sudeep.holla@arm.com" , Fabio Estevam , "shawnguo@kernel.org" , "robh@kernel.org" , "linux-arm-kernel@lists.infradead.org" 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 On Wed, 2019-03-27 at 17:45 +0000, Marc Zyngier wrote: > On 27/03/2019 16:06, Lucas Stach wrote: > > Am Mittwoch, den 27.03.2019, 15:57 +0000 schrieb Marc Zyngier: > > > On 27/03/2019 15:44, Lucas Stach wrote: > > > > Am Mittwoch, den 27.03.2019, 13:21 +0000 schrieb Abel Vesa: > > > > > This work is a workaround I'm looking into (more as a background task) > > > > > in order to add support for cpuidle on i.MX8MQ based platforms. > > > > > > > > > > The main idea here is getting around the missing GIC wake_request signal > > > > > (due to integration design issue) by waking up a each individual core through > > > > > some dedicated SW power-up bits inside the power controller (GPC) right before > > > > > every IPI is requested for that each individual core. > > > > > > > > Just a general comment, without going into the details of this series: > > > > this issue is not only affecting IPIs, but also MSIs terminated at the > > > > GIC. Currently MSIs are terminated at the PCIe core, but terminating > > > > them at the GIC is clearly preferable, as this allows assigning CPU > > > > affinity to individual MSIs and lowers IRQ service overhead. > > > > > > > > I'm not sure what the consequences are for upstream Linux support yet, > > > > but we should keep in mind that having a workaround for IPIs is only > > > > solving part of the issue. > > > > > > If this erratum is affecting more than just IPIs, then indeed I don't > > > see how this patch series solves anything. > > > > > > But the erratum documentation seems to imply that only SGIs are > > > affected, and goes as far as suggesting to use an external interrupt > > > would solve it. How comes this is not the case? Or is it that anything > > > directly routed to a redistributor is also affected? This would break > > > LPIs (and thus MSIs) and PPIs (the CPU timer, among others). > > > > Anything that isn't visible to the GPC and requires the GIC > > wake_request signal to behave as specified is broken by this erratum. > > I really wonder how a timer interrupt (a PPI, hence not routed through > the GPC) can wake up the CPU in this case. It really feels like > something like "program CNTV_CVAL_EL0 to expire at some later point; > WFI" could result in the CPU going to a deep sleep state, and not > wake-up at all. This is already a common issue for cpuidle implementions handled by the "local-timer-stop" property. imx has other timer blocks in the SOC, they generate SPIs which are connected to GPC. > This would indicate that not only cpuidle is broken with this, but > absolutely every interrupt that is not routed through the GPC. Yes, cpuidle is broken for irqs not routed through GPC. However: * All SPIs are connected to GPC in a 1:1 mapping * This series deals with SGIs * The timer PPIs are not required; covered by local-timer-stop * LPIs are currently unused (I understand imx-pci uses SPI by default from Lucas) Anything missing? My understanding is that this wake request feature via GIC is new in v3 and this is maybe why HW team missed it during integration. Older imx6/7 has GICv2 and has deep idle states which always rely on GPC to wakeup so the approach can work. -- Regards, Leonard _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel