Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751201AbbLHWoM (ORCPT ); Tue, 8 Dec 2015 17:44:12 -0500 Received: from mail.kernel.org ([198.145.29.136]:54244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbbLHWoK (ORCPT ); Tue, 8 Dec 2015 17:44:10 -0500 MIME-Version: 1.0 In-Reply-To: <20151208221510.GH4000@usrtlx11787.corpusers.net> References: <1449610162-30543-1-git-send-email-john.stultz@linaro.org> <1858873.xsM5XHIlTX@wuerfel> <20151208221510.GH4000@usrtlx11787.corpusers.net> From: Rob Herring Date: Tue, 8 Dec 2015 16:43:47 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC][PATCH] misc: Introduce reboot_reason driver To: Bjorn Andersson Cc: Arnd Bergmann , John Stultz , lkml , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Vinay Simha BN , Haojian Zhuang , "devicetree@vger.kernel.org" , Android Kernel Team Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 36 On Tue, Dec 8, 2015 at 4:15 PM, Bjorn Andersson wrote: > On Tue 08 Dec 13:52 PST 2015, Arnd Bergmann wrote: > >> On Tuesday 08 December 2015 13:29:22 John Stultz wrote: [...] >> > +static int __init reboot_reason_init(void) >> > +{ >> > + return platform_driver_register(&reboot_reason_driver); >> > +} >> > +arch_initcall(reboot_reason_init); >> >> Why this early? If it can be a normal device_initcall, you can use >> module_platform_driver(). >> > > Not represented in this patch is that several Android vendors uses this > mechanism to communicate a panic() to the boot loader; to let the system > enter some sort of memory dump state. They could also just parse pstore and look for a panic(). Or the bootloader should set the reason to enter memory dump and the kernel should clear it once it is up enough to handle resets. You have a window of time already that a panic will hang. Only a watchdog will help there and that would need a different solution. Are panics in early boot really common outside of development? Rob -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/