mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Stephen Eta Zhou <stephen.eta.zhou@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, Guenter Roeck <groeck7@gmail.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2] clocksource: timer-sp804: Fix an Oops when read_current_timer is called on ARM32 platforms where the SP804 is not registered as the sched_clock.
Date: Sun, 26 Apr 2026 20:25:03 -0700	[thread overview]
Message-ID: <e12626dd-4b9c-4b1a-8181-2fdabce1ba87@roeck-us.net> (raw)
In-Reply-To: <20251225-fix_timersp804-v2-1-a366d7157f58@gmail.com>

Hi,

On Thu, Dec 25, 2025 at 04:16:31PM +0800, Stephen Eta Zhou wrote:
> On SP804, the delay timer shares the same clkevt instance with
> sched_clock.
> On some platforms, when sp804_clocksource_and_sched_clock_init
> is called with use_sched_clock not set to 1,
> sched_clkevt is not properly initialized. However,
> sp804_register_delay_timer is invoked unconditionally,
> and read_current_timer() subsequently calls sp804_read
> on an uninitialized sched_clkevt, leading to a kernel
> Oops when accessing sched_clkevt->value.
> 
> Declare a dedicated clkevt instance exclusively for delay timer,
> instead of sharing the same clkevt with sched_clock.
> This ensures that read_current_timer continues to work correctly
> regardless of whether SP804 is selected as the sched_clock.
> 
> Fixes: 640594a04f11 ("clocksource/drivers/timer-sp804: Fix read_current_timer() issue when clock source is not registered")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202512250520.APOMkYRQ-lkp@intel.com/
> Signed-off-by: Stephen Eta Zhou <stephen.eta.zhou@gmail.com>

I found that the integratorcp qemu emulation still hangs unpredictably
with this and the preceding patch in the tree.

I have no idea what is causing the problem, except that it disappears if I
revert this patch and 640594a04f11.

It appears that no one else has reported the problem, which suggests to me
that no one cares. Given that, I'll stop testing the upstream kernel against
the integratorcp qemu emulation.

This is just informational; no action expected or warranted.

Thanks,
Guenter

  parent reply	other threads:[~2026-04-27  3:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-25  8:16 Stephen Eta Zhou
2026-01-29 21:32 ` [tip: timers/clocksource] clocksource/drivers/timer-sp804: " tip-bot2 for Stephen Eta Zhou
2026-04-27  3:25 ` Guenter Roeck [this message]
2026-04-27  3:39   ` [PATCH v2] clocksource: timer-sp804: " Stephen Eta Zhou
2026-04-28 16:16     ` Guenter Roeck

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=e12626dd-4b9c-4b1a-8181-2fdabce1ba87@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=daniel.lezcano@linaro.org \
    --cc=groeck7@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=stephen.eta.zhou@gmail.com \
    --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®