[patch 2/5] MIPS: Dont select CLOCKSOURCE_WATCHDOG

Thomas Gleixner posted 5 patches 2 weeks ago
[patch 2/5] MIPS: Dont select CLOCKSOURCE_WATCHDOG
Posted by Thomas Gleixner 2 weeks ago
MIPS selects CLOCKSOURCE_WATCHDOG, but none of the clocksources actually
sets the MUST_VERIFY flag. So compiling the watchdog in is a pointless
exercise. Remove the selects.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org
---
 arch/mips/Kconfig           |    1 -
 drivers/clocksource/Kconfig |    1 -
 2 files changed, 2 deletions(-)

--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1129,7 +1129,6 @@ config CSRC_IOASIC
 	bool
 
 config CSRC_R4K
-	select CLOCKSOURCE_WATCHDOG if CPU_FREQ
 	bool
 
 config CSRC_SB1250
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -595,7 +595,6 @@ config CLKSRC_VERSATILE
 config CLKSRC_MIPS_GIC
 	bool
 	depends on MIPS_GIC
-	select CLOCKSOURCE_WATCHDOG
 	select TIMER_OF
 
 config CLKSRC_PXA
Re: [patch 2/5] MIPS: Dont select CLOCKSOURCE_WATCHDOG
Posted by Maciej W. Rozycki 1 week, 6 days ago
On Sat, 24 Jan 2026, Thomas Gleixner wrote:

> MIPS selects CLOCKSOURCE_WATCHDOG, but none of the clocksources actually
> sets the MUST_VERIFY flag. So compiling the watchdog in is a pointless
> exercise. Remove the selects.

 Based on commit 385864280597 ("mips: csrc-r4k: Mark R4K timer as unstable 
if CPU freq changes") which added some of this stuff shouldn't the flag be 
set instead?

 At first glance the situation seems analogous to that of the x86 TSC: 
just as the TSC the R4k timer is a CPU onchip free-running counter driven 
by the CPU clock (typically at half the rate).

  Maciej
Re: [patch 2/5] MIPS: Dont select CLOCKSOURCE_WATCHDOG
Posted by Thomas Gleixner 1 week, 5 days ago
On Sat, Jan 24 2026 at 22:28, Maciej W. Rozycki wrote:
> On Sat, 24 Jan 2026, Thomas Gleixner wrote:
>
>> MIPS selects CLOCKSOURCE_WATCHDOG, but none of the clocksources actually
>> sets the MUST_VERIFY flag. So compiling the watchdog in is a pointless
>> exercise. Remove the selects.
>
>  Based on commit 385864280597 ("mips: csrc-r4k: Mark R4K timer as unstable 
> if CPU freq changes") which added some of this stuff shouldn't the flag be 
> set instead?
>
>  At first glance the situation seems analogous to that of the x86 TSC: 
> just as the TSC the R4k timer is a CPU onchip free-running counter driven 
> by the CPU clock (typically at half the rate).

On x86 the CPU frequency can be modified by the BIOS behind the kernels
back, so the watchdog is required to catch this situation. So R4K only
needs the watchdog when there is some magic going on even when the
kernel itself does not manage the CPU frequency.

Thanks,

        tglx