Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp882467ybg; Fri, 18 Oct 2019 08:45:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvJf1baRY6otPf08BKIjOUA6tCz7F8VS56ysApcMd/7+fWnoeCrjwbLtfNp1dZoc/4gQk0 X-Received: by 2002:a50:935d:: with SMTP id n29mr10222910eda.167.1571413503479; Fri, 18 Oct 2019 08:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413503; cv=none; d=google.com; s=arc-20160816; b=ud4WhwGU6dYMXt+SO8/inPCruD9al4xtzltCM0HU8CkZBRvN9EII94sDQu70b+WTCx SOeFmDlfb3l4Eoq92rfTe+3gKUUK322nRM/WKulbqj7NgWqojSWeViKsVrxL2SVg2Km5 uqg0f7qGdX3rLxnWilJ3QPMVs2wNqkWcrKTOpb0bcFoLL2N1OrKXuSokvRZwHg+rTKQV CUb51WVJy9vwyDADJuNmYAav6wiZ9bN8vBxdU4oRiy22SKgjWSHxtuhcUzRD2LUNkAj5 3+/+1YoO6hmdDyoVBpXtxtfKBu1FXvbLVvcWrSzNa4yKcBRt7HZKl8nLuInvdbqbYooE pOpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7QFAM3FyNjZLdWgCaHNKxlUOPObBomQiiiC1wmyqmnc=; b=AqTdfJ9hbvJl6r+dc6KI/My5uRONnQqcp6cVL0ROjpxDWaLTdNI2WYuRz2IFKSUt1/ KiZYJqx8YrVbv/4tw1jc7eksEpVab8Z0YpCdz5f9+MnIrQhZe6XsLGshdeh8O7DcWLxe ndeBdhWFy2ixjZXOcd8TnfAEwz2b9jKBndPZlGKFHcP95aqxb8MeIGaJJCEqMFVyPX+X OPy4Pv5p9XxkZpvTRodPVD7ZGJ0v6gzBKcXRzq2O9Df4JYH8uWKmXHxMlhUafbuorVjJ tOQgR2k4kjHewC1mChPN466Nd/DdWlY2wYOkVAIjAIdtwlmkIgRmzummd4iZ6UkmObsP zgug== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=I6hadmvq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si3583001ejz.381.2019.10.18.08.44.40; Fri, 18 Oct 2019 08:45:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=I6hadmvq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389209AbfJQMD0 (ORCPT + 99 others); Thu, 17 Oct 2019 08:03:26 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:45546 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729937AbfJQMDZ (ORCPT ); Thu, 17 Oct 2019 08:03:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7QFAM3FyNjZLdWgCaHNKxlUOPObBomQiiiC1wmyqmnc=; b=I6hadmvq9y5VVf5dyNAUB7pa5 cUIfFm/JE/7T9C6zx9cvRw/63isjp+CLNHRUkWaHP7pF1c5zceKV2VVD2SGK/S/0IiaJ4SLzpD+TC /TMSjiLLFORwSj7wFomfLaugUIIx3ZGIf4QMB/SG84qzNW/eC/5pERNEGc7o7GKlBlsGHeNspk3ZZ q69Bx0NeHFQz0pw8qx1kf60qUTxtiDYh4X8l3ddRFpkrYR4CyUrWZAqYxSiKWqs16DKBI0BOQ9UNt GiCB5L3dG8s5rHOXerd24Anz8gkXYyf/bWWVoZQ0jJqGL+VB9im+L2NentYV4o/+ujbZOiIYCqYk+ GjyGVxDyw==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:43864) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iL4Us-0000c9-VM; Thu, 17 Oct 2019 13:03:15 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iL4Uo-0008B9-UN; Thu, 17 Oct 2019 13:03:10 +0100 Date: Thu, 17 Oct 2019 13:03:10 +0100 From: Russell King - ARM Linux admin To: Rasmus Villemoes Cc: Masahiro Yamada , Andrew Morton , Gao Xiang , kernel@pengutronix.de, Linus Walleij , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH 0/3] watchdog servicing during decompression Message-ID: <20191017120310.GD25745@shell.armlinux.org.uk> References: <20191017114906.30302-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191017114906.30302-1-linux@rasmusvillemoes.dk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We used to have this on ARM - it was called from the decompressor code via an arch_decomp_wdog() hook. That code got removed because it is entirely unsuitable for a multi- platform kernel. This looks like it takes an address for the watchdog from the Kconfig, and builds that into the decompressor, making the decompressor specific to that board or platform. I'm not sure distros are going to like that given where we are with multiplatform kernels. On Thu, Oct 17, 2019 at 01:49:03PM +0200, Rasmus Villemoes wrote: > Many custom boards have an always-running external watchdog > circuit. When the timeout of that watchdog is small, one cannot boot a > compressed kernel since the board gets reset before it even starts > booting the kernel proper. > > One way around that is to do the decompression in a bootloader which > knows how to service the watchdog. However, one reason to prefer using > the kernel's own decompressor is to be able to take advantage of > future compression enhancements (say, a faster implementation of the > current method, or switching over when a new method such a zstd is > invented) - often, the bootloader cannot be updated without physical > access or is locked down for other reasons, so the decompressor has to > be bundled with the kernel image for that to be possible. > > This POC adds a linux/decompress/keepalive.h header which provides a > decompress_keepalive() macro. Wiring up any given decompressor just > amounts to including that header and adding decompress_keepalive() in > the main loop - for simplicity, this series just does it for lz4. > > The actual decompress_keepalive() implementation is of course very > board-specific. The third patch adds a kconfig knob that handles a > common case (and in fact suffices for all the various boards I've come > across): An external watchdog serviced by toggling a gpio, with the > value of that gpio being settable in a memory-mapped register. > > Rasmus Villemoes (3): > decompress/keepalive.h: prepare for watchdog keepalive during kernel > decompression > lib: lz4: wire up watchdog keepalive during decompression > decompress/keepalive.h: add config option for toggling a set of bits > > include/linux/decompress/keepalive.h | 22 +++++++++++++++++++ > init/Kconfig | 33 ++++++++++++++++++++++++++++ > lib/lz4/lz4_decompress.c | 2 ++ > 3 files changed, 57 insertions(+) > create mode 100644 include/linux/decompress/keepalive.h > > -- > 2.20.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up