[PATCH 0/5] cyclic: get rid of (the need for) cyclic_init()
Tim Harvey
tharvey at gateworks.com
Fri Oct 28 17:58:51 CEST 2022
On Fri, Oct 28, 2022 at 4:51 AM Rasmus Villemoes
<rasmus.villemoes at prevas.dk> wrote:
>
> I have only compile-tested each of these for sandbox_defconfig and
> imx8mq_cm_defconfig. I couldn't even figure out how to run the cyclic
> test inside sandbox by itself, and I don't have any hardware here at
> home. So perhaps just consider these a POC of the overall idea, namely
> to use a list abstraction which doesn't need initialization other than
> what we already guarantee to do for all of struct global_data.
>
> As positive side effects, the generated code will be a little smaller,
> we reduce the use of the early malloc() pool, and the diffstat below
> is also nice.
>
> I don't know if we ever do anything in SPL that would require a call
> to cyclic_unregister_all().
>
> Rasmus Villemoes (5):
> cyclic: use a flag in gd->flags for recursion protection
> cyclic: drop redundant cyclic_ready flag
> list.h: synchronize hlist_for_each_entry* iterators with linux
> cyclic: switch to using hlist instead of list
> cyclic: get rid of cyclic_init()
>
> cmd/cyclic.c | 5 +--
> common/board_f.c | 2 +-
> common/board_r.c | 1 -
> common/cyclic.c | 50 ++++++++++-------------------
> include/asm-generic/global_data.h | 8 +++--
> include/cyclic.h | 35 +++-----------------
> include/linux/list.h | 53 +++++++++++++++----------------
> test/test-main.c | 3 +-
> 8 files changed, 57 insertions(+), 100 deletions(-)
>
> --
> 2.37.2
Rasmus,
Thanks, this does indeed resolve the SPL and U-Boot regressions
introduced. I verified the watchdig is initalized and cyclic wdt reset
is called in both SPL and U-Boot.
Tested-By: Tim Harvey <tharvey at gateworks.com> # imx8mm-venice-*
I'm not sure if a 'Fixes: 29caf9305b6f ("cyclic: Use schedule()
instead of WATCHDOG_RESET()")' is useful anywhere here.
Best Regards,
Tim
More information about the U-Boot
mailing list