From 27d3313807296c3943a96ceef8c2b7279cb56962 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 19:39:59 +0200 Subject: Adding debian version 6.7.7-1. Signed-off-by: Daniel Baumann --- ...ntk-ringbuffer-Cleanup-reader-terminology.patch | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 debian/patches-rt/0008-printk-ringbuffer-Cleanup-reader-terminology.patch (limited to 'debian/patches-rt/0008-printk-ringbuffer-Cleanup-reader-terminology.patch') diff --git a/debian/patches-rt/0008-printk-ringbuffer-Cleanup-reader-terminology.patch b/debian/patches-rt/0008-printk-ringbuffer-Cleanup-reader-terminology.patch new file mode 100644 index 0000000000..cfd6ca7a28 --- /dev/null +++ b/debian/patches-rt/0008-printk-ringbuffer-Cleanup-reader-terminology.patch @@ -0,0 +1,67 @@ +From: John Ogness +Date: Mon, 6 Nov 2023 15:01:58 +0000 +Subject: [PATCH 08/50] printk: ringbuffer: Cleanup reader terminology +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.7/older/patches-6.7-rt6.tar.xz + +With the lockless ringbuffer, it is allowed that multiple +CPUs/contexts write simultaneously into the buffer. This creates +an ambiguity as some writers will finalize sooner. + +The documentation for the prb_read functions is not clear as it +refers to "not yet written" and "no data available". Clarify the +return values and language to be in terms of the reader: records +available for reading. + +Signed-off-by: John Ogness +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/printk/printk_ringbuffer.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +--- a/kernel/printk/printk_ringbuffer.c ++++ b/kernel/printk/printk_ringbuffer.c +@@ -1987,11 +1987,13 @@ u64 prb_first_seq(struct printk_ringbuff + } + + /* +- * Non-blocking read of a record. Updates @seq to the last finalized record +- * (which may have no data available). ++ * Non-blocking read of a record. + * +- * See the description of prb_read_valid() and prb_read_valid_info() +- * for details. ++ * On success @seq is updated to the record that was read and (if provided) ++ * @r and @line_count will contain the read/calculated data. ++ * ++ * On failure @seq is updated to a record that is not yet available to the ++ * reader, but it will be the next record available to the reader. + */ + static bool _prb_read_valid(struct printk_ringbuffer *rb, u64 *seq, + struct printk_record *r, unsigned int *line_count) +@@ -2010,7 +2012,7 @@ static bool _prb_read_valid(struct print + *seq = tail_seq; + + } else if (err == -ENOENT) { +- /* Record exists, but no data available. Skip. */ ++ /* Record exists, but the data was lost. Skip. */ + (*seq)++; + + } else { +@@ -2043,7 +2045,7 @@ static bool _prb_read_valid(struct print + * On success, the reader must check r->info.seq to see which record was + * actually read. This allows the reader to detect dropped records. + * +- * Failure means @seq refers to a not yet written record. ++ * Failure means @seq refers to a record not yet available to the reader. + */ + bool prb_read_valid(struct printk_ringbuffer *rb, u64 seq, + struct printk_record *r) +@@ -2073,7 +2075,7 @@ bool prb_read_valid(struct printk_ringbu + * On success, the reader must check info->seq to see which record meta data + * was actually read. This allows the reader to detect dropped records. + * +- * Failure means @seq refers to a not yet written record. ++ * Failure means @seq refers to a record not yet available to the reader. + */ + bool prb_read_valid_info(struct printk_ringbuffer *rb, u64 seq, + struct printk_info *info, unsigned int *line_count) -- cgit v1.2.3