Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3221401ybi; Mon, 10 Jun 2019 06:39:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyg+yhIRIe7SPaF2TaKYLkICSJMhReYerfJFHKb9+NoEL9t22gwWlTxp96VxFqg0PduYUvO X-Received: by 2002:a17:902:7489:: with SMTP id h9mr4452729pll.161.1560173967571; Mon, 10 Jun 2019 06:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560173967; cv=none; d=google.com; s=arc-20160816; b=dh4bmgxsKPauFL2dgIEzDGRNS63G/z3JZjYfi0YJ1Dk5IzdeLOL41ISmc8l0N7//1l HUxWPHrKMZnvbdZUHtT2eeyqrx+XM+7gQjjf8WpeTvVzVKhDTf1XlUwd6ZaFwRKf52yg kc6lKh5/S93WGilODNiPT798tuozmsRww0y+haqUwkkDrLsciOHtCL+SXQaAEe7GMVAL C3Qa8TAc0Ukz7i3RFcJfaJLMvvVo9EfKIgAyRvasvmGa5+9j7ZRI6VEhlB5/Tevkhw6W 3Iw/m9jUzvgOwBoGI3gyFOWYrOSQRkIGpGMlDynsDS+tPYzkWZPpsgekgcH+eq6Hduns r6WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=H+Akrz1tMgkYolKEEh09/juzcvhS178MvU4WLcvf8Jg=; b=kZWSjWb1uz5uEtLLx5pmPmnaN868s8zxRqSDd3uuO/nTZheOOzWKV2c7IN6ejZSlvN /wu2dr4OFlc4Ow9F9kF4i6dx66TutA8VzoeEuuAQq9tQxaa20BcR4OYDCFZoqyDxlwrA DTjH5eHpjuxhPWgc0f0ltUUc6EmoCQ8fzG1j21joJ4mYBmyBQB/eR5mG0Oz/1NcJwlWG nItMtq6vHbVxz9SwP5wyc3JCq400XUwLfDjNAK4PZ0eeNIyTIas8dz9KGT76yz6vvNYq vMGItv6aqgMg2uhwFykXUz5HJEHtx1fbKWPzyCh7ep3/dqdvunlqRUaH+/7IawrMcBir iCeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=P95vLWNA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b41si10143184pla.409.2019.06.10.06.39.13; Mon, 10 Jun 2019 06:39:27 -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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=P95vLWNA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390342AbfFJN35 (ORCPT + 99 others); Mon, 10 Jun 2019 09:29:57 -0400 Received: from mail-eopbgr140078.outbound.protection.outlook.com ([40.107.14.78]:35138 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388833AbfFJN35 (ORCPT ); Mon, 10 Jun 2019 09:29:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H+Akrz1tMgkYolKEEh09/juzcvhS178MvU4WLcvf8Jg=; b=P95vLWNA6ej+h5Fz3A9rwkJiKH3jMnUApjOwqaJZX267arUXfNa0ylnBKGJII3KY+NY3O8A7bURLMx40kVRugjO4M1csJ6YPg0fWLRQHyr5HXT2hoB1JDIUjfEz8NKCHwrBRmCK6vwT0qR8XED4nHtCQH55JNfBW+IuSXf8LcUI= Received: from AM0PR04MB5779.eurprd04.prod.outlook.com (20.178.202.151) by AM0PR04MB6706.eurprd04.prod.outlook.com (20.179.255.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.22; Mon, 10 Jun 2019 13:29:11 +0000 Received: from AM0PR04MB5779.eurprd04.prod.outlook.com ([fe80::5c91:9215:bcd9:49cc]) by AM0PR04MB5779.eurprd04.prod.outlook.com ([fe80::5c91:9215:bcd9:49cc%5]) with mapi id 15.20.1943.023; Mon, 10 Jun 2019 13:29:11 +0000 From: Abel Vesa To: Mark Rutland CC: Abel Vesa , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Thomas Gleixner , Marc Zyngier , 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 Subject: Re: [RFC 0/2] Add workaround for core wake-up on IPI for i.MX8MQ Thread-Topic: [RFC 0/2] Add workaround for core wake-up on IPI for i.MX8MQ Thread-Index: AQHVH4Y/3naZJOmQTkOgrNdQmlNuA6aU3y6AgAACvgA= Date: Mon, 10 Jun 2019 13:29:11 +0000 Message-ID: <20190610132910.srd4j2gtidjeppdx@fsr-ub1664-175> References: <20190610121346.15779-1-abel.vesa@nxp.com> <20190610131921.GB14647@lakrids.cambridge.arm.com> In-Reply-To: <20190610131921.GB14647@lakrids.cambridge.arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=abel.vesa@nxp.com; x-originating-ip: [89.37.124.34] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e24b38f2-4e22-480a-bd5c-08d6eda79fed x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:AM0PR04MB6706; x-ms-traffictypediagnostic: AM0PR04MB6706: x-ms-exchange-purlcount: 4 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0064B3273C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(39860400002)(376002)(396003)(346002)(366004)(136003)(189003)(199004)(43544003)(73956011)(86362001)(6506007)(76116006)(64756008)(561944003)(66946007)(66446008)(91956017)(8676002)(81156014)(81166006)(1076003)(6306002)(6436002)(5660300002)(9686003)(6486002)(6512007)(66476007)(66556008)(186003)(33716001)(54906003)(53546011)(53936002)(76176011)(8936002)(102836004)(66066001)(6116002)(3846002)(45080400002)(229853002)(14454004)(6246003)(26005)(966005)(7736002)(305945005)(316002)(11346002)(7416002)(446003)(71190400001)(71200400001)(25786009)(14444005)(256004)(44832011)(486006)(68736007)(476003)(2906002)(99286004)(4326008)(6916009)(478600001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB6706;H:AM0PR04MB5779.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A: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: jp/b3PGYlNVRq6EPAZO40iqlYv2hPwmsvNE2RXAflLz1TwEmjlww+H7wWye7PTEowitQenA2oi9eUYK8QKYMTJycr5EtyDbZOmNRV3PiZkfEf9UyON+49tzuU5HepINIzh2Bl8oOhHRetzetejHvkxwBJaCM51MQcYUcuSECeKKHt7wlE4o2Hg7+N+zOq6anx1AKkimwzZV9LK3xwurw/RZhdePQwyFLRdZnuQ6XmYC8GnL12MVKvqK0jUTBG0wpWvo4udGbJbcSVLvTbWceu+p71+4ccnNfBcP3u0vKu+l0VENtQWK5CWkLj0GEbezzB7TLVh8mCOiIPLMyzWghI7VRI5boIEBWR5BbAHYKl2W6GbCfGGlrpNL3hjNbww7Az7Y/TqIeDm8FsAwgxgn3kbHN0nveNcxMVeoVYfzu20Y= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e24b38f2-4e22-480a-bd5c-08d6eda79fed X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jun 2019 13:29:11.6633 (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-CrossTenant-userprincipalname: abel.vesa@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6706 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=3Dhttps%3A%2F%2Flkm= l.org%2Flkml%2F2019%2F3%2F27%2F545&data=3D02%7C01%7Cabel.vesa%40nxp.com= %7C05d512f83dfa4d4f52d908d6eda64321%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%= 7C1%7C636957695741584637&sdata=3Dd3X0xyWiaotq4VPNW306wdRhsY4TI%2BBjRSAB= k6vzf%2B8%3D&reserved=3D0 > >=20 > > This new workaround proposal is a little bit more hacky but more contai= ned > > since everything is done within the irq-imx-gpcv2 driver. > >=20 > > Basically, it 'hijacks' the registered gic_raise_softirq __smp_cross_ca= ll > > handler and registers instead a wrapper which calls in the 'hijacked'=20 > > 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 ven= dor SIP. >=20 > 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). >=20 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= ). > IIUC, Marc, Lorenzo, and Rafael [1,2,3] all thought that that this was > not worthwhile. What's changed? The fact that this is done in the imx-gpcv2 driver and it's not spread around like the old RFC. Yes, I agree that fixing something like this from the core subsystems (like cpuidle) or irq-gic-v3 driver is a bad idea, but this is not the case anymore with this new RFC. >=20 > Thanks, > Mark. >=20 > [1] https://eur01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fl= kml.org%2Flkml%2F2019%2F3%2F28%2F197&data=3D02%7C01%7Cabel.vesa%40nxp.c= om%7C05d512f83dfa4d4f52d908d6eda64321%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C= 0%7C1%7C636957695741584637&sdata=3DcA5UKbFuZHHnk1599lJi2QXCMTKxCJmPPzoB= aRhbdCE%3D&reserved=3D0 > [2] https://eur01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fl= kml.org%2Flkml%2F2019%2F3%2F28%2F203&data=3D02%7C01%7Cabel.vesa%40nxp.c= om%7C05d512f83dfa4d4f52d908d6eda64321%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C= 0%7C1%7C636957695741584637&sdata=3DTrWSY3eozWSd0KwZgIprmPazdDno979NqGnV= jpdzi50%3D&reserved=3D0 > [3] https://eur01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fl= kml.org%2Flkml%2F2019%2F3%2F28%2F198&data=3D02%7C01%7Cabel.vesa%40nxp.c= om%7C05d512f83dfa4d4f52d908d6eda64321%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C= 0%7C1%7C636957695741584637&sdata=3Dge%2FOXE40T6GSb0x1SmYFXtwLIdyVy1W0Yl= 0EItKyXNU%3D&reserved=3D0 >=20 > >=20 > > I also have the patches ready for TF-A but I'll hold on to them until I= see if > > this has a chance of getting in. > >=20 > > Abel Vesa (2): > > irqchip: irq-imx-gpcv2: Add workaround for i.MX8MQ ERR11171 > > arm64: dts: imx8mq: Add idle states and gpcv2 wake_request broken > > property > >=20 > > arch/arm64/boot/dts/freescale/imx8mq.dtsi | 20 +++++++++++++++ > > drivers/irqchip/irq-imx-gpcv2.c | 42 +++++++++++++++++++++++= ++++++++ > > 2 files changed, 62 insertions(+) > >=20 > > --=20 > > 2.7.4 > > =