mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Gao Xiang <xiang@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Linus Walleij <linus.walleij@linaro.org>,
	kernel@pengutronix.de,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: [RFC PATCH 1/3] decompress/keepalive.h: prepare for watchdog keepalive during kernel decompression
Date: Thu, 17 Oct 2019 13:49:04 +0200	[thread overview]
Message-ID: <20191017114906.30302-2-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20191017114906.30302-1-linux@rasmusvillemoes.dk>

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 adds a header making it
easy to wire up each decompressor - just include this header and add a
decompress_keepalive() in the main loop.

Outside of the pre-boot stage, this is always a no-op.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 include/linux/decompress/keepalive.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 include/linux/decompress/keepalive.h

diff --git a/include/linux/decompress/keepalive.h b/include/linux/decompress/keepalive.h
new file mode 100644
index 000000000000..39caa7693624
--- /dev/null
+++ b/include/linux/decompress/keepalive.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef DECOMPRESS_KEEPALIVE_H
+#define DECOMPRESS_KEEPALIVE_H
+
+#ifdef PREBOOT
+
+#endif
+
+#ifndef decompress_keepalive
+#define decompress_keepalive() do { } while (0)
+#endif
+
+#endif /* DECOMPRESS_KEEPALIVE_H */
-- 
2.20.1


  reply	other threads:[~2019-10-17 11:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 11:49 [RFC PATCH 0/3] watchdog servicing during decompression Rasmus Villemoes
2019-10-17 11:49 ` Rasmus Villemoes [this message]
2019-10-17 11:49 ` [RFC PATCH 2/3] lib: lz4: wire up watchdog keepalive " Rasmus Villemoes
2019-10-17 11:49 ` [RFC PATCH 3/3] decompress/keepalive.h: add config option for toggling a set of bits Rasmus Villemoes
2019-10-24 12:17   ` Linus Walleij
2019-10-24 13:45     ` Rasmus Villemoes
2019-10-17 12:03 ` [RFC PATCH 0/3] watchdog servicing during decompression Russell King - ARM Linux admin
2019-10-17 12:34   ` Rasmus Villemoes
2019-10-17 12:48     ` Russell King - ARM Linux admin
2019-10-24 12:38     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191017114906.30302-2-linux@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=akpm@linux-foundation.org \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®