Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3250903ybi; Mon, 10 Jun 2019 07:10:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhguw8Fpmza9ExDCzvT02UUzEdrZ3M0mZjmRsfRhDuWVdSze5v2KpA4B+IHwCK8Rmrq9eL X-Received: by 2002:a17:902:b944:: with SMTP id h4mr68408946pls.179.1560175810305; Mon, 10 Jun 2019 07:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560175810; cv=none; d=google.com; s=arc-20160816; b=dI+BQPAXKaOI0E7bAWOh6HYQTuimmDruRlLQ6UBYt9rPIdswAXWDsevh6r7DAOcyLr ekvtD61iV84gGWn0rZTpuGqKagVIx0UYDdw/LGvFINcOlZPaTRXGYXj/tSQvKdmjvTFe kvifqvP3qGamvZ6+rwN+JUvZmWrcY5mmIttFCrNyBGHY/5eZFyd5fC73BWr8N8nEWIhF shRA0x78yNghAICkx3b/H0eChxQS2wqgpb6q4g4Ix06f6zULPiKk3cHkS26gks245rBy EvfAubjjW49ADtqJ1NlZX4UHjjsP2mJdJdtgi1oF2u9uSpSyvy1JeLL8zPPmo2MCArr/ XGYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:cc:to :subject; bh=AEAQ6C5J9tIhJ+QzD2tUHtxAcYt3/ZnaPPjhj2xv0Oc=; b=JewM0VDXT1sW9ibKAOmKG7nE35gZ3rMufdDUunmqsg2GENboOxU7fGt31FujAxcMAC NJx1ktsSCrUUcPRTWHzYxrk6M0PiabPneS+QL8glAvbpjvH+iKYWayDAqYXNMfl4DZJk gZ43sUtZpc99MkYIUtX4zt34mIeC7RGbzok3r9n8E7ULMfSZhDVzPvyp7/kUAFitPIiI lF1BjgvXzoxxHyLD38aeDddbeBrUobh2NHO9fY8wHPLnnoGBNCYad68IvCOf9DhAeGzg K4jwNgjX2/tNWjocgVyKx2auerGX+UuElTqF155tsFUz/oxax1LZuxWb8DdaN6z43VcK 7kBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si9348059pgq.33.2019.06.10.07.09.54; Mon, 10 Jun 2019 07:10:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390690AbfFJOH4 (ORCPT + 99 others); Mon, 10 Jun 2019 10:07:56 -0400 Received: from foss.arm.com ([217.140.110.172]:43596 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390678AbfFJOH4 (ORCPT ); Mon, 10 Jun 2019 10:07:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5058E344; Mon, 10 Jun 2019 07:07:55 -0700 (PDT) Received: from [10.1.197.61] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2FC0E3F557; Mon, 10 Jun 2019 07:07:53 -0700 (PDT) Subject: Re: [RFC 0/2] Add workaround for core wake-up on IPI for i.MX8MQ To: Abel Vesa Cc: Mark Rutland , Abel Vesa , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Thomas Gleixner , Lucas Stach , Jacky Bai , Lorenzo Pieralisi , Leonard Crestez , dl-linux-imx , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Carlo Caione References: <20190610121346.15779-1-abel.vesa@nxp.com> <20190610131921.GB14647@lakrids.cambridge.arm.com> <20190610132910.srd4j2gtidjeppdx@fsr-ub1664-175> <6f1052ea-623a-b2e8-9aa8-22aef5fab4ca@arm.com> <20190610135514.xd5myavjsloos2y3@fsr-ub1664-175> From: Marc Zyngier Openpgp: preference=signencrypt Autocrypt: addr=marc.zyngier@arm.com; prefer-encrypt=mutual; keydata= mQINBE6Jf0UBEADLCxpix34Ch3kQKA9SNlVQroj9aHAEzzl0+V8jrvT9a9GkK+FjBOIQz4KE g+3p+lqgJH4NfwPm9H5I5e3wa+Scz9wAqWLTT772Rqb6hf6kx0kKd0P2jGv79qXSmwru28vJ t9NNsmIhEYwS5eTfCbsZZDCnR31J6qxozsDHpCGLHlYym/VbC199Uq/pN5gH+5JHZyhyZiNW ozUCjMqC4eNW42nYVKZQfbj/k4W9xFfudFaFEhAf/Vb1r6F05eBP1uopuzNkAN7vqS8XcgQH qXI357YC4ToCbmqLue4HK9+2mtf7MTdHZYGZ939OfTlOGuxFW+bhtPQzsHiW7eNe0ew0+LaL 3wdNzT5abPBscqXWVGsZWCAzBmrZato+Pd2bSCDPLInZV0j+rjt7MWiSxEAEowue3IcZA++7 ifTDIscQdpeKT8hcL+9eHLgoSDH62SlubO/y8bB1hV8JjLW/jQpLnae0oz25h39ij4ijcp8N t5slf5DNRi1NLz5+iaaLg4gaM3ywVK2VEKdBTg+JTg3dfrb3DH7ctTQquyKun9IVY8AsxMc6 lxl4HxrpLX7HgF10685GG5fFla7R1RUnW5svgQhz6YVU33yJjk5lIIrrxKI/wLlhn066mtu1 DoD9TEAjwOmpa6ofV6rHeBPehUwMZEsLqlKfLsl0PpsJwov8TQARAQABtCNNYXJjIFp5bmdp ZXIgPG1hcmMuenluZ2llckBhcm0uY29tPokC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9O2nXTzlG1PeqGH2ahuRxn7txA5j5PHZEZdL1 Z46HaNmN2hZS/oJ69c1DI5Rcww== Organization: ARM Ltd Message-ID: <7b86aa90-6d64-589c-f11e-d2ee6ab3fd54@arm.com> Date: Mon, 10 Jun 2019 15:07:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190610135514.xd5myavjsloos2y3@fsr-ub1664-175> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/06/2019 14:55, Abel Vesa wrote: > On 19-06-10 14:39:02, Marc Zyngier wrote: >> On 10/06/2019 14:29, Abel Vesa wrote: >>> On 19-06-10 14:19:21, Mark Rutland wrote: >>>> On Mon, Jun 10, 2019 at 03:13:44PM +0300, Abel Vesa wrote: >>>>> This is another alternative for the RFC: >>>>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2019%2F3%2F27%2F545&data=02%7C01%7Cabel.vesa%40nxp.com%7C7cb2bda286214541bd1e08d6eda903e0%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636957707535314247&sdata=guYqyq5ND6HzW6doFyWrR1Ry4ffWpGwtm0xDZ2ufFSg%3D&reserved=0 >>>>> >>>>> This new workaround proposal is a little bit more hacky but more contained >>>>> since everything is done within the irq-imx-gpcv2 driver. >>>>> >>>>> Basically, it 'hijacks' the registered gic_raise_softirq __smp_cross_call >>>>> handler and registers instead a wrapper which calls in the 'hijacked' >>>>> handler, after that calling into EL3 which will take care of the actual >>>>> wake up. This time, instead of expanding the PSCI ABI, we use a new vendor SIP. >>>> >>>> IIUC from last time [1,2], this erratum affects all interrupts >>>> targetting teh idle CPU, not just IPIs, so even if the bodge is more >>>> self-contained, it doesn't really solve the issue, and there are still >>>> cases where a CPU will not be woken from idle when it should be (e.g. >>>> upon receipt of an LPI). >>>> >>> >>> Wrong, this erratum does not affect any other type of interrupts, other >>> than IPIs. That is because all the other interrupts go through GPC, >>> which means the cores will wake up on any other type (again, other than IPI). >> >> Huh... Are you saying that LPIs and PPIs are going through the GPC, and >> will trigger the wake-up of the core? That's not the conclusion we >> reached last time. >> > > Hmm, I don't think that was the conclusion. Yes, Lucas was saying (IIRC) > that if you terminate the IRQs at GIC then all the other interrupts will be > in the same situation. But the performance improvement given by terminating > them at GIC might not be worth it when compared to the cpuidle support. https://lkml.org/lkml/2019/3/27/1124 clearly says that PPIs are broken, relying on some other terrible hack for the timer (and only the timer, leaving other PPIs dead as a nail). It also implies that LPIs have never been looked into, and given that they aren't routed through the GPC, the conclusion is pretty easy to draw. Nobody is talking about performance here. It is strictly about correctness, and what I read about this system is that it cannot reliably use cpuidle. Thanks, M. -- Jazz is not dead. It just smells funny...