Re: [RFC][PATCH] misc: Introduce reboot_reason driver

From: One Thousand Gnomes
Date: Thu Dec 10 2015 - 14:58:18 EST


On Thu, 10 Dec 2015 11:04:03 -0800
John Stultz <john.stultz@xxxxxxxxxx> wrote:

> On Thu, Dec 10, 2015 at 1:20 AM, Tomas Winkler <tomasw@xxxxxxxxx> wrote:
> > Intel uses EFI variables for that on some AOS platforms. There is a
> > need for persistent storage abstraction and generalize the reboot
> > reasons strings.
>
> Yea. I've been told there isn't any sort of standardized method for
> EFI here. But I have seen a few different implementations floating
> around.
>
> One of the machines I want to support with this driver is actually
> using a UEFI bootloader, but we don't have separate storage to use to
> communicate back via the UEFI methods, so the ram based approach looks
> like the best solution.
>
> > Second, I wonder why this is submitted under drivers/misc when it
> > doesn't bind the misc API.
>
> Heh. Apologies. Its more of a "where do I put this?", misc rather then
> "this should be part of the established misc infrastructure!"
> Suggestions for alternative locations?

Other than providing a reason (which could be via sysfs) I don't actually
see what in the rest of it doesn't either live in the platform arch/ code
or for standardised firmware in the EFI / ACPI or some other drivers.

sysfs node provides the reason string, reboot notifiers get run before
reboot, and it's up to the platform to decide if it wants to do anything
with the reason string before it hits the switch.

I don't see the need for anything but an extra /sys/power node in the core
kernel ? The rest from a core kernel perspective is already there.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/