From patchwork Tue May 16 10:22:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 94605 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp320769vqo; Tue, 16 May 2023 03:31:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yM/AR1yHXawCsKfWqOf4gMPsb43gP3uOEzKWreEDahFmr3g0pmXCR/xhTsHm5l/VbPNSS X-Received: by 2002:a05:6a20:1596:b0:105:95b2:a8e3 with SMTP id h22-20020a056a20159600b0010595b2a8e3mr10414860pzj.22.1684233084133; Tue, 16 May 2023 03:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684233084; cv=none; d=google.com; s=arc-20160816; b=Wl+gwEwCX77PMyMfDpNJdhghpZqDlKpxIEcTvrzBFbbQfOQ2QH0jQvtTA1tcUCTJFp V99H4VQnV9zkYpp3GIJuWxoXJfbXrKOjANCMv9ZCj0e0aHjGBtBaK8mfvnjLd0xNEW6z HT0/etL76cxpD2e102pMjlZJAOkBjcN2IZgKE1TaphVXTL+vCPZpSRa8rNIMnaM2SQMd c/ndhQJ+fbKFb5zNFUTYVxSfht2VyRgC3QOK/ayAFT4n/BUTMBMKDQpEGYO/jNasuJrg 3tOdj3ukrgP2qwywy0MfpD5NmEvhBtIgRIPEQqA4wnwl14kmvO5laqv+VkWe1y/gnDOa b8og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=4DjYR026G/RUPOr4o3268om1bIvmxLZRur6uZ5lVlo0=; b=JVRvVoZDSkrakldVzo3Gdb7pBeMPJ0V3Hh04FFZhv2Slm3T/eEecGtLVh0YWyHMtl0 WWQ162bsK/sLDJujQtAJ7hkEKAmiLT72iP++/PfAuPMfc9N8N+Yw3to2zH3q9lrneD7C qYfrk/hNQG5KHb1v5ycYhElcvRXog5zDkaSvof6lxJLCsFO1+p5cy7NGKQB/mMzbkKNc nPCDpzLK0+qWsKTESa2DhrYJKilEYvWjY3DXnu2EZv8oSASnWIau/vmkUsV4QAo9br9+ yhJ9nx8Wt2LCdX5R7M7cFzhnBZpYSEIud0gXSNBOIuf+uHxCKFm2jMOZsjcr+FTBXhiL SIpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vqHnr8e1; dkim=neutral (no key) header.i=@linutronix.de header.b=pafFnsyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z19-20020a63e113000000b0052c8503b54bsi19037680pgh.177.2023.05.16.03.30.58; Tue, 16 May 2023 03:31:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vqHnr8e1; dkim=neutral (no key) header.i=@linutronix.de header.b=pafFnsyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232297AbjEPKWw (ORCPT + 99 others); Tue, 16 May 2023 06:22:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232019AbjEPKWl (ORCPT ); Tue, 16 May 2023 06:22:41 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1F2640F5 for ; Tue, 16 May 2023 03:22:39 -0700 (PDT) Date: Tue, 16 May 2023 10:22:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684232558; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4DjYR026G/RUPOr4o3268om1bIvmxLZRur6uZ5lVlo0=; b=vqHnr8e1rz5FR6dLyECYxHnDz10D2bPJvwka17Gbuz314l+e1A/RHKfkuhF8uYFAdQpejP 2YTbEZGb9Q5d/5wDULLpUfIHyKL+vOLZ0zfWyd9TnRllXmjtc30nzFNVLSyri5byWu/BtU ev1bQ8jNric5Sf/0tNKDkpXa67iEeqRT98GH3O6U4calAlmIXYzBkQhMMJVVTLrkrczgtt zQmeSoZ1CN51wbTV+SPRoGKbgcq5wDbC8VQNXr+D7oXvC0z/9JH4IOjvA7Hb/qqsKP8oG3 OxYiiQOXIyYal1eSGOUm4C39FxcYJrBiPRWq9xgCaHAUftA7sgOOlI1XPnBw5Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684232558; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4DjYR026G/RUPOr4o3268om1bIvmxLZRur6uZ5lVlo0=; b=pafFnsyfwd6QOIClOXWzLdRijm2+TbFo4S7BZBrs96Dr9Z2jf9xJ39j7YA3/asLKQ0ajlT ItGDkpePivJxezBw== From: "irqchip-bot for Douglas Anderson" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-fixes] dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW Cc: Julius Werner , Douglas Anderson , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230515131353.v2.1.Iabe67a827e206496efec6beb5616d5a3b99c1e65@changeid> References: <20230515131353.v2.1.Iabe67a827e206496efec6beb5616d5a3b99c1e65@changeid> MIME-Version: 1.0 Message-ID: <168423255799.404.15212728549560590170.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765993083988461638?= X-GMAIL-MSGID: =?utf-8?q?1766046390626508617?= The following commit has been merged into the irq/irqchip-fixes branch of irqchip: Commit-ID: 43cd3ddbff3c1635d0e09fe5b09af48d39dbb9d7 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/43cd3ddbff3c1635d0e09fe5b09af48d39dbb9d7 Author: Douglas Anderson AuthorDate: Mon, 15 May 2023 13:13:50 -07:00 Committer: Marc Zyngier CommitterDate: Tue, 16 May 2023 10:42:57 +01:00 dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW When trying to turn on the "pseudo NMI" kernel feature in Linux, it was discovered that all Mediatek-based Chromebooks that ever shipped (at least ones with GICv3) had a firmware bug where they wouldn't save certain GIC "GICR" registers properly. If a processor ever entered a suspend/idle mode where the GICR registers lost state then they'd be reset to their default state. As a result of the bug, if you try to enable "pseudo NMIs" on the affected devices then certain interrupts will unexpectedly get promoted to be "pseudo NMIs" and cause crashes / freezes / general mayhem. ChromeOS is looking to start turning on "pseudo NMIs" in production to make crash reports more actionable. To do so, we will release firmware updates for at least some of the affected Mediatek Chromebooks. However, even when we update the firmware of a Chromebook it's always possible that a user will end up booting with old firmware. We need to be able to detect when we're running with firmware that will crash and burn if pseudo NMIs are enabled. The current plan is: * Update the device trees of all affected Chromebooks to include the 'mediatek,broken-save-restore-fw' property. The kernel can use this to know not to enable certain features like "pseudo NMI". NOTE: device trees for Chromebooks are never baked into the firmware but are bundled with the kernel. A kernel will never be configured to use "pseudo NMIs" and be bundled with an old device tree. * When we get a fixed firmware for one of these Chromebooks, it will patch the device tree to remove this property. For some details, you can also see the public bug Reviewed-by: Julius Werner Signed-off-by: Douglas Anderson Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230515131353.v2.1.Iabe67a827e206496efec6beb5616d5a3b99c1e65@changeid --- Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml b/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml index 9211726..39e64c7 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml @@ -166,6 +166,12 @@ properties: resets: maxItems: 1 + mediatek,broken-save-restore-fw: + type: boolean + description: + Asserts that the firmware on this device has issues saving and restoring + GICR registers when the GIC redistributors are powered off. + dependencies: mbi-ranges: [ msi-controller ] msi-controller: [ mbi-ranges ]