Re: [PATCH 02/11] ring-buffer: Expose buffer_data_page material
From: Steven Rostedt
Date: Thu Mar 06 2025 - 14:56:15 EST
On Mon, 24 Feb 2025 12:13:44 +0000
Vincent Donnefort <vdonnefort@xxxxxxxxxx> 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);
> +}
> +