Messages in this thread Patch in this message | | | From | Rasmus Villemoes <> | Subject | [RFC PATCH 2/3] lib: lz4: wire up watchdog keepalive during decompression | Date | Thu, 17 Oct 2019 13:49:05 +0200 |
| |
Some boards have a hardware watchdog that (a) cannot be disabled and (b) has a timeout short enough that there's no chance for the kernel to get through decompression, let alone reach the initialization of the appropriate watchdog device driver.
In order to allow booting such boards, the decompression routine needs to service the watchdog in its main loop. This wires up lz4 to do that via the decompress_keepalive() macro defined in the new linux/decompress/keepalive.h.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> --- lib/lz4/lz4_decompress.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c index 0c9d3ad17e0f..54ba41d073a6 100644 --- a/lib/lz4/lz4_decompress.c +++ b/lib/lz4/lz4_decompress.c @@ -39,6 +39,7 @@ #include <linux/module.h> #include <linux/kernel.h> #include <asm/unaligned.h> +#include <linux/decompress/keepalive.h> /*-***************************** * Decompression functions @@ -129,6 +130,7 @@ static FORCE_INLINE int LZ4_decompress_generic( /* ip < iend before the increment */ assert(!endOnInput || ip <= iend); + decompress_keepalive(); /* * A two-stage shortcut for the most common case: -- 2.20.1
| |