Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp913720pxp; Wed, 16 Mar 2022 21:06:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBKnHYjHmbAkfqQvbycUkbbJJpnUw8MtYDUr/QhADdWzgvCfnwI8wtsPvgBse/ZRfN5H7I X-Received: by 2002:a17:902:aa0b:b0:151:e196:c6e4 with SMTP id be11-20020a170902aa0b00b00151e196c6e4mr2865428plb.162.1647490019030; Wed, 16 Mar 2022 21:06:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647490019; cv=none; d=google.com; s=arc-20160816; b=NTYzos05NDhUCzbWXnCKtePL1N+bqNQXAgDUZRCb2a6eAuddsUkJIxx4/wUq3JqHhe u5PwU4J4YQq4wJUJOXp7bEWEtZJ7H4G8jfZKFsbUsl5Oa1M9SFGwvZil6wO+Q/T/M8aj UutLP7nOHMGcxE8b1waBLeNJaAmAX84gYoUs0yVIK0mZLPAbNYfSCYY9zuFZGJSqAdjy GCAkgybQQ85VXeaih7Bow0s126U4kKf0uItkrwSaE52W0GM0xnMNPqjnNqoCwXPpw3fx /xVKDrgA4TPoUBjSSeMpqeSwQXxwTM7rDZd+QHMRXKOotc70w0OdBsKr98p1XjKDAoZP CDdw== 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=FF2VHk4zhB1WY8e6nhwlwMniIywSxGL01ht32f2vuJ8=; b=PUEFjZ+xq9r6L7F6/Fe/bFmMJ76Z9WPiDUJc+JR4lTM0KK4CBYM74GD1ZCQVC4sFVR TSHVUbZ2sWxVnLQZDkJ7Z7R9UG8G+Hat+jqGoHYp6TsiwJwT+BwK5/lTp328kLsDiILK qTRWw/66LRnVAOYCHLUPegJDQaKEqns2aKPVlILdnpt5s3a+4yD/Hf/Qi4nskXAtxlM5 2uJeajGeVeRXcTEMS0hFPJqEQ40rm1eHcWgWJzBvZr277/kVeOghrr2QgLRqrOBCYNCa 4lZNW4RvmqOBZZxTw+oi/apojgAvENPRwQWv0AD4F9JrEzbsb49p5+Jl0MdKpQwubhBh sA6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vbfqj8vx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 3-20020a17090a194300b001bd14e03065si1175263pjh.61.2022.03.16.21.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:06:59 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vbfqj8vx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 42BEDB8B; Wed, 16 Mar 2022 20:47:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357230AbiCPPUn (ORCPT + 99 others); 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 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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.