Re: [PATCH 1/3 v2] clocksource/drivers/fttmr010: Be stricter on IRQs

From: Linus Walleij
Date: Thu Sep 23 2021 - 17:05:34 EST


On Thu, Sep 23, 2021 at 10:11 PM Cédric Le Goater <clg@xxxxxxxx> wrote:

> I think we should start by dropping all the AST2600 code which
> is unused.

I don't see why, the hardware is there is it not?

In my experience it is unwise to try to system manage the kernel,
decide what hardware gets exposed to the frameworks and which
does not.

There have been instances in the past where we have first said we don't
need another timer on the system (so it is "dark silicon") and later brought
it back because it has some upside.

For example for a while the Ux500 was using clksrc-dbx500-prcmu.c
exclusively because it was the only clocksource that would not stop
during sleep, and nomadik-mtu.c was unused. Then we invented a
way to grade the different clocksources and switch between them
before sleep, but tagging one of them with
CLOCK_SOURCE_SUSPEND_NONSTOP and giving them the right
rating, see commit bc0750e464d4.

This was good because nomadi-mtu.c has higher granularity and
higher frequency when the system is awake but clksrc-dbx500-prcmu.c
is always ticking, so each is used for different purposes.

Lesson learned: register all hardware with the timekeeping core and
let the kernel decide what timer to use at what point and for what.

Yours,
Linus Walleij