summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0039-printk-Provide-helper-for-message-prepending.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:49 +0000
commitf25552c1068a054f2d99afd67a671d5991bf19c1 (patch)
treed70de5c7262ad572f8323fc4184b8a10522e81ec /debian/patches-rt/0039-printk-Provide-helper-for-message-prepending.patch
parentMerging upstream version 6.9.7. (diff)
downloadlinux-f25552c1068a054f2d99afd67a671d5991bf19c1.tar.xz
linux-f25552c1068a054f2d99afd67a671d5991bf19c1.zip
Merging debian version 6.9.7-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0039-printk-Provide-helper-for-message-prepending.patch')
-rw-r--r--debian/patches-rt/0039-printk-Provide-helper-for-message-prepending.patch82
1 files changed, 0 insertions, 82 deletions
diff --git a/debian/patches-rt/0039-printk-Provide-helper-for-message-prepending.patch b/debian/patches-rt/0039-printk-Provide-helper-for-message-prepending.patch
deleted file mode 100644
index 35bfe33e7a..0000000000
--- a/debian/patches-rt/0039-printk-Provide-helper-for-message-prepending.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From: John Ogness <john.ogness@linutronix.de>
-Date: Thu, 28 Mar 2024 13:29:10 +0000
-Subject: [PATCH 39/48] printk: Provide helper for message prepending
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.8/older/patches-6.8.2-rt11.tar.xz
-
-In order to support prepending different texts to printk
-messages, split out the prepending code into a helper
-function.
-
-Signed-off-by: John Ogness <john.ogness@linutronix.de>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
----
- kernel/printk/printk.c | 38 +++++++++++++++++++++++++++-----------
- 1 file changed, 27 insertions(+), 11 deletions(-)
-
---- a/kernel/printk/printk.c
-+++ b/kernel/printk/printk.c
-@@ -2819,30 +2819,25 @@ static void __console_unlock(void)
- #ifdef CONFIG_PRINTK
-
- /*
-- * Prepend the message in @pmsg->pbufs->outbuf with a "dropped message". This
-- * is achieved by shifting the existing message over and inserting the dropped
-- * message.
-+ * Prepend the message in @pmsg->pbufs->outbuf with the message in
-+ * @pmsg->pbufs->scratchbuf. This is achieved by shifting the existing message
-+ * over and inserting the scratchbuf message.
- *
- * @pmsg is the printk message to prepend.
- *
-- * @dropped is the dropped count to report in the dropped message.
-+ * @len is the length of the message in @pmsg->pbufs->scratchbuf.
- *
- * If the message text in @pmsg->pbufs->outbuf does not have enough space for
-- * the dropped message, the message text will be sufficiently truncated.
-+ * the scratchbuf message, the message text will be sufficiently truncated.
- *
- * If @pmsg->pbufs->outbuf is modified, @pmsg->outbuf_len is updated.
- */
--void console_prepend_dropped(struct printk_message *pmsg, unsigned long dropped)
-+static void __console_prepend_scratch(struct printk_message *pmsg, size_t len)
- {
- struct printk_buffers *pbufs = pmsg->pbufs;
-- const size_t scratchbuf_sz = sizeof(pbufs->scratchbuf);
- const size_t outbuf_sz = sizeof(pbufs->outbuf);
- char *scratchbuf = &pbufs->scratchbuf[0];
- char *outbuf = &pbufs->outbuf[0];
-- size_t len;
--
-- len = scnprintf(scratchbuf, scratchbuf_sz,
-- "** %lu printk messages dropped **\n", dropped);
-
- /*
- * Make sure outbuf is sufficiently large before prepending.
-@@ -2865,6 +2860,27 @@ void console_prepend_dropped(struct prin
- }
-
- /*
-+ * Prepend the message in @pmsg->pbufs->outbuf with a "dropped message".
-+ * @pmsg->outbuf_len is updated appropriately.
-+ *
-+ * @pmsg is the printk message to prepend.
-+ *
-+ * @dropped is the dropped count to report in the dropped message.
-+ */
-+void console_prepend_dropped(struct printk_message *pmsg, unsigned long dropped)
-+{
-+ struct printk_buffers *pbufs = pmsg->pbufs;
-+ const size_t scratchbuf_sz = sizeof(pbufs->scratchbuf);
-+ char *scratchbuf = &pbufs->scratchbuf[0];
-+ size_t len;
-+
-+ len = scnprintf(scratchbuf, scratchbuf_sz,
-+ "** %lu printk messages dropped **\n", dropped);
-+
-+ __console_prepend_scratch(pmsg, len);
-+}
-+
-+/*
- * Read and format the specified record (or a later record if the specified
- * record is not available).
- *