Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-20 Thread Pavel Machek
On Fri 2014-04-18 14:38:34, Sebastian Capella wrote: > Thanks Russell, Alan! > > So we're OK with the current patch + replacing while(1) after > kernel_halt at the end of power_down in hibernate.c with a while (1) > cpu_relax()? > > Any other changes needed? > > If not, I'll send a follow up

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-20 Thread Pavel Machek
On Fri 2014-04-18 14:38:34, Sebastian Capella wrote: Thanks Russell, Alan! So we're OK with the current patch + replacing while(1) after kernel_halt at the end of power_down in hibernate.c with a while (1) cpu_relax()? Any other changes needed? If not, I'll send a follow up patch with

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-18 Thread Sebastian Capella
Thanks Russell, Alan! So we're OK with the current patch + replacing while(1) after kernel_halt at the end of power_down in hibernate.c with a while (1) cpu_relax()? Any other changes needed? If not, I'll send a follow up patch with just these. Thanks! Sebastian -- To unsubscribe from this

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-18 Thread Sebastian Capella
Thanks Russell, Alan! So we're OK with the current patch + replacing while(1) after kernel_halt at the end of power_down in hibernate.c with a while (1) cpu_relax()? Any other changes needed? If not, I'll send a follow up patch with just these. Thanks! Sebastian -- To unsubscribe from this

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-16 Thread Russell King - ARM Linux
On Wed, Apr 16, 2014 at 09:57:18PM +0100, One Thousand Gnomes wrote: > > I'd say scrap (a) _unless_ we're going to add while (1) loops to all > > the architectures. Alternatively, we could just accept that > > machine_power_off() may return and deal with that case (iow, not > > crash) in generic

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-16 Thread One Thousand Gnomes
> I'd say scrap (a) _unless_ we're going to add while (1) loops to all > the architectures. Alternatively, we could just accept that > machine_power_off() may return and deal with that case (iow, not > crash) in generic code. What would the right behaviour be while(1); isn't really nice

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-16 Thread Russell King - ARM Linux
On Wed, Apr 16, 2014 at 09:28:28AM -0700, Sebastian Capella wrote: > On 15 April 2014 14:18, Pavel Machek wrote: > > On Tue 2014-04-15 21:54:53, Russell King - ARM Linux wrote: > >> What I'm basically saying is that I see no reason for ARM to do something > >> different to what x86 does. > >> >

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-16 Thread Sebastian Capella
On 15 April 2014 14:18, Pavel Machek wrote: > On Tue 2014-04-15 21:54:53, Russell King - ARM Linux wrote: >> What I'm basically saying is that I see no reason for ARM to do something >> different to what x86 does. >> >> What is pretty clear to me is that ARM is compatible with x86, which is >>

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-16 Thread Sebastian Capella
On 15 April 2014 14:18, Pavel Machek pa...@ucw.cz wrote: On Tue 2014-04-15 21:54:53, Russell King - ARM Linux wrote: What I'm basically saying is that I see no reason for ARM to do something different to what x86 does. What is pretty clear to me is that ARM is compatible with x86, which is

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-16 Thread Russell King - ARM Linux
On Wed, Apr 16, 2014 at 09:28:28AM -0700, Sebastian Capella wrote: On 15 April 2014 14:18, Pavel Machek pa...@ucw.cz wrote: On Tue 2014-04-15 21:54:53, Russell King - ARM Linux wrote: What I'm basically saying is that I see no reason for ARM to do something different to what x86 does.

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-16 Thread One Thousand Gnomes
I'd say scrap (a) _unless_ we're going to add while (1) loops to all the architectures. Alternatively, we could just accept that machine_power_off() may return and deal with that case (iow, not crash) in generic code. What would the right behaviour be while(1); isn't really nice behaviour

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-16 Thread Russell King - ARM Linux
On Wed, Apr 16, 2014 at 09:57:18PM +0100, One Thousand Gnomes wrote: I'd say scrap (a) _unless_ we're going to add while (1) loops to all the architectures. Alternatively, we could just accept that machine_power_off() may return and deal with that case (iow, not crash) in generic code.

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-15 Thread Pavel Machek
On Tue 2014-04-15 21:54:53, Russell King - ARM Linux wrote: > On Tue, Apr 15, 2014 at 11:34:52AM -0700, Sebastian Capella wrote: > > Ping.. > > > > There appears to be disagreement on the correct path to take on this. > > > > Pavel and Alan recommend that arm's machine_power_off shall never

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-15 Thread Russell King - ARM Linux
On Tue, Apr 15, 2014 at 11:34:52AM -0700, Sebastian Capella wrote: > Ping.. > > There appears to be disagreement on the correct path to take on this. > > Pavel and Alan recommend that arm's machine_power_off shall never return > > Russell suggests hibernation be modified to handle

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-15 Thread Sebastian Capella
Ping.. There appears to be disagreement on the correct path to take on this. Pavel and Alan recommend that arm's machine_power_off shall never return Russell suggests hibernation be modified to handle machine_power_off returning; that x86 architecture (and others as well) can have

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-15 Thread Sebastian Capella
Ping.. There appears to be disagreement on the correct path to take on this. Pavel and Alan recommend that arm's machine_power_off shall never return Russell suggests hibernation be modified to handle machine_power_off returning; that x86 architecture (and others as well) can have

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-15 Thread Russell King - ARM Linux
On Tue, Apr 15, 2014 at 11:34:52AM -0700, Sebastian Capella wrote: Ping.. There appears to be disagreement on the correct path to take on this. Pavel and Alan recommend that arm's machine_power_off shall never return Russell suggests hibernation be modified to handle machine_power_off

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-04-15 Thread Pavel Machek
On Tue 2014-04-15 21:54:53, Russell King - ARM Linux wrote: On Tue, Apr 15, 2014 at 11:34:52AM -0700, Sebastian Capella wrote: Ping.. There appears to be disagreement on the correct path to take on this. Pavel and Alan recommend that arm's machine_power_off shall never return

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-26 Thread Sebastian Capella
> On 20 March 2014 14:35, One Thousand Gnomes > wrote: >>> if (pm_power_off) >>> pm_power_off(); >>> ## It really should do while (1) here. >> while(1) >> cpu_relax(); >> or similar at minimum. Hi Alan, Pavel, I prepared the changes suggested for

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-26 Thread Sebastian Capella
On 20 March 2014 14:35, One Thousand Gnomes gno...@lxorguk.ukuu.org.uk wrote: if (pm_power_off) pm_power_off(); ## It really should do while (1) here. while(1) cpu_relax(); or similar at minimum. Hi Alan, Pavel, I prepared the changes

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-20 Thread Sebastian Capella
Thanks Pavel and Alan for your comments! I'll rework and try again. Sebastian On 20 March 2014 14:35, One Thousand Gnomes wrote: >> if (pm_power_off) >> pm_power_off(); >> } >> >> ## It really should do while (1) here. > > while(1) > cpu_relax(); >

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-20 Thread One Thousand Gnomes
> if (pm_power_off) > pm_power_off(); > } > > ## It really should do while (1) here. while(1) cpu_relax(); or similar at minimum. Alan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-20 Thread Pavel Machek
Hi! > Reboot logic in kernel/reboot will avoid calling kernel_power_off > when pm_power_off is null, and instead uses kernel_halt. Change > hibernate's power_down to follow the behavior in the reboot call. > > Calling the notifier twice (once for SYS_POWER_OFF and again for > SYS_HALT) causes a

[PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-20 Thread Sebastian Capella
Reboot logic in kernel/reboot will avoid calling kernel_power_off when pm_power_off is null, and instead uses kernel_halt. Change hibernate's power_down to follow the behavior in the reboot call. Calling the notifier twice (once for SYS_POWER_OFF and again for SYS_HALT) causes a panic during

[PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-20 Thread Sebastian Capella
Reboot logic in kernel/reboot will avoid calling kernel_power_off when pm_power_off is null, and instead uses kernel_halt. Change hibernate's power_down to follow the behavior in the reboot call. Calling the notifier twice (once for SYS_POWER_OFF and again for SYS_HALT) causes a panic during

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-20 Thread Pavel Machek
Hi! Reboot logic in kernel/reboot will avoid calling kernel_power_off when pm_power_off is null, and instead uses kernel_halt. Change hibernate's power_down to follow the behavior in the reboot call. Calling the notifier twice (once for SYS_POWER_OFF and again for SYS_HALT) causes a panic

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-20 Thread One Thousand Gnomes
if (pm_power_off) pm_power_off(); } ## It really should do while (1) here. while(1) cpu_relax(); or similar at minimum. Alan -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to

Re: [PATCH RFC] PM / Hibernate: no kernel_power_off when pm_power_off NULL

2014-03-20 Thread Sebastian Capella
Thanks Pavel and Alan for your comments! I'll rework and try again. Sebastian On 20 March 2014 14:35, One Thousand Gnomes gno...@lxorguk.ukuu.org.uk wrote: if (pm_power_off) pm_power_off(); } ## It really should do while (1) here. while(1)