Message ID | 20240109-fencei-v6-0-04116e51445c@rivosinc.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80EF4C47079 for <linux-riscv@archiver.kernel.org>; Tue, 9 Jan 2024 18:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=RzTaMJ4DtKdibK+yTIVLao2OCpphKp5kRYbLQxNcrPk=; b=G5Jybd4PakxPcV LNTvf2p9NHDYZRobx48A3U8mcjV1Pb+HUue3mfIpkYZ+QUyvbyuSQ2UV/1sxbZyq5dfVG4GNhk21l E9BEIX0LcqRNfXmeX8WxOaQ45zmixXarPAx/GedUmh0Xls3Ow4ADCtwoOzUWWKrfwipTkJXnSA+dy pG3Bzz9BIWTN61muSQo08oiUOcz8rvmpbNpPwwyzGzvyfzJIwEQNU+FtiDKzL8JdeD5UcUIfAdp3s lM/S94aw6DD8lkJSqlt+iE2sL42DUuBfNCBu2JaAxdfq833q3KVz+i/Xf1yNwPfWIYOjZ6o2QiNas jhmIYDayTA5cWplv9Yqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNH4Z-009CFa-0H; Tue, 09 Jan 2024 18:43:35 +0000 Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rNH4V-009CDI-0n for linux-riscv@lists.infradead.org; Tue, 09 Jan 2024 18:43:33 +0000 Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-206689895bfso218824fac.1 for <linux-riscv@lists.infradead.org>; Tue, 09 Jan 2024 10:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1704825808; x=1705430608; darn=lists.infradead.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=w8tIh5/SJkOUUlCOBe2SBZ/CeVYcs+QLRLt1HCIE+Zg=; b=dMLp2gU/ybLCuQum+k4cmyjWH7ML2UjS7Y2WO7S48cWtpf9nuUD21ZWvnrEu57x7WE Wn9MWtvG3NmHr11UE0C6zJjsOfAHIKxQDMYAl3WvcjkgjPBywplgQqE8E01HvuN0cpFB yw6pGW3UJF8gTs/23iHMHutpycyLnsMx93xe90iEOm9AjXem9NQM0hb3OR1Ek3IjmxjJ ZXBWVo2xDqtGG5jKhW+afVOOfaeo3jRqm27sfFutkTVZqObpaR5s/JCamHk67jq2xwsv Hgb9UjchLWSICsa/GHskh+IXsVJSepFEPQcAHUMW4dv8uZ+D2r8GtkF3bnq2abv6HTZR 3A+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704825808; x=1705430608; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=w8tIh5/SJkOUUlCOBe2SBZ/CeVYcs+QLRLt1HCIE+Zg=; b=VDDyDgw8od0p0+tUONBhSb7bJpvYT/y7/8/65GYPoa8sZI+EVN8gjtmVQ8RtcDr1Su k9pprUrZ9P/gAtDXculjplYimcUCzOhEHyaSh1zDDq1vJ800u/Bakl0y6OmOKE2RvSVs gYgq9xp0nuRi/Kn8yLjF9jk1QKjKRCvRd/ntqMJPWF3Wv5DLuLxujGYVZRq85BT1DBQg o8kg7dtwXiJU+/5b+Yg6b+KG/DQ5RoDI+sosGTQg0SM+sEDr3i3LuSLlrQfKb1+mDLkW Xcs93pG6MO7CW+TpAxTwKqUnnH8234csZ4mF0uRUsIj4fcOhIpOKbgZc9VrkQwzdmQED jPSA== X-Gm-Message-State: AOJu0YzKUOOgkiInB30XXF3r5NKvLM9hU8G+pA1nut4TVyDJ2AaPqNxi QvCUxA3Nh3bOWtDMCmFi3ynGaAu3/s6T2w== X-Google-Smtp-Source: AGHT+IFcxswKi7F7pE1xwoT7t0vdbShn5ks82furi63XCAnlNWziga0jcShQ7a72MoVw6ae19zgnhA== X-Received: by 2002:a05:6870:d14b:b0:206:d54:7b2a with SMTP id f11-20020a056870d14b00b002060d547b2amr4357731oac.116.1704825807883; Tue, 09 Jan 2024 10:43:27 -0800 (PST) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id j2-20020a9d7682000000b006ce2c31dd9bsm450423otl.20.2024.01.09.10.43.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 10:43:27 -0800 (PST) From: Charlie Jenkins <charlie@rivosinc.com> Subject: [PATCH v6 0/2] riscv: Create and document PR_RISCV_SET_ICACHE_FLUSH_CTX prctl Date: Tue, 09 Jan 2024 10:43:24 -0800 Message-Id: <20240109-fencei-v6-0-04116e51445c@rivosinc.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAMyTnWUC/23PTW7DIBAF4KtErEvEDGBIV7lH1AU/Q8OidgURS hX57sVR40SVl2/E94a5sUolU2Xvuxsr1HLN09jD8LZj4ezGT+I59sxQoAQAwxONgTJPhzSIaKx KTrD++LtQytd70emj53Oul6n83HsbLNO/CsRHRQMuuKcgLEDwCHgsuU01j2Efpi+2tDR8kVKsE rvE4AeUzoOHtCHlUyLIVcplp9GgLUpL3mxI9ZBKgFgPbqrLqELC5A9CR7kh9au0q9RdOgekIRp E/P/beZ5/AdWDF6iHAQAA To: Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Jonathan Corbet <corbet@lwn.net>, Conor Dooley <conor.dooley@microchip.com>, =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= <cleger@rivosinc.com>, Atish Patra <atishp@atishpatra.org>, Randy Dunlap <rdunlap@infradead.org> Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Charlie Jenkins <charlie@rivosinc.com>, Atish Patra <atishp@rivosinc.com> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1704825806; l=1943; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=fXFUftloV5jzL0u4aeVUYxoLDAW2ZraqE9n+Yoo2iUk=; b=NAtn7SuloNiPreSBIIN21r9pJE15rERzjhOZSODLLXEdLhVRFRC8siAHMji5UtZHKbUt+hl9p Ho5wmA+uqyvCZcZ+W2SeQp3SK39CsEpKGvR1kOj5ba0MSK+R4hNMYAb X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240109_104331_491723_7CCB6752 X-CRM114-Status: UNSURE ( 8.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-riscv.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-riscv>, <mailto:linux-riscv-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-riscv/> List-Post: <mailto:linux-riscv@lists.infradead.org> List-Help: <mailto:linux-riscv-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-riscv>, <mailto:linux-riscv-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-riscv" <linux-riscv-bounces@lists.infradead.org> Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org |
Series |
riscv: Create and document PR_RISCV_SET_ICACHE_FLUSH_CTX prctl
|
expand
|
Improve the performance of icache flushing by creating a new prctl flag PR_RISCV_SET_ICACHE_FLUSH_CTX. The interface is left generic to allow for future expansions such as with the proposed J extension [1]. Documentation is also provided to explain the use case. [1] https://github.com/riscv/riscv-j-extension Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> --- Changes in v6: - Fixup documentation formatting - Link to v5: https://lore.kernel.org/r/20240108-fencei-v5-0-aa1e51d7222f@rivosinc.com Changes in v5: - Minor documentation changes (Randy) - Link to v4: https://lore.kernel.org/r/20240107-fencei-v4-0-d4cf2fb905d3@rivosinc.com Changes in v4: - Add OFF flag to disallow fence.i in userspace (Atish) - Fix documentation issues (Atish) - Link to v3: https://lore.kernel.org/r/20231213-fencei-v3-0-b75158238eb7@rivosinc.com Changes in v3: - Check if value force_icache_flush set on thread, rather than in mm twice (Clément) - Link to v2: https://lore.kernel.org/r/20231130-fencei-v2-0-2cb623ab1b1f@rivosinc.com Changes in v2: - Fix kernel-doc comment (Conor) - Link to v1: https://lore.kernel.org/r/20231122-fencei-v1-0-bec0811cb212@rivosinc.com --- Charlie Jenkins (2): riscv: Include riscv_set_icache_flush_ctx prctl documentation: Document PR_RISCV_SET_ICACHE_FLUSH_CTX prctl Documentation/arch/riscv/cmodx.rst | 88 ++++++++++++++++++++++++++++++++++++++ Documentation/arch/riscv/index.rst | 1 + arch/riscv/include/asm/mmu.h | 2 + arch/riscv/include/asm/processor.h | 6 +++ arch/riscv/mm/cacheflush.c | 58 +++++++++++++++++++++++++ arch/riscv/mm/context.c | 8 ++-- include/uapi/linux/prctl.h | 4 ++ kernel/sys.c | 6 +++ 8 files changed, 170 insertions(+), 3 deletions(-) --- base-commit: b85ea95d086471afb4ad062012a4d73cd328fa86 change-id: 20231117-fencei-f9f60d784fa0