Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27847656rwd; Tue, 4 Jul 2023 08:39:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HF2N6IUcWdNYTC7ScLaSPURAs496kaODduhugs/Bm9k0f5CAgRtjNvizqa0LcdhoiqLia X-Received: by 2002:a9d:7456:0:b0:6b8:8ed9:aa0b with SMTP id p22-20020a9d7456000000b006b88ed9aa0bmr13548404otk.23.1688485187439; Tue, 04 Jul 2023 08:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688485187; cv=none; d=google.com; s=arc-20160816; b=Rn21P6s0KdVPbun4w1VdtHnmEPqrkx99IhNSmGIZ4vr3uzGHbR7X5WKu5FM5jMpYKr DxALyfj1pIz8WtuvQ7BqqFDNPWWj/upopPQo2MbG68DNEWXX5TYzyKOBav5XU/65Jypg 0JHZZhhoF0iF38dvkgJk/usj7tdj+ZdJ1DzSlQPp3PemCy12xnwkR609m2myxgbWonQo UVXeaBn6SQvcn912BoltlW4Yg91xMSAJ/Blm3y9R83X9DVZkTGFcgu6mT/KnkI+cmSg6 pB1xlR/l3SO4xNkY3nNhN9eOImPWfxZoD5DOSgEBdJBxrva8T2eN+7TOSE12B4Ldk0qG NJtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=8iLXfZPdnSYhMaI75/oQ78uLLhmcg0IDKu5q4MCDcF8=; fh=yZUu7xgbZLnxFKA0TXfA2ZUcbBQhgLn3jvXdCAqvcZg=; b=hz1vmsZRR5gkE97kcduqm+/0z5uhBCcB3tRE+e9Md89iTMpeX5aoseDbW835RSIASn 2YsufLPlWYZYhgOCnFA0qQ1dZRH/zD4Jso6vJ0+1gf5RndZzevj1K6Z+APvbStveLLme IbrpSGWHMn/VEyt3A58rwZW6eLKQYThmW3pmUZjEimI0yb+Sjk9+TzvV8meL7bSpH71A 4U0h1mgP7iCb2xmDaP+eXeao7S8RalZAhJs7FMPXlXgpYtilJuEuA6qVojRML/Ei5Dxk lXxEgZ6mVj2cgcnUb2RWlC2XVslMpPa84kUfIPnWEdG95g6gj7r8uRjKhAvoeu2b8+Kw 4gtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sZg1H7Oi; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r36-20020a632064000000b00542918676f4si21850512pgm.381.2023.07.04.08.39.31; Tue, 04 Jul 2023 08:39: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=@kernel.org header.s=k20201202 header.b=sZg1H7Oi; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229539AbjGDPXQ (ORCPT + 99 others); Tue, 4 Jul 2023 11:23:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231152AbjGDPXP (ORCPT ); Tue, 4 Jul 2023 11:23:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67A23BD for ; Tue, 4 Jul 2023 08:23:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F3A6E6128B for ; Tue, 4 Jul 2023 15:23:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65692C433C8; Tue, 4 Jul 2023 15:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688484193; bh=uDJu7aphH1KIC82n9uZDoP4PlZPJJp9pcFQeamwzMMk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sZg1H7Oih6cfY8L5jsDHE0kBYUdM+isavjUlnWXW0Uu4y/6/SoYZZ5bTflSO+KKeG 8/55D6taS0Im03cxerSTsL94EnaiAclL606CRpVXrceyWfYKWnW+nrrV0HFV1C9RbK 89UJTirtOTCUK7SqnCPgTuTRyB5AsPINwhKIAwn2K48lE69mf7WIuW1AXH5QrzA+ew vf16ehBYcwxb8dNFa5cl85uDZsYkI/QlpK8l0TDf8WcbYFt8V9rMi26xR3euwHN3bP lb7wx9kwI2PNCm8UKuIteAkB7JF1FKyJfE61++5gJYR36AP3NhQJLEAdMEG0FMm9cG VJBk5wTGBDdFw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qGhrz-00AT5j-5o; Tue, 04 Jul 2023 16:23:11 +0100 Date: Tue, 04 Jul 2023 16:23:10 +0100 Message-ID: <86sfa3wvj5.wl-maz@kernel.org> From: Marc Zyngier To: Lorenzo Pieralisi Cc: linux-arm-kernel@lists.infradead.org, Hanks Chen , Cheng-Yuh.Wu@mediatek.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] irqchip/gic-v3: Workaround for GIC-700 erratum 2941627 In-Reply-To: References: <20230704123436.127449-1-lpieralisi@kernel.org> <86ttujwxb1.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: lpieralisi@kernel.org, linux-arm-kernel@lists.infradead.org, hanks.chen@mediatek.com, Cheng-Yuh.Wu@mediatek.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On Tue, 04 Jul 2023 16:14:03 +0100, Lorenzo Pieralisi wrote: > > On Tue, Jul 04, 2023 at 03:44:50PM +0100, Marc Zyngier wrote: > > Lorenzo, > > > > On Tue, 04 Jul 2023 13:34:36 +0100, > > Lorenzo Pieralisi wrote: > > > > > > +static bool gic_enable_quirk_arm64_2941627(void *data) > > > +{ > > > + /* > > > + * If CPUidle is not enabled the erratum runtime > > > + * conditions can't be hit, since that requires: > > > + * > > > + * - A core entering a deep power state with > > > + * the associated GIC redistributor asleep > > > + * and an IRQ active and pending targeted at it > > > + * - A different core handling the IRQ and > > > + * related GIC operations at the same time > > > + */ > > > + if (!IS_ENABLED(CONFIG_CPU_IDLE)) > > > + return false; > > > > Could this still hit on a system that traps WFI to EL3 and uses this > > as a way to enter a low-power mode? > > That's a valid point, I have not thought about that. If there are set-ups > where this is allowed (and I think it *is* architecturally allowed with > EL3 saving/restoring context and entering a deep power state - if you > asked I suspect you have something concrete in mind :)) this "optimization" > must be removed since we can still hit the bug; that's what I shall do > for v2. I do not have a concrete example of anyone doing that, but the fact that it is possible by the letter of the architecture makes me think that *someone* out there must be inventive enough to do it. So I'd rather take the safe option and *always* enable the workaround. And then someone else can rock up and explain why they don't need it. Thanks, M. -- Without deviation from the norm, progress is not possible.