Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp2087278lqg; Mon, 4 Mar 2024 12:24:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVW6heKacZl1QIUEynZ6VtuaTJOv57QCHevqn0fMqFyqqdcpbodEjb2sQ4h0euRT8dNuZ9Xjv9HNsxFp9011dyQGCuTKAhus/ytdcW5vQ== X-Google-Smtp-Source: AGHT+IFo0WegPRC+6gQdAQHSKeZYXTtEmJkdluChJ7maSQkdCJk+XFPGHAq0xj6UC9KC33QsIcWF X-Received: by 2002:a05:620a:4095:b0:787:debf:c584 with SMTP id f21-20020a05620a409500b00787debfc584mr963072qko.1.1709583859802; Mon, 04 Mar 2024 12:24:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709583859; cv=pass; d=google.com; s=arc-20160816; b=H00D/CLuvtlu/D2P2s7ImYo0xbJ5VwvRx912HKZrG0rt9X/s64AMWIk1cDWkIHrNAQ BUAS+R+u/FXSJPR2rTmOPWnSrAEJSnBDQnGuzqogUdFcgW4vkDSbU64caFLH4eS0QBb4 lWiRWcQfmR1IObOpnqnLRFAc3G/aai7SQu4rugJPeaPG12mp4p0nXkJlw76ZDyxo3Yse 8NIDPAX/+0Ujh/y113iMOyE+sl0kHqSKPZBnIkfpAeeQM4OBldMQ58ILxKvFSzuehLMC gGPA4AgIj3VQhTY8IZhF7+hphXSimy9nN9hJeuNOZVQy6kRZ50vMdutgZ6oQ37ZBkoYW dzbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=uFdMSM3qZM+dt1Bib9NpBh7aRqMQlZ7L+ConpzhZ4zI=; fh=AtqPcORWCm8Wq5CTqkm3awNKrNL8eMA34GvjCC0iYjk=; b=vTNOBf5lBbhaj/IkuW76BLLxj5X9FgyVuPFv5VzYn++SaSKFMcFu4DWfbqGGHAJsMg AJafwce8aP6h0HHmBsyNON6SBeqnSrXXbwRZm1hsSfFGDCh29veH7pnQfoGN/pyCuSyg oLFL5lup54t0wIiUiu4pjs/cUft6OMWZ2Dnbj5rUqr+z2ArL2jvqCnLgzFMMS3yoT9bm lj2RGOqqw3nJsenFHnMQSc6zRENoUjOnVLPc0X0pEZZkZAd9O94X/6Km7ljGbDoamL2g gD2rIeVMpTJyi/N4TD3qTsFUddSnK3aWPN5HA4YP8YheS9w8odSNQq/z7TOtONI5Ua4/ Z4Pg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=esKk90ck; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-91227-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91227-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vr10-20020a05620a55aa00b00788267a54f0si3290924qkn.156.2024.03.04.12.24.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 12:24:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91227-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=esKk90ck; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-91227-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91227-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 883381C22603 for ; Mon, 4 Mar 2024 20:24:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA26C7AE75; Mon, 4 Mar 2024 20:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="esKk90ck" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AAA14AEF9; Mon, 4 Mar 2024 20:24:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709583853; cv=none; b=Y29Y2XPLEYlSUaCJdQ13hzTtBMfXbmfv292L7V4A0JSDrwh6siJ8HUDbQ3Hibc50JZHarqRU8UwBoiQ5DwvFWoL4sGmgmfwesg1Ycgh2LuIuEdMWAy/oXx/pdjSqaKyPchWTUe7RaU2XsEkXwG9jn9rOb1aElDVobHedN7hRlEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709583853; c=relaxed/simple; bh=uFdMSM3qZM+dt1Bib9NpBh7aRqMQlZ7L+ConpzhZ4zI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=W63KibzYUp8pRyXoRIC9Rxkliu8FmolE4ryTDLPOACNT88DGrjJno8Rud6rhghNdKleDVO+yUevX7stgPu0XsFoAsCfcA/ELdHrCdUcY5a0OAzhflURriW4zQbFni0yMCf2PXR/jZ9Jh1NtJQX8+iCxmoWHDYrn2pb8QJy30At4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=esKk90ck; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A67DC433F1; Mon, 4 Mar 2024 20:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709583852; bh=uFdMSM3qZM+dt1Bib9NpBh7aRqMQlZ7L+ConpzhZ4zI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=esKk90ckOpB4uFBQnt/GYpn0GrhgyghLnGC7L0zw12stK+8uozpCBiKrOB4m1a0ZA pRMxW4h6bymwqgtxGEcA9Hif4E32M+6hzng349/9lt4ejmj6/LKjrMzzPLuvTecAd2 CePkDGtzs8UDm+NCl/rBP5HAuAl27/VYYe1iv0WUDBNruGoOdjnsylp81rLl9ADv5v MxYyqkQTeNQ/lGDsVoYsfYpV001tkYqcXMeotIgkURA5k5NyEJzodV6euzmmG/syIX dwV4PjWi4j0mid1r6gLBZ2gHiKpHnnvxIXX0u4RerpFB+bC5vdX1iwkHdAJ/0IuuUG XnLhQXVAShCtQ== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Conor Dooley , Alexandre Ghiti , Anup Patel Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrea Parri , Samuel Holland , Steven Rostedt , Masami Hiramatsu , Mark Rutland , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , Andrea Parri Subject: Re: [PATCH v3 2/2] riscv: Fix text patching when IPI are used In-Reply-To: <20240304-makeshift-bakeshop-26c9611de1a3@spud> References: <20240229121056.203419-1-alexghiti@rivosinc.com> <20240229121056.203419-3-alexghiti@rivosinc.com> <20240304-makeshift-bakeshop-26c9611de1a3@spud> Date: Mon, 04 Mar 2024 21:24:09 +0100 Message-ID: <87msrdzqxi.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Conor Dooley writes: > On Thu, Feb 29, 2024 at 01:10:56PM +0100, Alexandre Ghiti wrote: >> For now, we use stop_machine() to patch the text and when we use IPIs for >> remote icache flushes (which is emitted in patch_text_nosync()), the sys= tem >> hangs. >>=20 >> So instead, make sure every CPU executes the stop_machine() patching >> function and emit a local icache flush there. >>=20 >> Co-developed-by: Bj=C3=B6rn T=C3=B6pel >> Signed-off-by: Bj=C3=B6rn T=C3=B6pel >> Signed-off-by: Alexandre Ghiti >> Reviewed-by: Andrea Parri > > What commit does this fix? Hmm. The bug is exposed when the AIA IPI are introduced, and used (instead of the firmware-based). I'm not sure this is something we'd like backported, but rather a prerequisite to AIA. @Anup @Alex WDYT?