All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Heiko Stübner" <heiko@sntech.de>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Usage of restart_handler in pwrseq_emmc
Date: Tue, 02 Jun 2015 09:42:39 -0700	[thread overview]
Message-ID: <556DDCFF.8000200@roeck-us.net> (raw)
In-Reply-To: <1789396.sexGZzDeEb@diego>

On 06/02/2015 08:29 AM, Heiko Stübner wrote:
> Hi,
>
> I'm confused by the pwrseq-emmc registering a restart_handler for resetting an
> emmc in a panic-reboot case at priority 129 to "schedules it just before
> system reboot".
>
>>From what I remember from the restart-handler discussion the actuall usage is
> traversing the ordered list until one registered handler sucessfully restarts
> the system and not to have arbitary actions in there not related to the actual
> restart process?
>
> The actual documentation in kernel/reboot.c supports this assumption,
> describing register_restart_handler as "Register function to be called to
> reset the system".
>
>
> Additionally, 128 isn't even _the_ priority to reboot the system as described
> above and some drivers use higher priorities per default, see in
> drivers/power/reset arm-versatile-reboot.c; at91-reset.c; rmobile-reset.c and
> some more.
>
>
> So I guess this should use some other mechanism (reboot notifier) instead of
> restart_handlers?
>

Looks like it. Assuming that a restart handler with priority 129 will always
be executed is a bad idea, and having it do anything but restart the system
is an even worse idea and is really asking for trouble.

Guenter

  reply	other threads:[~2015-06-02 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 15:29 Usage of restart_handler in pwrseq_emmc Heiko Stübner
2015-06-02 16:42 ` Guenter Roeck [this message]
2015-06-03 10:01 ` Marek Szyprowski
2015-06-03 15:03   ` Guenter Roeck
2015-06-08  9:36     ` Marek Szyprowski
2015-06-08 15:00       ` Guenter Roeck

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=556DDCFF.8000200@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=acourbot@nvidia.com \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=ulf.hansson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.