From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC844C433FE for ; Wed, 16 Mar 2022 15:19:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357234AbiCPPUn (ORCPT ); Wed, 16 Mar 2022 11:20:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357256AbiCPPUj (ORCPT ); Wed, 16 Mar 2022 11:20:39 -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 DE5E566F96; Wed, 16 Mar 2022 08:19:19 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id EA1D6616C0; Wed, 16 Mar 2022 15:19:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BADDC340E9; Wed, 16 Mar 2022 15:19:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647443958; bh=ISuf0vVn55K3r5StJVz3ehSnX1bkQQCwdAX7lQMDBYY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Vbfqj8vx5tMfPaH3ewD1sb9vlEQOXF5FvW1DnVGI6+FraARhksFIzlCT02vkTDp+k Qwr3FSIVtU+uAiZ1Oxoyy5cjd6EhxOWIiER/Q6R1rPjzbqyS1ap2HcEfQoRQw042D0 fqL6xG+MFIVipBfvezL22Wyz6pr3H19GJzcd/CKyu+TfTqP9KsI+ILxLv/BNUDI+UI w/FGfyJSXxL8ggRMPagf1mjVfYPZMcTNk/VdSotd0t7UK0cPvlVwva/BRRncN40xkM f0704t4nv0C8ABAQ4C/7cCcY2oAJB2PVgO0AvXs2YObkpXNVc6WrNECr1f+2VAbncX VGzn7drjH5vxQ== 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 1nUVQh-00ExEp-Vz; Wed, 16 Mar 2022 15:19:16 +0000 Date: Wed, 16 Mar 2022 15:19:15 +0000 Message-ID: <874k3yylfw.wl-maz@kernel.org> From: Marc Zyngier To: Andre Przywara Cc: linux-kernel@vger.kernel.org, Lorenzo Pieralisi , Thomas Gleixner , Eric Auger , stable@vger.kernel.org Subject: Re: [PATCH 1/3] irqchip/gic-v3: Fix GICR_CTLR.RWP polling In-Reply-To: <20220316145102.28ad0a74@slackpad.lan> References: <20220315165034.794482-1-maz@kernel.org> <20220315165034.794482-2-maz@kernel.org> <20220316145102.28ad0a74@slackpad.lan> 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: andre.przywara@arm.com, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, tglx@linutronix.de, eric.auger@redhat.com, stable@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Mar 2022 14:51:02 +0000, Andre Przywara wrote: > > On Tue, 15 Mar 2022 16:50:32 +0000 > Marc Zyngier wrote: > > > It turns out that our polling of RWP is totally wrong when checking > > for it in the redistributors, as we test the *distributor* bit index, > > whereas it is a different bit number in the RDs... Oopsie boo. > > > > This is embarassing. Not only because it is wrong, but also because > > it took *8 years* to notice the blunder... > > Indeed, I wonder why we didn't see issues before. I guess it's either > the UWP bit at position GICR_CTLR[31] having a similar implementation, > or the MMIO access alone providing enough delay for the writes to > finish. Because we don't strictly need to wait. Most of the time, the write will have taken place long before we can observe any effect of it. And how often do we disable a SGI or a PPI? Almost never (the PMU is the only one that I can think of). > Anyway: > > > Just fix the damn thing. > > > > Fixes: 021f653791ad ("irqchip: gic-v3: Initial support for GICv3") > > Signed-off-by: Marc Zyngier > > Cc: stable@vger.kernel.org > > Reviewed-by: Andre Przywara Thanks, M. -- Without deviation from the norm, progress is not possible.