Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26682477rwd; Mon, 3 Jul 2023 13:18:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlFzg59zAxBmpbuMNsMVGj9k1McMI1KCZXXTP6f2LvTex1ku/4e/LWgCbG4z7wlFYSjps63n X-Received: by 2002:a17:90b:b03:b0:262:f872:fa77 with SMTP id bf3-20020a17090b0b0300b00262f872fa77mr12422212pjb.31.1688415488909; Mon, 03 Jul 2023 13:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688415488; cv=none; d=google.com; s=arc-20160816; b=WLZKmhQ4xW3Tn1o5ZgdsJFnh/2/0Fx/TwFAl2xu5BI3LDKZl/YDr4VSbHvoave1YTv mAFSfnou+/vR9vFAa7y4v9C37hN9eJNThiGNQGIxMROU1Sep00zmDai04FDFq4Lo166k mTGlW5MsELlGkLGhuey9YJLFzSlz12jZmTLN2VhWZWYYT6Cd8FvDoCKABOfp5oECvV7k 8ylncfDfdCMXX045q7/A1VJ9K1yxdNx8QiuAfNOQsOyo/rCV0hAeYc15q3NIpvJFKDUx l0W2E/J19LeOgwxXzRXRtjkQYbke2jRXgdrT4HG36R9IEpASxl5lcboihInglqlLOpFo 7stg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ChqPLwVyyWiz2oH9Aeanuwy4456L7gyweA0wu0dU1AQ=; fh=ft1+O9BA406TDoEUlvdn6D1+WzW4pnWUlzwuvOGdMdY=; b=MgEfyDXh0AYtMdTbHFOfL41v/pRn3+8RttRGyLgUj16ct6QDZDmJS9tEwPuSZtonJn BZPZzXEx8SdSzxh/LgI5e2h8Na+K0OUK+FYx053CEoVYe2OjTfWXC6Xn+4Y9TEuCBBsq O6xRVggM1SFPsR4QHDYIlCmgbnuOxU8klFniCshcAw50S09vIQCT/gvcZRnltUA04TrB anlZjrS+Y0SY7d4lDFnH6jrgecIT8G772eXGXpjQikWoKTJviKPhW7mRm+8lzMHyApGQ rGHL3mifpvh2RKW6MhlVoF+3MIe4Oj2JtQ+tIsif5pMVPGdOebI/kDMDITYNcgNR+2Gb 25KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WOrB9I8V; 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 bv3-20020a17090af18300b002636433a84csi8316526pjb.29.2023.07.03.13.17.56; Mon, 03 Jul 2023 13:18:08 -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=WOrB9I8V; 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 S231348AbjGCUEo (ORCPT + 99 others); Mon, 3 Jul 2023 16:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbjGCUEn (ORCPT ); Mon, 3 Jul 2023 16:04:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B0E9E6E for ; Mon, 3 Jul 2023 13:04:42 -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 DE21D6102A for ; Mon, 3 Jul 2023 20:04:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22184C433C9; Mon, 3 Jul 2023 20:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688414681; bh=IcAfiG8OOKpZDvnjSGgNJHeFNEOo0/ajdloiPrl28ws=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WOrB9I8Vi54BjlJVkPrHXRdks0lQ+yE0MtmdCDiiWhWm8C1/zWOpzWg1RHV79H6sQ pwy2pk6PXsl6gx7Y+4jADWloLrXqmQ5ms6oqwniIobcgVOGX0OxFyxfeAbCIJI701m VtyVn71ldOZGADPyEEJjD1/YkM9wALYbJx3pum5vLlPPI+LEBg5d9yq+waeMc8W3VE N2fvG95amZ6zP5/BvyN0OgrX4xScqKXBsKdvgXeqwNFdyfic5scrQYckloJ7itSSeO hy15qo+ZG1Chfg6F1PuLJREGZDzf8qbOJ7KLCJRwJydGKNW8oU3RdXAs1PDpcZi5Jb fSXgreQWAWITA== Date: Mon, 3 Jul 2023 21:04:37 +0100 From: Conor Dooley To: Marc Zyngier Cc: linux-kernel@vger.kernel.org, Anup Patel , Palmer Dabbelt , Linus Torvalds Subject: Re: [PATCH] risc-v: Fix order of IPI enablement vs RCU startup Message-ID: <20230703-baffling-pesticide-e83e74506d2b@spud> References: <20230703183126.1567625-1-maz@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mZHX4r2uUXdT/n9O" Content-Disposition: inline In-Reply-To: <20230703183126.1567625-1-maz@kernel.org> X-Spam-Status: No, score=-7.1 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 --mZHX4r2uUXdT/n9O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 03, 2023 at 07:31:26PM +0100, Marc Zyngier wrote: > Conor reports that risc-v tries to enable IPIs before telling the > core code to enable RCU. With the introduction of the mapple tree > as a backing store for the irq descriptors, this results in > a very shouty boot sequence, as RCU is legitimately upset. >=20 > Restore some sanity by moving the risc_ipi_enable() call after > notify_cpu_starting(), which explicitly enables RCU on the calling > CPU. >=20 > Fixes: 832f15f42646 ("RISC-V: Treat IPIs as normal Linux IRQs") > Reported-by: Conor Dooley RCU no longer chucks the toys at least, and none of the wheels seem to have fallen off the pram in the process. Tested-by: Conor Dooley Thanks guys! > Signed-off-by: Marc Zyngier > Link: https://lore.kernel.org/r/20230703-dupe-frying-79ae2ccf94eb@spud > Cc: Anup Patel > Cc: Palmer Dabbelt > Cc: Linus Torvalds > --- > arch/riscv/kernel/smpboot.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c > index bb0b76e1a6d4..f4d6acb38dd0 100644 > --- a/arch/riscv/kernel/smpboot.c > +++ b/arch/riscv/kernel/smpboot.c > @@ -238,10 +238,11 @@ asmlinkage __visible void smp_callin(void) > mmgrab(mm); > current->active_mm =3D mm; > =20 > - riscv_ipi_enable(); > - > store_cpu_topology(curr_cpuid); > notify_cpu_starting(curr_cpuid); > + > + riscv_ipi_enable(); > + > numa_add_cpu(curr_cpuid); > set_cpu_online(curr_cpuid, 1); > probe_vendor_features(curr_cpuid); > --=20 > 2.34.1 >=20 --mZHX4r2uUXdT/n9O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZKMp1QAKCRB4tDGHoIJi 0si4AP96MGH5Dcx1wg1Nl3BnBttJga0JE12zbFkTI16bAa77twD/S8vn4w5Qp2xv u33U0BseMblhaYqyPwlfApckykURmgE= =DrS2 -----END PGP SIGNATURE----- --mZHX4r2uUXdT/n9O--