Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2665691pxp; Mon, 7 Mar 2022 22:10:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwG0qMAlM9ptkZC+fBO/vhkiENPSc2pk3Bgpyxy8xZkk7/CE/qn5OSh0nxnPw8ByC4kYZSQ X-Received: by 2002:a05:6402:22a3:b0:415:ce95:7eb8 with SMTP id cx3-20020a05640222a300b00415ce957eb8mr14589082edb.388.1646719838403; Mon, 07 Mar 2022 22:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646719838; cv=none; d=google.com; s=arc-20160816; b=TjaATj7NwDrHvm/lZHMw3pASjjXHgJm8M6F6UeMI/aqNZSXfzhWiAiS9i1OUU4zro6 NWgu6l5nfCVkBJDLXkJH/S2P7P7jtdPegxIcsqIs4NK4XOP+V2ZWYIzLsszSJ21ZgKpr iRw99ITMLvnUQPe+Z+KAVBMVHkQyZ2rLwOu7AmZUqe0dAaOMc81XASjzq7IEXIImhvLR u5AmWSh+y7UBc4EvnarcWCqIqixLKo6zyuq58t44/hOccVgWlpktf6zWM2AMZhi1Tbf5 ALdiAYhCk3PJW8rwy7QAsvQrjnBSLg51YMWHBeure//MuWBfkjk6c5o36NyKVI8Amq1+ 4yfQ== 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=C+ospGwp0pCuhw4I4jiYlv6Pv2nsiGJAFDf5tvgopps=; b=AtlHu85VUGUmOd41a1uYy2RofN2LdQudTx8xNWoAaGFd88lFUKlA0pyTMI21BIdrKf igdpVB7ZqbXxPbSHIcJogStRfhzQLSvVQrNmmh3L2zMa6+f/QA/pUvRZI0fhnDdyPTl9 Wu5XsJ7vqhvf7ADRanocUibT/+Abcepm7E408Z0XTzlBo2DBRnQcCrzKTZbc1HuBaa9s GD/72Bfo6j4BZ6UiGd+YDCnQG7/GFdr05Gf9ggoayUftWxu0NoMTTiMPOUIOa6MK51YE CS815Jr8KEC1QOeaMJZKOwct80BVqzqbmefxzp6t/+w+yOyw7q1cOSYmGx5bhoAeyGv0 eZhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ow+8Cy+y; 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 gn10-20020a1709070d0a00b006daab61c524si8231778ejc.918.2022.03.07.22.10.16; Mon, 07 Mar 2022 22:10:38 -0800 (PST) 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=Ow+8Cy+y; 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 S243318AbiCGOk0 (ORCPT + 99 others); Mon, 7 Mar 2022 09:40:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234931AbiCGOkY (ORCPT ); Mon, 7 Mar 2022 09:40:24 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6046665497 for ; Mon, 7 Mar 2022 06:39:30 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1A7DAB815AC for ; Mon, 7 Mar 2022 14:39:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B398FC340E9; Mon, 7 Mar 2022 14:39:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646663967; bh=YfE/KGzlAzInoMUlekJ47nSUzyULGjw7PxFX9ewaJtw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ow+8Cy+yPZwA9pJzACUmolLy6Dyr0vQVWel51k/LWd2tX1jVyx6E5RoAPJR5NJcNF ZD2H0mKkwnVdxQFIoyKE0i7BYC6YkBjZxXFUsmOLzS3EOGNkwdIsJ/TaXEx3ERqE80 zlsXrVN6LIhqJlJlLT2xlCesDaDSDkrPpdBULhRq7rwbcb04q2gzZMQCfHcK4BSW0q Oj1XGkPAQVZsf5NvwrgGa9to7k6w+fdqGWpQ/Ax0p9JExYq7WUmFfrqPG3Rh4iSdcF cCgehfrshFpVubGFWT2GQWv0RVI+E5Ms6OE4CJ3Q3EAjUhabV041th/eJdtmN3iyjB 9JUQOtn7LLsXw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nREWD-00CoSw-CB; Mon, 07 Mar 2022 14:39:25 +0000 Date: Mon, 07 Mar 2022 14:39:25 +0000 Message-ID: <877d9525eq.wl-maz@kernel.org> From: Marc Zyngier To: , , Linu Cherian Cc: , , , Subject: Re: [PATCH V3] irqchip/gic-v3: Workaround Marvell erratum 38545 when reading IAR In-Reply-To: <20220307143014.22758-1-lcherian@marvell.com> References: <20220307143014.22758-1-lcherian@marvell.com> 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/27.1 (x86_64-pc-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: catalin.marinas@arm.com, will@kernel.org, lcherian@marvell.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuc.decode@gmail.com 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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Mon, 07 Mar 2022 14:30:14 +0000, Linu Cherian wrote: > > When a IAR register read races with a GIC interrupt RELEASE event, > GIC-CPU interface could wrongly return a valid INTID to the CPU > for an interrupt that is already released(non activated) instead of 0x3ff. > > As a side effect, an interrupt handler could run twice, once with > interrupt priority and then with idle priority. > > As a workaround, gic_read_iar is updated so that it will return a > valid interrupt ID only if there is a change in the active priority list > after the IAR read on all the affected Silicons. > > Since there are silicon variants where both 23154 and 38545 are applicable, > workaround for erratum 23154 has been extended to address both of them. > > Signed-off-by: Linu Cherian > --- > Changes since V2: > - Changed masked part number to individual part numbers > - Added additional comment to clarify on priority groups > > > Changes since V1: > - IIDR based quirk management done for 23154 has been reverted > - Extended existing 23154 errata to address 38545 as well, > so that existing static keys are reused. > - Added MIDR based support macros to cover all the affected parts > - Changed the unlikely construct to likely construct in the workaround > function. > > > > > Documentation/arm64/silicon-errata.rst | 2 +- > arch/arm64/Kconfig | 8 ++++++-- > arch/arm64/include/asm/arch_gicv3.h | 23 +++++++++++++++++++++-- > arch/arm64/include/asm/cputype.h | 13 +++++++++++++ > arch/arm64/kernel/cpu_errata.c | 20 +++++++++++++++++--- > 5 files changed, 58 insertions(+), 8 deletions(-) Looks good to me this time. Catalin, Will: happy to take this into the irqchip tree for 5.18 with your Ack, or you can take it into the arm64 tree with my Reviewed-by: Marc Zyngier Thanks, M. -- Without deviation from the norm, progress is not possible.