Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754458AbbLJWMH (ORCPT ); Thu, 10 Dec 2015 17:12:07 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:49433 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751422AbbLJWME (ORCPT ); Thu, 10 Dec 2015 17:12:04 -0500 From: Arnd Bergmann To: John Stultz Cc: Rob Herring , Bjorn Andersson , lkml , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Vinay Simha BN , Haojian Zhuang , "devicetree@vger.kernel.org" , Android Kernel Team , Andy Gross , "linux-arm-msm@vger.kernel.org" Subject: Re: [RFC][PATCH] misc: Introduce reboot_reason driver Date: Thu, 10 Dec 2015 23:11:46 +0100 Message-ID: <1552521.IZhVsTdxHT@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1449610162-30543-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:GRUMdDP+iJLBJKscGR/IvJg4EfO5Dq4gL0F1+VYzWcc9geMK4aW Y7TIbR9Rs4bKrqY9MAiNcnLZBTjUxNOIuWNryFBYRpS94OJk/zZgCM20Hyo7JRC0aWjrNWV NeMuqRdEIrgwCocmKmIyhWnFELntPsBcf5Pg7HHEFYVs4TxB4Iq6g8H4HLPVRLguACRITGJ pn2rQWJJE4zDM+CRHtPtQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:nAuWlMY+lrg=:r/PD+LR1VO8VTgmgVq42fe 65g2fejO72/R1A7D46sr9Z76fTUEwtwPCz7y+0TNDkT9OG/NYPtgtZ79MCD/6sRW3uljNrj6E aKHsdeOdmaYdwXrQFTjUNW+O2yxYp4uK3fzXxn5haY1Vn3CMLhB+QZsD0EQVGQclgnGchVuLv z/x4r9SUUDV91Ef2GScQ7OSbhIMExmWE4ubR0ry8KmRfp5QvMypLK7tpK1Qe90QrE54YloxuP IeMb6+x+imuBUIqXMKHHzh0Qd5SdXIgnHq19sDeTO4jnxxKX2SJfsSt71VS80Y2fSA/bFQZrr XDeG478t22uAsn3q88nvd865nspDjB3//kci1gQ+gV+X/7AU8dXLlkk6sbQeHQ/+VvAJ46fRa FL3TZmszDHhkNz6mybyIjc8o55Iml32oU9QGFH24JxL8Cu7f9NBabiSQ75YptgpwH2vg9RKzL ZhfrVsl59gfJ3ZhWsp6ot7Ach1Sf80UVdYXiWGWVJ5xLyoVV8GzriXWZu2plKQOZNN8dEaKvD hq7s35mIeXxWpxlxS2bqOPyuvbgjGlrBtb5cZP+Q7p3BwE9TamoEqsOZZDMwAndtWSqEFbImG L1Prnlai86j/1WaA8zUnT0hi1TqLtG6uuIUawic/dD1N5HeDBWxA0FPF8yvtWIB5rF3BTU/zJ S/6mhCJqVrmy0vX+paS1IG6Vk3DWBk75l0lOvU5hoOSYMZyzr9LU54ts9oyWQxFDwIfafxbqb +c7APo9BwrcIA1BD Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2106 Lines: 49 On Thursday 10 December 2015 13:43:16 John Stultz wrote: > On Thu, Dec 10, 2015 at 12:24 PM, Rob Herring wrote: > > The fact that we are using notifiers for reset reason and triggering > > is probably some indication that some infrastructure is needed. But I > > don't think you need to do that here as long as it is all kernel > > internals. We'll make the 2nd guy do it. > > > > Though, just so I understand better, what is problematic w/ the reset > notifiers? They provide the reboot command argument, which is the core > of what is needed. It actually seemed like it was almost designed with > this problem in mind. Notifiers in general are a bit of a kludge. We often use them in places that have not been abstracted well enough yet, and they make it less obvious what is actually going on when something happens, or in what order things are called. I'm actually less worried about the notifier side here than about the general problem of the communication channel. The reboot reason is only one of a number of things that the kernel needs to communicate to the boot loader. Other things may include: - boot device - location of the kernel - command line - properties of the /chosen DT node in general - boot scripts - ethernet MAC addresses - bootloader console configuration Every bootloader is different here regarding what can be configured and how we do it. Often the configuration is done entirely from user space, but some platforms have kernel support. So picking one particular aspect and trying to unify that one with a common kernel interface but ignoring all the others may cause problems if we later want to add a more general abstraction. It also looks like at least some of the interfaces require a checksum to be updated, or are based on variable-length entries, both of which require a proper driver. Arnd -- 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/