From mboxrd@z Thu Jan 1 00:00:00 1970 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 DD8811F61C; Wed, 7 Feb 2024 07:31:01 +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=1707291062; cv=none; b=dUvkSIMxbGHRZCe3dQl1jhzJXIn5wvyinIvpIc9y882D/KvphAT25XuUM59ENE5DV7sqpcIPElE80cPCK6hiXpD/2xy87svVAYv4NK61j86i74ZUyvGb5mCU90jb3BxZu2M3Q4jh49qxiU+AlPWdSGroMytymZZuW3fUmjeHY6M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707291062; c=relaxed/simple; bh=peaUftXrWic18CddrBoaXETZSCSrNh8TslugLOSvkCc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=YNkLeGG0m01Yy2gayKjNrXNfOkMkpwqQ8iZ+C8+TK+1479a8DSfp2fIVZedrvKzDm9bSNsn+UBXxZrlqRB2AMDfJmzI4uNAZZDHZRMFmYk3xObEFx2LW/gW2UnNdYK2kkZyp4XBH2q3zO2Fr5hzEnjdyzKIgvajR4NL81OfSxsI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GGp0VCw2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GGp0VCw2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EB2DC43390; Wed, 7 Feb 2024 07:31:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707291061; bh=peaUftXrWic18CddrBoaXETZSCSrNh8TslugLOSvkCc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=GGp0VCw2X51EtMDNXx1G6fetOHUR7yDlPXgybkXspa9fS369foFEpGFgJmBCAfLLN SHsFXrJ9QaywGjYulhRdz/cR3nol8JMP7xgQ1PX3W1Uu+nwSi3t4myf0cNYyiC/jJP eej6At8hHcdrcJFtZd37r5xRmbMofe4oPOPOVnqMVeZi1NNsNRVC90il6VzPDp3YeV 2z8eafu6s1V5ip8CJmmfRc7zE+P7ebFN63VNcDYVRvcyhp2vr/vtiFqzZCP6IFN4kb aYkQLKXHRM6Y6ASUGzpZ0b2u4vvR0i6q1Wnp/PqAlIDXen5BCTMVn34UFbdDZMlh8N Tmf01WrbqJieQ== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Alexandre Ghiti , Paul Walmsley , Palmer Dabbelt , Albert Ou , Anup Patel , Steven Rostedt , Masami Hiramatsu , Mark Rutland , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Alexandre Ghiti , =?utf-8?B?QmrDtnJuIFTDtnBl?= =?utf-8?B?bA==?= Subject: Re: [PATCH] riscv: Fix text patching when icache flushes use IPIs In-Reply-To: <20240206204607.527195-1-alexghiti@rivosinc.com> References: <20240206204607.527195-1-alexghiti@rivosinc.com> Date: Wed, 07 Feb 2024 08:30:58 +0100 Message-ID: <87v87091e5.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-trace-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 Alexandre Ghiti writes: > For now, we use stop_machine() to patch the text and when we use IPIs for > remote icache flushes, the system hangs since the irqs are disabled on all > cpus. > > So instead, make sure every cpu executes the stop_machine() patching > function which emits a local icache flush and then avoids the use of > IPIs. > > Co-developed-by: Bj=C3=B6rn T=C3=B6pel > Signed-off-by: Bj=C3=B6rn T=C3=B6pel > Signed-off-by: Alexandre Ghiti FWIW, the BPF selftests pass nicely with this (especially the fentry/fexit tests ;-)). I don't know if it's worth much saying that your own stuff was tested, but here goes: Tested-by: Bj=C3=B6rn T=C3=B6pel