mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] clocksource/drivers/timer-npcm7xx: Fix timer1 warning, add sched_clock
@ 2026-11-28  2:52 William A. Kennington III
  2026-11-28  2:52 ` [PATCH 1/2] clocksource/drivers/timer-npcm7xx: Fix spurious timer1 clock warning William A. Kennington III
  2026-11-28  2:52 ` [PATCH 2/2] clocksource/drivers/timer-npcm7xx: Register timer1 as sched_clock William A. Kennington III
  0 siblings, 2 replies; 3+ messages in thread
From: William A. Kennington III @ 2026-11-28  2:52 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: Andrew Jeffery, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Joel Stanley,
	Jonathan Neuschäfer, openbmc, linux-kernel,
	William A. Kennington III

Two fixes for drivers/clocksource/timer-npcm7xx.c found while bringing
up Linux 7.3 on an NPCM730 BMC:

1. of_clk_get(np, 1) returns ERR_PTR(-ENOENT) when only one clock is
   present in DT, which is the case for every in-tree device tree, so
   boot always logs a spurious warning for the optional timer1 clock.
   Ignore -ENOENT, add the missing newline, and check
   clk_prepare_enable() errors.
2. Register the 24-bit free-running timer1 counter with
   sched_clock_register() instead of falling back to jiffies, which
   also enables CONFIG_IRQ_TIME_ACCOUNTING at runtime.

Tested on an NPCM730 BMC: the timer1 -ENOENT boot warning is gone,
sched_clock registers at 80 ns resolution with microsecond dmesg
timestamps, and /proc/stat reports live IRQ time under TCP load.
WPCM450, which shares the driver, was not tested.

William A. Kennington III (2):
  clocksource/drivers/timer-npcm7xx: Fix spurious timer1 clock warning
  clocksource/drivers/timer-npcm7xx: Register timer1 as sched_clock

 drivers/clocksource/timer-npcm7xx.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-28  2:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-28  2:52 [PATCH 0/2] clocksource/drivers/timer-npcm7xx: Fix timer1 warning, add sched_clock William A. Kennington III
2026-11-28  2:52 ` [PATCH 1/2] clocksource/drivers/timer-npcm7xx: Fix spurious timer1 clock warning William A. Kennington III
2026-11-28  2:52 ` [PATCH 2/2] clocksource/drivers/timer-npcm7xx: Register timer1 as sched_clock William A. Kennington III

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®