public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: "Bird, Tim" <Tim.Bird@sony.com>
Cc: Thomas Gleixner <tglx@kernel.org>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"john.ogness@linutronix.de" <john.ogness@linutronix.de>,
	"senozhatsky@chromium.org" <senozhatsky@chromium.org>,
	"francesco@valla.it" <francesco@valla.it>,
	"geert@linux-m68k.org" <geert@linux-m68k.org>,
	"shashankbalaji02@gmail.com" <shashankbalaji02@gmail.com>,
	"linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Brian Masney <bmasney@redhat.com>
Subject: Re: [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot
Date: Tue, 21 Apr 2026 10:33:47 +0200	[thread overview]
Message-ID: <aec2a2RPO9rYQa0D@pathway.suse.cz> (raw)
In-Reply-To: <MW5PR13MB5632F6F08DB75F7CCBC2AFA1FD2F2@MW5PR13MB5632.namprd13.prod.outlook.com>

On Mon 2026-04-20 22:18:29, Bird, Tim wrote:
> > From: Petr Mladek <pmladek@suse.com>
> >    2. The early timestamps provided by the bogo cycles
> >       are not synchronized with timestamps from
> >       the proper time keeping.
> > 
> >       Would it help to print a disclaimer, similar to,
> >       for example, trace_printk() first use?
> >       Something like:
> > 
> > [    0.002912] **********************************************************
> > [    0.002917] ****   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
> > [    0.002921] **
> > [    0.002935] ** Using BOGO early timestamps
> > [    0.002939] **
> > [    0.002943] ** They are not properly calibrated and might use a source
> > [    0.002949] ** with an unstable frequency.
> > [    0.002953] **
> > [    0.002957] ** They are not comparable with timestamps after
> > [    0.002961] ** the timekeeping is initialized.
> > [    0.002966] **
> > [    0.002968] ****   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
> > [    0.002971] *******************************************************
> 
> That's a bit long, but I think a warning like this is useful.

Yeah, feel free to make it shorter. I just wanted to explain what is
going on and what is the effect.

> > [    0.002975] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
> > [    0.002998] Linux version 7.0.0-rc6-v8+ (tbird@timdesk) (aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU
> > Binutils for Ubuntu) 2.42) #20 SMP PREEMPT Fri Apr 10 11:57:48 MDT 2026
> > [    0.003002] KASLR enabled
> > [    0.003338] random: crng init done
> > [    0.003866] Machine model: Raspberry Pi 4 Model B Rev 1.5
> > [    0.004495] efi: UEFI not found.
> > ...
> > [    0.183552] Root IRQ handler: gic_handle_irq
> > [    0.183561] GIC: Using split EOI/Deactivate mode
> > [    0.183699] rcu: srcu_init: Setting srcu_struct sizes based on contention.
> > [    0.183958] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
> > [    0.183952] arch_timer: cp15 timer running at 54.00MHz (phys).
> > [    0.183957] **********************************************************
> > [    0.183962] ****   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
> > [    0.183967] **
> > [    0.183971] ** End of BOGO early timestamps
> > [    0.183976] **
> > [    0.183982] ****   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
> > [    0.183989] **********************************************************
> 
> I actually worked on a notice like this, to bridge/explain the transition (for humans).  But it turned
> out that different platforms initialized their clocks differently enough that it would have
> required putting the notice in different places, which would have required architecture-specific
> #ifdefs in generic code (so I didn't do it).

I think that we could print both notices from the printk() code:

 + 1st one before the very first message
 + 2nd one before the first message with a proper timestamp from
   the local_clock().

Best Regards,
Petr

  reply	other threads:[~2026-04-21  8:33 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 20:37 [PATCH v4 0/1] printk: fix zero-valued printk timestamps Tim Bird
2026-04-10 20:37 ` [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot Tim Bird
2026-04-12 10:10   ` kernel test robot
2026-04-13 17:58     ` Bird, Tim
2026-04-13 20:17       ` David Laight
2026-04-14 22:48       ` Thomas Gleixner
2026-04-12 11:12   ` kernel test robot
2026-04-12 12:55   ` kernel test robot
2026-04-14  7:03   ` Geert Uytterhoeven
2026-04-14  9:51     ` Roberto A. Foglietta
2026-04-14 22:38   ` Thomas Gleixner
2026-04-15  0:19     ` Roberto A. Foglietta
2026-04-15  9:19       ` Roberto A. Foglietta
2026-04-15 13:06         ` Roberto A. Foglietta
2026-04-15 18:40         ` Geert Uytterhoeven
2026-04-15 19:23           ` Roberto A. Foglietta
2026-04-15 21:30       ` Thomas Gleixner
2026-04-15 21:57         ` Roberto A. Foglietta
2026-04-15 22:24           ` Roberto A. Foglietta
2026-04-15 23:12             ` Bird, Tim
2026-04-16  5:38               ` Roberto A. Foglietta
2026-04-16  8:25                 ` Roberto A. Foglietta
2026-04-16  8:43                   ` Geert Uytterhoeven
2026-04-16  9:38                     ` Roberto A. Foglietta
2026-04-16 10:52                       ` David Laight
2026-04-17  7:35                         ` Roberto A. Foglietta
2026-04-17 10:37     ` Petr Mladek
2026-04-17 11:46       ` Roberto A. Foglietta
2026-04-17 16:11         ` Steven Rostedt
2026-04-17 19:26           ` Roberto A. Foglietta
2026-04-17 19:24       ` Brian Masney
2026-04-17 19:52         ` Roberto A. Foglietta
2026-04-20 22:18       ` Bird, Tim
2026-04-21  8:33         ` Petr Mladek [this message]
2026-04-21  9:51           ` Roberto A. Foglietta
2026-04-21 14:07           ` Bird, Tim
2026-04-21 16:55             ` Roberto A. Foglietta

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=aec2a2RPO9rYQa0D@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=Tim.Bird@sony.com \
    --cc=bmasney@redhat.com \
    --cc=francesco@valla.it \
    --cc=geert@linux-m68k.org \
    --cc=john.ogness@linutronix.de \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=shashankbalaji02@gmail.com \
    --cc=tglx@kernel.org \
    /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