From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: machine_power_off should not return
Date: Wed, 26 Mar 2014 00:51:15 +0000 [thread overview]
Message-ID: <20140326005115.GW7528@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140325224554.GC12185@arch.cereza>
On Tue, Mar 25, 2014 at 07:45:55PM -0300, Ezequiel Garcia wrote:
> Let's Cc: LAKML, and To: Russell.
>
> Russell, any comments on this?
>
> Without this patch we got the heartbeat's reboot_notifier called twice while
> testing the recent hibernation patches, which was unexpected and produced a
> kernel panic: https://lkml.org/lkml/2014/3/19/363
I don't see why we should make this change. kernel/reboot.c handles
this function returning, so other places should do too.
Even on x86, this function can return:
void machine_power_off(void)
{
machine_ops.power_off();
}
.power_off = native_machine_power_off,
static void native_machine_power_off(void)
{
if (pm_power_off) {
if (!reboot_force)
machine_shutdown();
pm_power_off();
}
/* A fallback in case there is no PM info available */
tboot_shutdown(TB_SHUTDOWN_HALT);
}
void tboot_shutdown(u32 shutdown_type)
{
void (*shutdown)(void);
if (!tboot_enabled())
return;
Therefore, I'd say... it's a bug in the hibernation code - or we probably
have many buggy architectures. I'd suggest fixing the hibernation code
rather than stuffing some workaround like an endless loop into every
architecture.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
next prev parent reply other threads:[~2014-03-26 0:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1395684784-12601-1-git-send-email-sebastian.capella@linaro.org>
2014-03-25 22:45 ` [PATCH] ARM: machine_power_off should not return Ezequiel Garcia
2014-03-26 0:51 ` Russell King - ARM Linux [this message]
2014-03-26 10:12 ` Ezequiel Garcia
2014-03-26 10:59 ` Russell King - ARM Linux
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=20140326005115.GW7528@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).