linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Keerthy <a0393675@ti.com>,
	nm@ti.com, grygorii.strashko@ti.com,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-pm@vger.kernel.org, peterz@infradead.org,
	Keerthy <j-keerthy@ti.com>,
	linux-kernel@vger.kernel.org, josh@joshtriplett.org,
	edubezval@gmail.com, joel@jms.id.au, mpe@ellerman.id.au,
	akpm@linux-foundation.org, linux-omap@vger.kernel.org,
	dyoung@redhat.com, Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] reboot: Backup orderly_poweroff
Date: Fri, 15 Jan 2016 11:13:12 +0100	[thread overview]
Message-ID: <20160115101312.GA23349@gmail.com> (raw)
In-Reply-To: <20160114142227.GB5783@n2100.arm.linux.org.uk>


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Thu, Jan 14, 2016 at 12:23:54PM +0100, Ingo Molnar wrote:
> > * Keerthy <a0393675@ti.com> wrote:
> > > I tried to simulate the issue.
> > > 
> > > In the probe function of drivers/thermal/ti-soc-thermal/ti-bandgap.c
> > > ti_bandgap_probe i call
> > > 
> > > orderly_poweroff(true);
> > > 
> > > This is while driver probes are still on going. I observe that
> > > ret = run_cmd(poweroff_cmd);
> > > 
> > > ret is a non-zero value and we enter the if condition:
> > > 
> > > Even after the
> > > 
> > > emergency_sync();
> > > kernel_power_off();
> > > 
> > > calls
> > > 
> > > the console remained active in weird state.
> > 
> > Now _that_ is clearly an architecture bug that should not be papered over ...
> 
> No, it's not an architecture bug - it's a platform bug. [...]

It's an 'architecture bug' in Linux kernel speak: all stuff that is traditionally 
under arch/*. The 'arch' in that directory name derives from 'architecture'.

kernel_power_off() is a traditionally architecture level (not core kernel level 
and not driver level) code.

> [...] The ARM architecture has no standard way to control CPU reset or system 
> power, all that is up to the platform.

... and platform code is typically part of arch/ as well.

FYI, you are making an unnecessarily obtuse argument by insisting on the 
architecture != platform triviality and you also injected an uncalled for 
patronizing tone into this discussion by pretending that I don't know that 
distinction. It's sad.

> > If kernel_power_off() is called then the system should power off. No ifs and 
> > whens.
> 
> There definitely are ifs and whens.  Only if the platform has support, and when 
> that support works.

And that is precisely what I meant: in a correctly working kernel, with correctly 
working hardware, in a correctly working universe, the core kernel expects 
kernel_power_off() to never 'fail'.

As the name suggests.

Yes, bugs in user-space, kernel-space, hardware and designed buggy hardware might 
prevent a reboot - as usual.

I.e. I NAK this patch from a core kernel perspective, we don't add such 
workarounds without a lot more information about why it's the right thing to do.

Thanks,

	Ingo

  reply	other threads:[~2016-01-15 10:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13 12:33 [PATCH v2] reboot: Backup orderly_poweroff Keerthy
2016-01-14  9:05 ` Ingo Molnar
2016-01-14  9:18   ` Keerthy
2016-01-14 10:09     ` Ingo Molnar
2016-01-14 10:42       ` Keerthy
2016-01-14 11:23         ` Ingo Molnar
2016-01-14 13:25           ` One Thousand Gnomes
2016-01-15 10:14             ` Ingo Molnar
2016-01-15 13:29               ` Grygorii Strashko
2016-01-15 14:12                 ` Russell King - ARM Linux
2016-01-19  9:06                 ` Ingo Molnar
2016-01-19 10:32                   ` Keerthy
2016-01-14 14:22           ` Russell King - ARM Linux
2016-01-15 10:13             ` Ingo Molnar [this message]
2016-01-15 11:05               ` 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=20160115101312.GA23349@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=a0393675@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=dyoung@redhat.com \
    --cc=edubezval@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=j-keerthy@ti.com \
    --cc=joel@jms.id.au \
    --cc=josh@joshtriplett.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mpe@ellerman.id.au \
    --cc=nm@ti.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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).