[PATCH 02/11] ring-buffer: Expose buffer_data_page material

Steven Rostedt rostedt at goodmis.org
Thu Mar 6 11:56:07 PST 2025


On Mon, 24 Feb 2025 12:13:44 +0000
Vincent Donnefort <vdonnefort at google.com> wrote:

> @@ -61,11 +65,50 @@ enum ring_buffer_type {
>  	RINGBUF_TYPE_TIME_STAMP,
>  };
>  
> +#define TS_SHIFT        27
> +#define TS_MASK         ((1ULL << TS_SHIFT) - 1)
> +#define TS_DELTA_TEST   (~TS_MASK)

By moving this to include/linux you need to add a prefix to prevent name
space conflicts.

 RB_TS_SHIFT
 RB_TS_MASK
 RB_TS_DELTA_TEST

-- Steve


> +
> +/*
> + * We need to fit the time_stamp delta into 27 bits.
> + */
> +static inline bool test_time_stamp(u64 delta)
> +{
> +	return !!(delta & TS_DELTA_TEST);
> +}
> +



More information about the linux-arm-kernel mailing list