Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp141249rdh; Tue, 6 Feb 2024 23:31:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPs3ZKGJtwihO6cULRBWrjXbliRFj52ItMnxVfgvvnvQyZijCJekkJFTQMAJh27Am2PHod X-Received: by 2002:a17:906:63d1:b0:a38:107a:94f2 with SMTP id u17-20020a17090663d100b00a38107a94f2mr3328903ejk.6.1707291070467; Tue, 06 Feb 2024 23:31:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707291070; cv=pass; d=google.com; s=arc-20160816; b=yg/uUS/kNk4voeGFYQHpSiacJg0oYxlKO8YSm0SdG00Ci9zRfAhWqjklWzCyZgZqzM ujUfTf+3e4NJvp2Mq1jsWT1musozQDQJGBM59BlVbUfJ9NybuIJ6fUHwRhBjkMHtXBbo De+/7esuSJyZ3UCS9fKZo0deJP+3353CVoFMO/PiEgGOQE/B2Kk2tDWyMFaCH3lhiN4n IVdC2zXYmleO/ScOypJVS8tKKQlDAZn0I46oSRy05CTUY5N6/eYTMP0xQ/mJ9QTo4/MR W9pkC5We8jPa/L+/U0DkRPj8RlVt+yCIrJ/fpiBsb+E/oAgI5eYxr4UCVeXAiOnFo3Go wWqQ== 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=peaUftXrWic18CddrBoaXETZSCSrNh8TslugLOSvkCc=; fh=LO/Ydz4ygfGVFkr/vk6TNuFtNdOB8r7qyAj5AKyGmdk=; b=wW8mSj7/NYw6t3DqORFc3Ba9sXUqG8p9diXangqO9HWeaksMzyw82/34cvXseArgsh tGLfC+NemGoyTK+5tmCr9MX2XNP0Snt9EqEY++xWV5TGBkmd6GmIib71wdQuv462Jh57 x7ghtS6rD1eM53UR4QLZakJINiUzWxDN31wrM79gmOU5/L8uD1JoFkHBKUxTYhUuiF6n 0QVl30yXNheMFoJ3ltdDSK/762bXVFHihl4Pxxs69xegIVSCrMCPKLDcQ6e9vmCpaDES QTxlyBIKjCdFkkLkzNZB/96b5OLaIuWr+6hmQ7sHlpfbwMaIZ4ooqphuNbJveLG6lbwz MC3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GGp0VCw2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56078-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56078-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCVZv2krflHUFsgY11RC1ZYQ6O3wRQKaqT6yHQkrZx5FYPw33FzvniQIwCeDbCr9SIMrhfAe7wnttZzl3//DtcQN7EWbtc0Mg8P155YCpQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cd24-20020a170906b35800b00a384f559179si602067ejb.399.2024.02.06.23.31.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 23:31:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56078-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GGp0VCw2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56078-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56078-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 38B021F25799 for ; Wed, 7 Feb 2024 07:31:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C844C1F944; Wed, 7 Feb 2024 07:31:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GGp0VCw2" 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 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-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