clocksource/drivers/timer-npcm7xx: Fix timer1 warning, add sched_clock
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | clocksource/drivers/timer-npcm7xx: Fix spurious timer1 clock warningdrivers/ | +9 | 0 replies | |
| 2/2 | clocksource/drivers/timer-npcm7xx: Register timer1 as sched_clockdrivers/ | +9 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] clocksource/drivers/timer-npcm7xx: Fix timer1 warning, add sched_clock
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(-)