summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2022-10-17 09:00:58 +0200
committerStefan Roese <sr@denx.de>2022-10-24 11:10:21 +0200
commitddc8d36a745517fec57787ec9b17ab44c7ad973c (patch)
tree4e0d0b553055c7089958516abb2faf66b5ed732f /include
parent374d5d9971d70f1bf9443d75b5dea03701edcfeb (diff)
cyclic: Don't disable cylic function upon exceeding CPU time
With the migration of the watchdog infrastructure to cyclic functions it's been noticed, that at least one watchdog driver is broken now. As the execution time of it's watchdog reset function is quite long. In general it's not really necessary (right now) to disable the cyclic function upon exceeding CPU time usage. So instead of disabling the cylic function in this case, let's just print a warning once to show this potential problem to the user. Signed-off-by: Stefan Roese <sr@denx.de> Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Cc: Tom Rini <trini@konsulko.com> Cc: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/cyclic.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/cyclic.h b/include/cyclic.h
index 76016364334..9c5c4fcc546 100644
--- a/include/cyclic.h
+++ b/include/cyclic.h
@@ -39,6 +39,7 @@ struct cyclic_drv {
* @run_cnt: Counter of executions occurances
* @next_call: Next time in us, when the function shall be executed again
* @list: List node
+ * @already_warned: Flag that we've warned about exceeding CPU time usage
*/
struct cyclic_info {
void (*func)(void *ctx);
@@ -50,6 +51,7 @@ struct cyclic_info {
uint64_t run_cnt;
uint64_t next_call;
struct list_head list;
+ bool already_warned;
};
/** Function type for cyclic functions */