Message ID | 20231006151547.3.Ie582d33cfe46f9ec2248e7f2dabdd6bbd66486a6@changeid |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp624737vqo; Fri, 6 Oct 2023 15:16:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyjqwEri8LKpwqE0tPDkDXRyl14NMgpn1v8x/fDZp6TtSPyv7+X6MN84aHvioqnW/ef3aC X-Received: by 2002:a05:6a20:728e:b0:15a:4c23:870b with SMTP id o14-20020a056a20728e00b0015a4c23870bmr9692616pzk.23.1696630611528; Fri, 06 Oct 2023 15:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696630611; cv=none; d=google.com; s=arc-20160816; b=gWYHUJSf38/lTF8YIXkU/bgQlcyfnn+uXJaYGISeWMIFP5xVDeDMxTAOlt/3xpYTDt WWguFhfnYt45d4PL4MDZ5ZN8K8EIJSBYAH9mabr5MOrc/DjgNrwmS8R7TJ5QDmflKNkb 6irP3evSNDAQhB5G8o6YFov2ELtB3zxKvF0uVEKYPAoJGpVbNt+8gUU/UtMyPX7UwVv1 zN0xefrSVhRPXdUsuk9YsbBfpsAFM9hPm/LR2y/1bwF1jT8ZuhCu1YMZef+NQRMKr1AQ q3zq7Uk5JLuQaIvISw2e3OmtcCFHjD4FN/ULSz3N1mgq7dOd4uTgJWxQCQ7FGCPHnc/d wdTg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mKHn8MHAksMieZVNplmzQ9td3WQY/zTB+/6WLDFqzoc=; fh=XVmTbdCX3pyryhcQytEVMVPL51Yj+5K5oAR1NsdBfF0=; b=Z1Q0STdugOb4+F88DQAcI6e3u0owW55I7y0jWey1So/2Btc3NspBE4jjyx/ks0Rg/Q Zm3w3QWpdm5M94yE7do9sv+Fy4v1F5EDG+gruWS02hhtvJcvFmsXwTvPjhvlwQLdQGwH Je0Tau1YZThowqR11HZjOQ13W0G9bRdbuH+IhggDc13L8A4rqXZBDuifenSAuX59/8KS 3qLPS0I42wkUEgihsXnOi0DKvhqnQDcOhhB1UlocYGJtUEFbBBYwYQXW0bs/LHVv5jzI cphr65EeMvU3tsnGsSZVZlwSlJSjYv7GXABJUQDUJnfhaS2yK1jZZPX4seo4TIqP1Df2 4HsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZSFXcvar; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id cg19-20020a056a00291300b00693462e2553si2300128pfb.156.2023.10.06.15.16.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 15:16:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZSFXcvar; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2A04485BF180; Fri, 6 Oct 2023 15:16:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233769AbjJFWQ2 (ORCPT <rfc822;ezelljr.billy@gmail.com> + 18 others); Fri, 6 Oct 2023 18:16:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233754AbjJFWQZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 6 Oct 2023 18:16:25 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F00ACBD for <linux-kernel@vger.kernel.org>; Fri, 6 Oct 2023 15:16:22 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-578d791dd91so2049293a12.0 for <linux-kernel@vger.kernel.org>; Fri, 06 Oct 2023 15:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696630582; x=1697235382; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mKHn8MHAksMieZVNplmzQ9td3WQY/zTB+/6WLDFqzoc=; b=ZSFXcvartjnVLWjOnc1Zm3GTsvaBpPPgn7YtM+5QGifXxevKNVwsw21LQ0hA3L+S7I 3A6tSW3yTRM/2nQZbBdrwLPsq9P4GYmv1wmJzp+Hn78NwSwX7cfaxRTLZLlUQoaQYv0e /QxBW/gsil9hUoy+DstembkO2gJqG8CBxYPYo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696630582; x=1697235382; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mKHn8MHAksMieZVNplmzQ9td3WQY/zTB+/6WLDFqzoc=; b=QyIazbNHo3g5bopwkG5fBa4JW1R128fZR7JMHKlL31pW2B4J6mhE8m1Gfh0qhG7SHO Y+8+6/bhgVHrtwemViE6gw6P8KsLvwr7fBeZQGMRUJZKLh/dIKl6dbsMCSKA+p1prsiL sPp4l9WyhaRlmooigNFe/AM5lDaEi4nFt0QP5iEOx/dooaNZQ6xeokpcwEz6Op0EdgtK CaAW8cYC7Gj69NQ3sUCo+2XZIfuxlmRbHssxlcIBp/8iI+KjDKx5UWij+VyHP6izPo6g 0U3udVtTxK9uZglfr00h9oxpBb0WkeGynskfmoDulbZUfu71ebbHEVR5+nqyek/D3pk/ M/Mw== X-Gm-Message-State: AOJu0YzixySTpqfinLKDNkvk7idUsB9U0ixEn2xSs2Xn6hNjHTskcv07 jq9rV+A7/K2jEomLz+KEf89idA== X-Received: by 2002:a17:90b:3907:b0:276:5512:13ab with SMTP id ob7-20020a17090b390700b00276551213abmr8650294pjb.10.1696630582413; Fri, 06 Oct 2023 15:16:22 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:1f37:5459:32bf:faf9]) by smtp.gmail.com with ESMTPSA id rj6-20020a17090b3e8600b00276e8e4f1fbsm5946523pjb.1.2023.10.06.15.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 15:16:21 -0700 (PDT) From: Douglas Anderson <dianders@chromium.org> To: Marc Zyngier <maz@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Chen-Yu Tsai <wenst@chromium.org> Cc: Douglas Anderson <dianders@chromium.org>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Matthias Brugger <matthias.bgg@gmail.com>, Thomas Gleixner <tglx@linutronix.de>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 3/3] irqchip/gic-v3: Remove Mediatek pseudo-NMI firmware quirk handling Date: Fri, 6 Oct 2023 15:15:53 -0700 Message-ID: <20231006151547.3.Ie582d33cfe46f9ec2248e7f2dabdd6bbd66486a6@changeid> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog In-Reply-To: <20231006151547.1.Ide945748593cffd8ff0feb9ae22b795935b944d6@changeid> References: <20231006151547.1.Ide945748593cffd8ff0feb9ae22b795935b944d6@changeid> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 06 Oct 2023 15:16:49 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779046140248102925 X-GMAIL-MSGID: 1779046140248102925 |
Series |
[1/3] arm64: Disable GiC priorities on Mediatek devices w/ firmware issues
|
|
Commit Message
Doug Anderson
Oct. 6, 2023, 10:15 p.m. UTC
This is a partial revert of commit 44bd78dd2b88 ("irqchip/gic-v3:
Disable pseudo NMIs on Mediatek devices w/ firmware issues"). In the
patch ("arm64: Disable GiC priorities on Mediatek devices w/ firmware
issues") we've moved the quirk handling to another place and so it's
not needed in the GiC driver.
NOTE: this isn't a full revert because it leaves some of the changes
to the "quirks" structure around in case future code needs it.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
drivers/irqchip/irq-gic-v3.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
Comments
On Fri, Oct 06, 2023 at 03:15:53PM -0700, Douglas Anderson wrote: > This is a partial revert of commit 44bd78dd2b88 ("irqchip/gic-v3: > Disable pseudo NMIs on Mediatek devices w/ firmware issues"). In the > patch ("arm64: Disable GiC priorities on Mediatek devices w/ firmware > issues") we've moved the quirk handling to another place and so it's > not needed in the GiC driver. > > NOTE: this isn't a full revert because it leaves some of the changes > to the "quirks" structure around in case future code needs it. > > Signed-off-by: Douglas Anderson <dianders@chromium.org> > --- I think it might make sense to fold this into the patch adding the cpucap detection. Otherwise, if you apply my suggestions to the first patch, there's a 2-commit window where we'll have two places that log that NMI is being disabled due to the FW issue. That's not a functional issue, so doesn't matter that much. Either way: Acked-by: Mark Rutland <mark.rutland@arm.com> Mark. > > drivers/irqchip/irq-gic-v3.c | 22 +--------------------- > 1 file changed, 1 insertion(+), 21 deletions(-) > > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > index 787ccc880b22..9ff776709ae6 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -39,8 +39,7 @@ > > #define FLAGS_WORKAROUND_GICR_WAKER_MSM8996 (1ULL << 0) > #define FLAGS_WORKAROUND_CAVIUM_ERRATUM_38539 (1ULL << 1) > -#define FLAGS_WORKAROUND_MTK_GICR_SAVE (1ULL << 2) > -#define FLAGS_WORKAROUND_ASR_ERRATUM_8601001 (1ULL << 3) > +#define FLAGS_WORKAROUND_ASR_ERRATUM_8601001 (1ULL << 2) > > #define GIC_IRQ_TYPE_PARTITION (GIC_IRQ_TYPE_LPI + 1) > > @@ -1790,15 +1789,6 @@ static bool gic_enable_quirk_msm8996(void *data) > return true; > } > > -static bool gic_enable_quirk_mtk_gicr(void *data) > -{ > - struct gic_chip_data *d = data; > - > - d->flags |= FLAGS_WORKAROUND_MTK_GICR_SAVE; > - > - return true; > -} > - > static bool gic_enable_quirk_cavium_38539(void *data) > { > struct gic_chip_data *d = data; > @@ -1891,11 +1881,6 @@ static const struct gic_quirk gic_quirks[] = { > .compatible = "asr,asr8601-gic-v3", > .init = gic_enable_quirk_asr8601, > }, > - { > - .desc = "GICv3: Mediatek Chromebook GICR save problem", > - .property = "mediatek,broken-save-restore-fw", > - .init = gic_enable_quirk_mtk_gicr, > - }, > { > .desc = "GICv3: HIP06 erratum 161010803", > .iidr = 0x0204043b, > @@ -1957,11 +1942,6 @@ static void gic_enable_nmi_support(void) > if (!gic_prio_masking_enabled()) > return; > > - if (gic_data.flags & FLAGS_WORKAROUND_MTK_GICR_SAVE) { > - pr_warn("Skipping NMI enable due to firmware issues\n"); > - return; > - } > - > rdist_nmi_refs = kcalloc(gic_data.ppi_nr + SGI_NR, > sizeof(*rdist_nmi_refs), GFP_KERNEL); > if (!rdist_nmi_refs) > -- > 2.42.0.609.gbb76f46606-goog >
Hi, On Wed, Oct 18, 2023 at 4:08 AM Mark Rutland <mark.rutland@arm.com> wrote: > > On Fri, Oct 06, 2023 at 03:15:53PM -0700, Douglas Anderson wrote: > > This is a partial revert of commit 44bd78dd2b88 ("irqchip/gic-v3: > > Disable pseudo NMIs on Mediatek devices w/ firmware issues"). In the > > patch ("arm64: Disable GiC priorities on Mediatek devices w/ firmware > > issues") we've moved the quirk handling to another place and so it's > > not needed in the GiC driver. > > > > NOTE: this isn't a full revert because it leaves some of the changes > > to the "quirks" structure around in case future code needs it. > > > > Signed-off-by: Douglas Anderson <dianders@chromium.org> > > --- > > I think it might make sense to fold this into the patch adding the cpucap > detection. Otherwise, if you apply my suggestions to the first patch, there's a > 2-commit window where we'll have two places that log that NMI is being disabled > due to the FW issue. That's not a functional issue, so doesn't matter that > much. > > Either way: > > Acked-by: Mark Rutland <mark.rutland@arm.com> I'm happy to go either way so I'd love some advice from maintainers (Marc Zyngier, Catalin Marinas, Will Deacon) about what you'd prefer. -Doug
On 2023-10-30 23:01, Doug Anderson wrote: > Hi, > > On Wed, Oct 18, 2023 at 4:08 AM Mark Rutland <mark.rutland@arm.com> > wrote: >> >> On Fri, Oct 06, 2023 at 03:15:53PM -0700, Douglas Anderson wrote: >> > This is a partial revert of commit 44bd78dd2b88 ("irqchip/gic-v3: >> > Disable pseudo NMIs on Mediatek devices w/ firmware issues"). In the >> > patch ("arm64: Disable GiC priorities on Mediatek devices w/ firmware >> > issues") we've moved the quirk handling to another place and so it's >> > not needed in the GiC driver. >> > >> > NOTE: this isn't a full revert because it leaves some of the changes >> > to the "quirks" structure around in case future code needs it. >> > >> > Signed-off-by: Douglas Anderson <dianders@chromium.org> >> > --- >> >> I think it might make sense to fold this into the patch adding the >> cpucap >> detection. Otherwise, if you apply my suggestions to the first patch, >> there's a >> 2-commit window where we'll have two places that log that NMI is being >> disabled >> due to the FW issue. That's not a functional issue, so doesn't matter >> that >> much. >> >> Either way: >> >> Acked-by: Mark Rutland <mark.rutland@arm.com> > > I'm happy to go either way so I'd love some advice from maintainers > (Marc Zyngier, Catalin Marinas, Will Deacon) about what you'd prefer. I honestly don't mind either way. The sooner we have these fixes upstream, the better, so my only advise would be to respin it shortly. Thanks, M.
On Tue, Nov 07, 2023 at 11:37:18AM +0000, Marc Zyngier wrote: > On 2023-10-30 23:01, Doug Anderson wrote: > > On Wed, Oct 18, 2023 at 4:08 AM Mark Rutland <mark.rutland@arm.com> > > wrote: > > > On Fri, Oct 06, 2023 at 03:15:53PM -0700, Douglas Anderson wrote: > > > > This is a partial revert of commit 44bd78dd2b88 ("irqchip/gic-v3: > > > > Disable pseudo NMIs on Mediatek devices w/ firmware issues"). In the > > > > patch ("arm64: Disable GiC priorities on Mediatek devices w/ firmware > > > > issues") we've moved the quirk handling to another place and so it's > > > > not needed in the GiC driver. > > > > > > > > NOTE: this isn't a full revert because it leaves some of the changes > > > > to the "quirks" structure around in case future code needs it. > > > > > > > > Signed-off-by: Douglas Anderson <dianders@chromium.org> > > > > --- > > > > > > I think it might make sense to fold this into the patch adding the > > > cpucap > > > detection. Otherwise, if you apply my suggestions to the first > > > patch, there's a > > > 2-commit window where we'll have two places that log that NMI is > > > being disabled > > > due to the FW issue. That's not a functional issue, so doesn't > > > matter that > > > much. > > > > > > Either way: > > > > > > Acked-by: Mark Rutland <mark.rutland@arm.com> > > > > I'm happy to go either way so I'd love some advice from maintainers > > (Marc Zyngier, Catalin Marinas, Will Deacon) about what you'd prefer. > > I honestly don't mind either way. The sooner we have these fixes > upstream, the better, so my only advise would be to respin it > shortly. I agree. I can queue them for rc1 if they turn up in time.
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 787ccc880b22..9ff776709ae6 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -39,8 +39,7 @@ #define FLAGS_WORKAROUND_GICR_WAKER_MSM8996 (1ULL << 0) #define FLAGS_WORKAROUND_CAVIUM_ERRATUM_38539 (1ULL << 1) -#define FLAGS_WORKAROUND_MTK_GICR_SAVE (1ULL << 2) -#define FLAGS_WORKAROUND_ASR_ERRATUM_8601001 (1ULL << 3) +#define FLAGS_WORKAROUND_ASR_ERRATUM_8601001 (1ULL << 2) #define GIC_IRQ_TYPE_PARTITION (GIC_IRQ_TYPE_LPI + 1) @@ -1790,15 +1789,6 @@ static bool gic_enable_quirk_msm8996(void *data) return true; } -static bool gic_enable_quirk_mtk_gicr(void *data) -{ - struct gic_chip_data *d = data; - - d->flags |= FLAGS_WORKAROUND_MTK_GICR_SAVE; - - return true; -} - static bool gic_enable_quirk_cavium_38539(void *data) { struct gic_chip_data *d = data; @@ -1891,11 +1881,6 @@ static const struct gic_quirk gic_quirks[] = { .compatible = "asr,asr8601-gic-v3", .init = gic_enable_quirk_asr8601, }, - { - .desc = "GICv3: Mediatek Chromebook GICR save problem", - .property = "mediatek,broken-save-restore-fw", - .init = gic_enable_quirk_mtk_gicr, - }, { .desc = "GICv3: HIP06 erratum 161010803", .iidr = 0x0204043b, @@ -1957,11 +1942,6 @@ static void gic_enable_nmi_support(void) if (!gic_prio_masking_enabled()) return; - if (gic_data.flags & FLAGS_WORKAROUND_MTK_GICR_SAVE) { - pr_warn("Skipping NMI enable due to firmware issues\n"); - return; - } - rdist_nmi_refs = kcalloc(gic_data.ppi_nr + SGI_NR, sizeof(*rdist_nmi_refs), GFP_KERNEL); if (!rdist_nmi_refs)