Skip to content

disentangling cyclic API from schedule()

Rasmus Villemoes u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 30 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13doc: cyclic: remove reference to WATCHDOG_RESETdoc/develop/cyclic.rst+5 -52 replies
2/13cyclic: introduce u-boot/schedule.hcommon/cyclic.c include/cyclic.h include/u-boot/schedule.h+26 -114 replies
3/13led: include cyclic.h in led_sw_blink.cdrivers/led/led_sw_blink.c+1 -02 replies
4/13m68k: asm/ptrace.h: include linux/types.harch/m68k/include/asm/ptrace.h+2 -02 replies
5/13fs/cramfs: use schedule instead of cyclic_run as callbackfs/cramfs/uncompress.c+2 -22 replies
6/13test: dm: wdt: replace cyclic_run() by schedule()test/dm/wdt.c+5 -52 replies
7/13cyclic: make cyclic_run staticcommon/cyclic.c include/cyclic.h+1 -132 replies
8/13watchdog.h: change include of cyclic.h to u-boot/schedule.hinclude/watchdog.h+1 -12 replies
9/13lib/sha*: include u-boot/schedule.h instead of cyclic.hlib/sha1.c lib/sha256.c lib/sha512.c+3 -32 replies
10/13i2c: rzg2l: include u-boot/schedule.hdrivers/i2c/rz_riic.c+1 -02 replies
11/13ddr: altera: include u-boot/schedule.hdrivers/ddr/altera/sdram_n5x.c drivers/ddr/altera/sdram_soc64.c+2 -02 replies
12/13boot: cedit: include u-boot/schedule.hboot/cedit.c+1 -02 replies
13/13global_data.h: remove unnecesary include of cyclic.hinclude/asm-generic/global_data.h+0 -12 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchTom RiniSimon GlassStefan Roese
1/13R-b R-b
2/13R-b R-b
3/13R-b R-b
4/13R-b R-b
5/13R-b R-b
6/13R-b R-b
7/13R-b R-b
8/13R-b R-b
9/13R-b R-b
10/13R-b R-b
11/13R-b R-b
12/13R-b R-b
13/13R-b R-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 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/13] disentangling cyclic API from schedule()

These patches are part of a longer-term plan to properly deal with the HW_WATCHDOG vs WATCHDOG dichotomy, and getting rid of the legacy HW_WATCHDOG concept completely. As part of that, clean up which headers include other headers.

While schedule(), the artist formerly known as WATCHDOG_RESET(), is obviously called all over the tree, very few TUs make use of the cyclic API (cyclic_register etc.). And there's really no reason at all for global_data.h to include cyclic.h - except that some places implicitly rely on getting their declaration of schedule() through that include.

So this introduces a separate mostly trivial header that just serves to declare schedule(). Then we can get rid of things that include cyclic.h just to get that declaration.

A next, mostly mechanical step, could be to change almost all includes of watchdog.h (which most TUs that used to have a WATCHDOG_RESET() invocation has) to u-boot/schedule.h, because again, most of those TUs are not really concerned with implementing init_func_watchdog_init or need to call it. But that is for later.

CI seems happy: https://github.com/u-boot/u-boot/pull/673

Rasmus Villemoes (13):
doc: cyclic: remove reference to WATCHDOG_RESET
cyclic: introduce u-boot/schedule.h
led: include cyclic.h in led_sw_blink.c
m68k: asm/ptrace.h: include linux/types.h fs/cramfs: use schedule instead of cyclic_run as callback
test: dm: wdt: replace cyclic_run() by schedule()
cyclic: make cyclic_run static
watchdog.h: change include of cyclic.h to u-boot/schedule.h lib/sha*: include u-boot/schedule.h instead of cyclic.h
i2c: rzg2l: include u-boot/schedule.h
ddr: altera: include u-boot/schedule.h
boot: cedit: include u-boot/schedule.h global_data.h: remove unnecesary include of cyclic.h

 arch/m68k/include/asm/ptrace.h    |  2 ++
 boot/cedit.c                      |  1 +
 common/cyclic.c                   |  3 ++-
 doc/develop/cyclic.rst            | 10 +++++-----
 drivers/ddr/altera/sdram_n5x.c    |  1 +
 drivers/ddr/altera/sdram_soc64.c  |  1 +
 drivers/i2c/rz_riic.c             |  1 +
 drivers/led/led_sw_blink.c        |  1 +
 fs/cramfs/uncompress.c            |  4 ++--
 include/asm-generic/global_data.h |  1 -
 include/cyclic.h                  | 24 +-----------------------
 include/u-boot/schedule.h         | 24 ++++++++++++++++++++++++
 include/watchdog.h                |  2 +-
 lib/sha1.c                        |  2 +-
 lib/sha256.c                      |  2 +-
 lib/sha512.c                      |  2 +-
 test/dm/wdt.c                     | 10 +++++-----
 17 files changed, 50 insertions(+), 41 deletions(-)
 create mode 100644 include/u-boot/schedule.h
Signature · 1 line
2.46.2