From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: John Ogness <john.ogness@linutronix.de>
Cc: Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org,
Mukesh Ojha <quic_mojha@quicinc.com>
Subject: Re: [PATCH printk v2 1/9] printk: ringbuffer: Do not skip non-finalized records with prb_next_seq()
Date: Mon, 20 Nov 2023 14:45:56 +0100 [thread overview]
Message-ID: <20231120134556.DkKNwy7B@linutronix.de> (raw)
In-Reply-To: <20231106210730.115192-2-john.ogness@linutronix.de>
based on my research this should be the most recent post of this patch.
If so then
On 2023-11-06 22:13:22 [+0106], John Ogness wrote:
> --- a/kernel/printk/printk_ringbuffer.c
> +++ b/kernel/printk/printk_ringbuffer.c
> @@ -6,6 +6,7 @@
> @@ -1441,20 +1445,144 @@ bool prb_reserve_in_last(struct prb_reserved_entry *e, struct printk_ringbuffer
> return false;
> }
>
> +#ifdef CONFIG_64BIT
> +
> +#define __u64seq_to_ulseq(u64seq) (u64seq)
> +#define __ulseq_to_u64seq(ulseq) (ulseq)
> +
> +#else /* CONFIG_64BIT */
> +
> +static u64 prb_first_seq(struct printk_ringbuffer *rb);
> +
> +#define __u64seq_to_ulseq(u64seq) ((u32)u64seq)
> +static inline u64 __ulseq_to_u64seq(u32 ulseq)
> +{
> + u64 rb_first_seq = prb_first_seq(prb);
> + u64 seq;
> +
> + /*
> + * The provided sequence is only the lower 32 bits of the ringbuffer
> + * sequence. It needs to be expanded to 64bit. Get the first sequence
> + * number from the ringbuffer and fold it.
> + */
> + seq = rb_first_seq - ((u32)rb_first_seq - ulseq);
This needs to become
seq = rb_first_seq - ((s32)((u32)rb_first_seq - ulseq));
in order to continue booting on 32bit. Otherwise, if this survives one
cycle then we can deprecate all 32bit platforms. I am happy either way.
Sebastian
next prev parent reply other threads:[~2023-11-20 13:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 21:07 [PATCH printk v2 0/9] fix console flushing John Ogness
2023-11-06 21:07 ` [PATCH printk v2 1/9] printk: ringbuffer: Do not skip non-finalized records with prb_next_seq() John Ogness
2023-11-20 13:45 ` Sebastian Andrzej Siewior [this message]
2023-11-21 16:17 ` John Ogness
2023-11-06 21:07 ` [PATCH printk v2 2/9] printk: ringbuffer: Clarify special lpos values John Ogness
2023-11-06 21:07 ` [PATCH printk v2 3/9] printk: For @suppress_panic_printk check for other CPU in panic John Ogness
2023-11-06 21:07 ` [PATCH printk v2 4/9] printk: Add this_cpu_in_panic() John Ogness
2023-11-06 21:07 ` [PATCH printk v2 5/9] printk: ringbuffer: Cleanup reader terminology John Ogness
2023-11-06 21:07 ` [PATCH printk v2 6/9] printk: Wait for all reserved records with pr_flush() John Ogness
2023-11-08 11:08 ` John Ogness
2023-11-06 21:07 ` [PATCH printk v2 7/9] printk: Skip non-finalized records in panic John Ogness
2023-11-06 21:07 ` [PATCH printk v2 8/9] printk: Disable passing console lock owner completely during panic() John Ogness
2023-11-06 21:07 ` [PATCH printk v2 9/9] printk: Avoid non-panic CPUs flooding ringbuffer John Ogness
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231120134556.DkKNwy7B@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=quic_mojha@quicinc.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®