lkml.org 
[lkml]   [2023]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] riscv: Include riscv_set_icache_flush_ctx prctl
On Wed, Nov 22, 2023 at 05:03:20PM -0800, Charlie Jenkins wrote:
> +
> +/**
> + * Enable userspace to emit icache flushing instructions.
> + *
> + * When in per-process context, there may be multiple threads using the same mm.
> + * Therefore, the icache can never be assumed clean when. Multiple threads in
> + * the process may modify instructions in the mm concurrently.
> + *
> + * In per-thread context, it can be assumed that all modifications to
> + * instructions in memory will be performed by this thread. When the thread is
> + * migrated the icache will be flushed.
> + *
> + * @arg arg: Sets the type of context
> + * - PR_RISCV_CTX_SW_FENCEI: Allow fence.i in userspace. Another fence.i will
> + * emitted on thread/process migration.
> + * @arg per_thread: When set to 0, will use the default behavior of setting the
> + * icache flush context per process. When set to 1, will use a per thread
> + * context.
> + */

FYI, this is not valid kerneldoc and breaks allmodconfig builds:
arch/riscv/mm/cacheflush.c:159: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

> +int riscv_set_icache_flush_ctx(unsigned long ctx, unsigned long per_thread)


Cheers,
Conor.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-11-27 11:46    [W:0.106 / U:1.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site