Skip to content

clockevent: Migrate to new 'set-state' interface

Viresh Kumar lkml 2 versions – Applied

Status from this message: Applied to my tree for 3.5

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 12 repliesApplied
  2. v16 patches 19 repliesSuperseded

Changes in v2 from the cover letter

- New commit: 1/7 (Daniel)
- Added all Acks from Daniel
- Updated 2/7 to return 0 directly from timer_shutdown()
- Naming fixes suggested for kona driver (Ray Jui)
- Minor changes in commit logs
- Not adding noop-callbacks

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/7clockevents: Allow set-state callbacks to be optionalkernel/time/clockevents.c+9 -152 replies
2/7clocksource: arm_arch_timer: Migrate to new 'set-state' interfacedrivers/clocksource/arm_arch_timer.c+22 -300 replies
3/7clocksource: arm_global_timer: Migrate to new 'set-state' interfacedrivers/clocksource/arm_global_timer.c+17 -204 replies
4/7clocksource: bcm2835: Migrate to new 'set-state' interfacedrivers/clocksource/bcm2835_timer.c+0 -164 replies
5/7clocksource: bcm_kona: Migrate to new 'set-state' interfacedrivers/clocksource/bcm_kona_timer.c+5 -120 replies
6/7clocksource: cs5535: Migrate to new 'set-state' interfacedrivers/clocksource/cs5535-clockevt.c+14 -100 replies
7/7clocksource: em_sti: Migrate to new 'set-state' interfacedrivers/clocksource/em_sti.c+14 -250 replies

Reviews trailers per patch

5 of 7 patches have a Reviewed-by or Acked-by.

PatchDaniel LezcanoRay JuiMaxime CoquelinSrinivas KandagatlaStephen Warren
1/7
2/7
3/7A-b A-b A-b
4/7A-b T-b
5/7A-b
6/7A-b
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v2 thread

Cover letter [PATCH V2 0/7] clockevent: Migrate to new 'set-state' interface

Hi Thomas/Daniel,

I have incorporated all the improvements Daniel suggested on V1 and so here is V2.

The first patch allows set-state callbacks to be optional, otherwise it leads to unnecessary noop callbacks for drivers which don't want to implement them. Over that, these noop-callbacks result in full function calls for nothing really useful.

Rest of the series converts few clockevent drivers to the new set-state interface. This would enable these drivers to use new states (like:
ONESHOT_STOPPED, etc.) of a clockevent device (if required), as the set-mode interface is marked obsolete now and wouldn't be expanded to handle new states.

Once all the drivers are migrated to the new interface in future, we can remove the code supporting '->mode' in clockevents core.

Drivers converted in this series are selected based on the diff they generate. These are different diffs we shall have for most of the drivers and any suggestions/improvements for these patches will be applied to other drivers as well.

This is based of latest tip/master from few days back due to dependency on clockevent_state_*() helpers.

Only the first patch is tested on hardware, others are ONLY compile tested.

V1->V2:
- New commit: 1/7 (Daniel)
- Added all Acks from Daniel
- Updated 2/7 to return 0 directly from timer_shutdown()
- Naming fixes suggested for kona driver (Ray Jui)
- Minor changes in commit logs
- Not adding noop-callbacks

Cc Andres Salomon <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Lee Jones <[email protected]>
Cc Magnus Damm <[email protected]>
Cc Marc Zyngier <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Ray Jui <[email protected]>
Cc Scott Branden <[email protected]>
Cc Srinivas Kandagatla <[email protected]>
Cc Stephen Warren <[email protected]>

Viresh Kumar (7):
clockevents: Allow set-state callbacks to be optional
clocksource: arm_arch_timer: Migrate to new 'set-state' interface
clocksource: arm_global_timer: Migrate to new 'set-state' interface
clocksource: bcm2835: Migrate to new 'set-state' interface
clocksource: bcm_kona: Migrate to new 'set-state' interface
clocksource: cs5535: Migrate to new 'set-state' interface
clocksource: em_sti: Migrate to new 'set-state' interface

 drivers/clocksource/arm_arch_timer.c   | 52 ++++++++++++++--------------------
 drivers/clocksource/arm_global_timer.c | 37 +++++++++++-------------
 drivers/clocksource/bcm2835_timer.c    | 16 -----------
 drivers/clocksource/bcm_kona_timer.c   | 17 ++++-------
 drivers/clocksource/cs5535-clockevt.c  | 24 +++++++++-------
 drivers/clocksource/em_sti.c           | 39 +++++++++----------------
 kernel/time/clockevents.c              | 24 ++++++----------
 7 files changed, 81 insertions(+), 128 deletions(-)
Signature · 1 line
2.4.0