From patchwork Fri Nov 5 09:55:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12604413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B458C433EF for ; Fri, 5 Nov 2021 09:57:23 +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 CACC5601FC for ; Fri, 5 Nov 2021 09:57:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CACC5601FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=j26IpUkhvwVzI1r06jqe0p8b2Nw8HAeRwX46zspMr2c=; b=XddS232tDbSEqS jXgJTc5iMQiv5K7gXh+1BvkNg+AvMN7IuDo70lXw25bHOHnMbt6WXcjf/IWAQPTSLue9R3Qq16yGr +n/ueIFrU6b50qsPKyp1iC8ta27BBTuEu20b5fOnNsXMP7VVLgoyUWJXyZqXFODdzlRSET4h0YSgm SOl1R8pMqYC1d4W6bxuXeIpvsjRUgZX6OZkCUCRNth60WCyvfI92fspuITA76K995inGuNkUp+lgl D/UVCKrttraHqAa8tfVaPLxIfi9rWFnYLzeuTBo9WUWAfK4q5ln8lEPnf+fUusc51YGmLFF4Y8Vps HSHxvU7gKlRaWVvgJW1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mivx4-00B25N-8D; Fri, 05 Nov 2021 09:56:02 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mivwz-00B23N-Tt for linux-arm-kernel@lists.infradead.org; Fri, 05 Nov 2021 09:55:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1636106157; x=1667642157; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OFT4YXyn58kUeLHKFBFco6ndJhh+r9baHt/x4TYU/Zo=; b=RXFHMymf78Bhsh0yAvPuWGlpmnfKnHsZtgusj2TN22MJqNkV78MDB/yW xTtts9g0XbBK7hLgew/rm9okRcC2qkyWRt4GPSyXLOcKm2f8F9q/CJQXj HOgAEClTLl1GRbUC/E3QJoXkWo2+LcRZgiHGkW8f95qnudLh9IuIMOsiG Hj57UBZT5S7aKDSybUNqUQ/ir8XkkHQ/tl2j4eEUA66vAYOnlZc9w0I0B NOVTBhRuWLPXu3EMojrpMRTsdj5Dk6KdC3CUnpMExyX/4/KOgSLY5BYRs yPpBSoA/i27xuSoVqZm/o7ziDXnsQ/qNWggKhSk5ks6spUs+HQYjYkgvJ A==; X-IronPort-AV: E=Sophos;i="5.87,211,1631570400"; d="scan'208";a="20353769" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 05 Nov 2021 10:55:50 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 05 Nov 2021 10:55:50 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 05 Nov 2021 10:55:50 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1636106150; x=1667642150; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OFT4YXyn58kUeLHKFBFco6ndJhh+r9baHt/x4TYU/Zo=; b=QLIuryGE11gSoBWCfW9xSFGvRXaD8qWYqtzkC7vY84n8JTX/bvMlSeL7 J488Wg5UT757fRmUZTl3+8aQ+555fQZDj2hvij+GlalSv+ohqagT7H3KF qbRHSQNHEYq9faxQS+z+UozE/9qQXHNs48omlyGCMzt3Ozl6XjPZzl+bZ 7kRg0ByDnMUjMPFb0tbhhoAVpsT2Jg0dXY+JQS+BYJEoVCHpe4/1cxgyt mR5IA8aA+xVbfeFovL8xae1evNqqdfZ7MMoylOSnmoq+0rbDlwatqriKB Ktc3vSjY++yhbcw+XHiHnFgKQ6zJV+VmSPWTYTum640OpKsJlcj/NzEsw Q==; X-IronPort-AV: E=Sophos;i="5.87,211,1631570400"; d="scan'208";a="20353768" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 05 Nov 2021 10:55:49 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id BEB0E280065; Fri, 5 Nov 2021 10:55:49 +0100 (CET) From: Alexander Stein To: Shawn Guo , Sascha Hauer Cc: Alexander Stein , Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org, Martin Kepplinger , Abel Vesa Subject: [PATCH 1/1] irqchip/irq-imx-gpcv2: Disable cpuidle on imx8mq Date: Fri, 5 Nov 2021 10:55:35 +0100 Message-Id: <20211105095535.3920998-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211105_025558_340536_0F7A7785 X-CRM114-Status: GOOD ( 16.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Due to errata e11171 sleeping CPUs cannot be woken up by IPIs. Signed-off-by: Alexander Stein --- With reference to [1] cpuidle is broken on imx8mq with no workaround available in mainline, probably never will. In order to avoid to avoid booting and deadlocking imx8mq systems, disable cpuidle unconditionally. I was wondering which driver would be the best to add this code (it would work pretty much everywhere), but I opted for irq-imx-gpcv2 as this is used imx8mq (and imx7d) only. I also added '#ifdef CONFIG_CPU_IDLE' to avoid this warning when cpuidle support is not compiled in, although cpuidle support without the psci driver will this issue this warning. But using CONFIG_ARM_PSCI_CPUIDLE here looks odd to me. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2021-November/694075.html drivers/irqchip/irq-imx-gpcv2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c index 5b5a365dbd5e..6a2fc3c7df67 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -3,6 +3,7 @@ * Copyright (C) 2015 Freescale Semiconductor, Inc. */ +#include #include #include #include @@ -221,6 +222,13 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node, core_num = (unsigned long)id->data; +#ifdef CONFIG_CPU_IDLE + if (of_machine_is_compatible("fsl,imx8mq")) { + pr_warn("Disabling cpuidle on i.MX8M due to errata e11171\n"); + disable_cpuidle(); + } +#endif + parent_domain = irq_find_host(parent); if (!parent_domain) { pr_err("%pOF: unable to get parent domain\n", node);