Re: [PATCH v3] printk: fix zero-valued printk timestamps in early boot

Geert Uytterhoeven <[email protected]> Tue, 31 Mar 2026 10:17:09 +0200
Newsgroups org.kernel.vger.linux-embedded,org.kernel.vger.linux-kernel
Message-ID <CAMuHMdVjVjOaYBXsLNxXkZQXfYK5uUP8oHUhb1k6=rFKDh-5ZQ@mail.gmail.com>
Hi TIm,

On Mon, 30 Mar 2026 at 22:42, Bird, Tim <[email protected]> wrote:
> > From: Thomas Gleixner <[email protected]>
> > > There are other approaches, but none really work early enough in the
> > > kernel boot to not be a pain.  The goal is to provide timing info
> > > before: timekeeping init, jiffies startup, and even CPU features
> > > determination,
> >
> > As I pointed out before that's wishful thinking:
> >
> >    You _cannot_ access a resource before it has been determined to be
> >    available.
> >
> > Period.
> >
> > It does not matter at all if _you_ know for sure that it is the case in
> > _your_ personal setup.
>
> I used get_cycles(), which has a check for availability in it, so the patch didn't
> access a resource before it was determined to be available.

Note that such a check is only available in the MIPS and x86 versions.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds