From patchwork Mon May 15 20:13:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 9372 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp7173412vqo; Mon, 15 May 2023 13:27:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xELUluLgCbaa8JV10lzdUM2bAEZYVWoYyNR1G2udXwe8Hpz9ayQJHTduNP4LM8Jjox0hK X-Received: by 2002:a05:6a20:72aa:b0:100:d061:52ce with SMTP id o42-20020a056a2072aa00b00100d06152cemr32271841pzk.55.1684182467324; Mon, 15 May 2023 13:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684182467; cv=none; d=google.com; s=arc-20160816; b=DviS3jq7Cz0885jLXjyShA+Sld9kElslMmbV9MajRgWu3MR0LhaJJ4Ghp6atHJEZkA wAsvTQuvaY/fm52CwJAT/BV0F95jDUE+EH/E8N+kqZ5bE1S7FbeBRRCJIIYLClpBhinn y8m1mtb0/KFtfFRaHTGVLCTc43xW2c4OidtoyJrc8l0i/NKMoEhcp5DafmQtgrf17UrC lqYzNw/8YdS9KWlDIvXBwcUZmTqmiebT9uszpQl5TacNUsA4ICy6ZRkc0wsI/d3eZcvm vs3DTymaI0wkWIc0zKXMJMl9sMRjeeIIopBfjiArm/kvY42+Ernpcw4yaGYngZd5NdpT Q9pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NdrXa/PlVV43Pf78fHCONHu55eewXuTj8I+Jt1XajL4=; b=OhFp9IgsCOlOcQovd+YlVQ6e+KmU4/NhDE7gaj6DYJBAwoOJVr7z4EoUg7W5cVsqZa VcU72UpNtm+Gw/gqJxG8gykbEWrDS+I1+a5H9pK/abX6/x8Gbj5A1f1zyrjTOEXZCKlz 0zc2EjRHW1M810kmoAc8rIA/vxhxzX3R5McXNuGkjcehI8TZhXo/vkU0ldsJifuMDYGh NLR3c5eWDfMWOQIr4lBwPFIDKSvx0t9KPzm0qVCMQshTus+NSxS9Yf0aLfeQEYCKwq1O FVwwlQ9j8Zc9MhrEQwg6AffCyrdk5xFweNWRHDhcnlh6ya91VdFFFdBQADusmxMHXfi0 OIpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=X9UotK3n; 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=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a637543000000b0051372ec9316si15474510pgn.166.2023.05.15.13.27.34; Mon, 15 May 2023 13:27:47 -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=@chromium.org header.s=google header.b=X9UotK3n; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245247AbjEOUQL (ORCPT + 99 others); Mon, 15 May 2023 16:16:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244176AbjEOUQH (ORCPT ); Mon, 15 May 2023 16:16:07 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ED2DE52 for ; Mon, 15 May 2023 13:16:06 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-643995a47f7so13764977b3a.1 for ; Mon, 15 May 2023 13:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1684181766; x=1686773766; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NdrXa/PlVV43Pf78fHCONHu55eewXuTj8I+Jt1XajL4=; b=X9UotK3nIcZR9mIfhjg25eDJxkcGD+acT07JpZEckYeI+bTkV3P9Fdkgw1EWtT9jV2 IO63n2RSI1nMLnyHJQxSGIgS94GjNw01y7bdsmNmNkxPMWdQErTCS8eIgAf8JamBLgbq JYpiV390X5/1BgjzuPvK5AbSMp/lQLYT8msx0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684181766; x=1686773766; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NdrXa/PlVV43Pf78fHCONHu55eewXuTj8I+Jt1XajL4=; b=D2kwFr+QxLNIGSdvd5DzIRSUL7ANId/iE5XCOJvT7SCClly3rO0+HTsTizIJt90kqK 1XBJzS6vlEx/7123xB0fX9oRTEIHnZfRmhyc9ZZN+LtgaVDN8ofqRLFBkekmOmGpv6MZ 8CPC31eilesXYwXBAr2Gn96zyyiWDLpZN+0ZcnM75zo12fOW95eBgOuDatA4PXqeJwCb tlXWxGRACd8Ig7IN4eIR9mXxFKzWxoBsxY4RzQc+eepDFBjzMsyUnVbYn9R5w9lcMFBQ ZsUveCTb+W0tpCk4rgFdlb1PIitETRtmEWp1Z5wnPL/pzs7cx8MGK12rHNACr/BOaayl ugbA== X-Gm-Message-State: AC+VfDzNXwJuhvP7Q1w2uDeqnfitDn0vodI2pyQN7FTe5BUctq2ucr0s Hxs5SW+IY5FWFr1FK6QyT2QxZQ== X-Received: by 2002:a05:6a20:7295:b0:f2:ae03:4020 with SMTP id o21-20020a056a20729500b000f2ae034020mr41711998pzk.54.1684181766038; Mon, 15 May 2023 13:16:06 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:9f33:9d98:277a:d4cd]) by smtp.gmail.com with ESMTPSA id a19-20020a62bd13000000b0063f0c9eadc7sm7981411pff.200.2023.05.15.13.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 13:16:05 -0700 (PDT) From: Douglas Anderson To: Marc Zyngier , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Allen-KH Cheng , linux-mediatek@lists.infradead.org, Eddie Huang , Hsin-Hsiung Wang , AngeloGioacchino Del Regno , wenst@chromium.org, yidilin@chromium.org, Tinghan Shen , jwerner@chromium.org, Weiyi Lu , Ben Ho , Seiya Wang , Douglas Anderson , Conor Dooley , Enric Balletbo i Serra , =?utf-8?b?TsOtY29sYXMgRi4g?= =?utf-8?b?Ui4gQS4gUHJhZG8=?= , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/5] irqchip/gic-v3: Disable pseudo NMIs on Mediatek Chromebooks w/ bad FW Date: Mon, 15 May 2023 13:13:49 -0700 Message-ID: <20230515131353.v2.cover@dianders> X-Mailer: git-send-email 2.40.1.606.ga4b1b128d6-goog MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1765993315112785434?= X-GMAIL-MSGID: =?utf-8?q?1765993315112785434?= As talked about in the bindings patch included in this series ("dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW"), many Mediatek-based Chromebooks shipped with firmware that doesn't properly save/restore some GICR registers. This causes the system to crash if "pseudo NMIs" are turned on. This series makes sure that we never allow turning on "pseudo NMIs" if we are running with the problematic firmware. The patches in this series can land in any order and can go through entirely different trees. None of the patches are harmful on their own, but to get things fixed we need all of them. v2 fixes the quirk name and also moves the quirk out of the SoC.dtsi file and into the Chromebook file. This, unfortunately, means that mt8186-based Chromebooks are no longer handled since they don't appear to be upstream yet. :( Changes in v2: - "when CPUs are powered" => "when the GIC redistributors are..." - Changed "Fixes" tag. - Moved from mt8183.dtsi to mt8183-kukui.dtsi - Moved from mt8192.dtsi to mt8192-asurada.dtsi - Moved from mt8195.dtsi to mt8195-cherry.dtsi - mediatek,gicr-save-quirk => mediatek,broken-save-restore-fw Douglas Anderson (5): dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues arm64: dts: mediatek: mt8183: Add mediatek,broken-save-restore-fw to kukui arm64: dts: mediatek: mt8192: Add mediatek,broken-save-restore-fw to asurada arm64: dts: mediatek: mt8195: Add mediatek,broken-save-restore-fw to cherry .../interrupt-controller/arm,gic-v3.yaml | 6 ++++++ .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 4 ++++ .../boot/dts/mediatek/mt8192-asurada.dtsi | 4 ++++ .../boot/dts/mediatek/mt8195-cherry.dtsi | 4 ++++ drivers/irqchip/irq-gic-common.c | 8 ++++++-- drivers/irqchip/irq-gic-common.h | 1 + drivers/irqchip/irq-gic-v3.c | 20 +++++++++++++++++++ 7 files changed, 45 insertions(+), 2 deletions(-)