[PATCH] riscv: mm: Trace TLB flush path selection

Steven Rostedt rostedt at goodmis.org
Sat Aug 29 18:22:02 PDT 2026


On Sat, 29 Aug 2026 17:44:18 +0200
Roman 'Hedin' Storozhenko <romeusmeister at gmail.com> wrote:

> +static __always_inline void
> +riscv_tlb_trace_flush_path(const struct cpumask *cmask, unsigned long start,
> +			   unsigned long size, unsigned long stride,
> +			   unsigned long asid, bool has_mm,
> +			   enum riscv_tlb_flush_path path)
> +{
> +	enum riscv_tlb_flush_scope scope;
> +
> +	if (!trace_riscv_tlb_flush_path_enabled())
> +		return;
> +
> +	scope = riscv_tlb_get_flush_scope(size, stride, has_mm);
> +	trace_riscv_tlb_flush_path(start, size, stride, asid, has_mm, cmask,
> +				   scope, path);

instead of using two static calls you can use the new:

   trace_call__riscv_tlb_flush_path()

That is to be used instead of the trace_<event>() if it's behind a
trace_<event>_enabled() check. That is because the
trace_call__<event>() will always trigger the trace event logic because
it should only be called when the trace event was enabled.

-- Steve


> +}
> +



More information about the linux-riscv mailing list