* Query: When will drv->poweroff() called
@ 2012-02-06 5:55 Viresh Kumar
2012-02-06 12:07 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2012-02-06 5:55 UTC (permalink / raw)
To: pavel, Rafael J. Wysocki, len.brown
Cc: linux-pm@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
Shiraz HASHIM, Armando VISCONTI, Vipin KUMAR, deepak sikri,
Vipul Kumar SAMAR, Amit VIRDI, Rajeev KUMAR, Pratyush ANAND,
Mirko GARDI, Vincenzo FRASCINO, Bhupesh SHARMA
Hi Guys,
Sorry for asking this silly question, but i couldn't locate much
help for it in documentation, so asking it.
We were testing hibernation for SPEAr13xx SoC family, based on
ARM Cortex a9.
I observed that poweroff() callback of individual drivers are not
getting called at all, while we test hibernate.
I tried to go through the code to see what happened. It looked like
there should be call to hibernation_set_ops() for platforms that are
willing to get a call to poweroff() for their drivers. Otherwise
shutdown of the busses gets called, which is a completely different path.
There are many drivers today, that are registering poweroff() from dev_pm_ops
but are not doing bus specific shutdown stuff.
Even i tried to look for hibernation_set_ops() in kernel, and only acpi
code is calling it. I didn't understood how other ARM Sub-Arch's are handling
this.
Thanks in advance :)
--
viresh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Query: When will drv->poweroff() called
2012-02-06 5:55 Query: When will drv->poweroff() called Viresh Kumar
@ 2012-02-06 12:07 ` Rafael J. Wysocki
2012-02-07 4:19 ` Viresh Kumar
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2012-02-06 12:07 UTC (permalink / raw)
To: Viresh Kumar
Cc: len.brown, Vipul Kumar SAMAR, Bhupesh SHARMA, Pratyush ANAND,
Armando VISCONTI, Mirko GARDI, linux-kernel@vger.kernel.org,
Vipin KUMAR, Shiraz HASHIM, Amit VIRDI, Rajeev KUMAR,
deepak sikri, linux-pm@lists.linux-foundation.org,
Vincenzo FRASCINO
Hi,
On Monday, February 06, 2012, Viresh Kumar wrote:
>
> Hi Guys,
>
> Sorry for asking this silly question, but i couldn't locate much
> help for it in documentation, so asking it.
>
> We were testing hibernation for SPEAr13xx SoC family, based on
> ARM Cortex a9.
>
> I observed that poweroff() callback of individual drivers are not
> getting called at all, while we test hibernate.
They should be called in the last phase of hibernation, after the image
has been created and the system is going for "power off" (hance the
callback name).
> I tried to go through the code to see what happened. It looked like
> there should be call to hibernation_set_ops() for platforms that are
> willing to get a call to poweroff() for their drivers.
That's correct. The ->poweroff() callbacks are only executed if
hibernation_mode is equal to HIBERNATION_PLATFORM, which is not the
default.
> Otherwise shutdown of the busses gets called, which is a completely
> different path.
>
> There are many drivers today, that are registering poweroff() from dev_pm_ops
> but are not doing bus specific shutdown stuff.
>
> Even i tried to look for hibernation_set_ops() in kernel, and only acpi
> code is calling it.
That's correct too.
> I didn't understood how other ARM Sub-Arch's are handling this.
Well, they are supposed to call hibernation_set_ops() and set the operations
appropriately. Those operations may be empty routines if they don't need
to do anything, but they have to be defined.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Query: When will drv->poweroff() called
2012-02-06 12:07 ` Rafael J. Wysocki
@ 2012-02-07 4:19 ` Viresh Kumar
2012-02-16 15:16 ` viresh kumar
0 siblings, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2012-02-07 4:19 UTC (permalink / raw)
To: Rafael J. Wysocki, amit.kucheria
Cc: pavel@ucw.cz, len.brown@intel.com,
linux-pm@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
Shiraz HASHIM, Armando VISCONTI, Vipin KUMAR, Deepak SIKRI,
Vipul Kumar SAMAR, Amit VIRDI, Rajeev KUMAR, Pratyush ANAND,
Mirko GARDI, Vincenzo FRASCINO, Bhupesh SHARMA,
linux-arm-kernel@lists.infradead.org
Thanks Rafael.
On 2/6/2012 5:37 PM, Rafael J. Wysocki wrote:
> On Monday, February 06, 2012, Viresh Kumar wrote:
>> >
>> > Hi Guys,
>> >
>> > Sorry for asking this silly question, but i couldn't locate much
>> > help for it in documentation, so asking it.
>> >
>> > We were testing hibernation for SPEAr13xx SoC family, based on
>> > ARM Cortex a9.
>> >
>> > I observed that poweroff() callback of individual drivers are not
>> > getting called at all, while we test hibernate.
> They should be called in the last phase of hibernation, after the image
> has been created and the system is going for "power off" (hance the
> callback name).
>
>> > I tried to go through the code to see what happened. It looked like
>> > there should be call to hibernation_set_ops() for platforms that are
>> > willing to get a call to poweroff() for their drivers.
> That's correct. The ->poweroff() callbacks are only executed if
> hibernation_mode is equal to HIBERNATION_PLATFORM, which is not the
> default.
>
>> > Otherwise shutdown of the busses gets called, which is a completely
>> > different path.
>> >
>> > There are many drivers today, that are registering poweroff() from dev_pm_ops
>> > but are not doing bus specific shutdown stuff.
>> >
>> > Even i tried to look for hibernation_set_ops() in kernel, and only acpi
>> > code is calling it.
> That's correct too.
>
>> > I didn't understood how other ARM Sub-Arch's are handling this.
> Well, they are supposed to call hibernation_set_ops() and set the operations
> appropriately. Those operations may be empty routines if they don't need
> to do anything, but they have to be defined.
Hi Amit,
Can you give some input on why none of the ARM platforms are calling
this routine currently.
--
viresh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Query: When will drv->poweroff() called
2012-02-07 4:19 ` Viresh Kumar
@ 2012-02-16 15:16 ` viresh kumar
0 siblings, 0 replies; 4+ messages in thread
From: viresh kumar @ 2012-02-16 15:16 UTC (permalink / raw)
To: amit.kucheria, linux-pm@lists.linux-foundation.org
Cc: Viresh Kumar, Rafael J. Wysocki, len.brown@intel.com,
Vipul Kumar SAMAR, Bhupesh SHARMA, Pratyush ANAND,
Armando VISCONTI, Mirko GARDI, linux-kernel@vger.kernel.org,
Vipin KUMAR, Shiraz HASHIM, Amit VIRDI, Rajeev KUMAR,
pavel@ucw.cz, Deepak SIKRI, linux-arm-kernel@lists.infradead.org,
Vincenzo FRASCINO
[Sorry for mailing again, earlier mail bounced on linux-pm list,
as i wasn't subscribed to it]
Hi Amit,
Can you please clear my doubt regarding calling of
hibernation_set_ops() for ARM SoC's?
--
viresh
On Mon, Feb 6, 2012 at 8:19 PM, Viresh Kumar <viresh.kumar@st.com> wrote:
> On 2/6/2012 5:37 PM, Rafael J. Wysocki wrote:
>> On Monday, February 06, 2012, Viresh Kumar wrote:
>>> >
>>> > Hi Guys,
>>> >
>>> > Sorry for asking this silly question, but i couldn't locate much
>>> > help for it in documentation, so asking it.
>>> >
>>> > We were testing hibernation for SPEAr13xx SoC family, based on
>>> > ARM Cortex a9.
>>> >
>>> > I observed that poweroff() callback of individual drivers are not
>>> > getting called at all, while we test hibernate.
>> They should be called in the last phase of hibernation, after the image
>> has been created and the system is going for "power off" (hance the
>> callback name).
>>
>>> > I tried to go through the code to see what happened. It looked like
>>> > there should be call to hibernation_set_ops() for platforms that are
>>> > willing to get a call to poweroff() for their drivers.
>> That's correct. The ->poweroff() callbacks are only executed if
>> hibernation_mode is equal to HIBERNATION_PLATFORM, which is not the
>> default.
>>
>>> > Otherwise shutdown of the busses gets called, which is a completely
>>> > different path.
>>> >
>>> > There are many drivers today, that are registering poweroff() from dev_pm_ops
>>> > but are not doing bus specific shutdown stuff.
>>> >
>>> > Even i tried to look for hibernation_set_ops() in kernel, and only acpi
>>> > code is calling it.
>> That's correct too.
>>
>>> > I didn't understood how other ARM Sub-Arch's are handling this.
>> Well, they are supposed to call hibernation_set_ops() and set the operations
>> appropriately. Those operations may be empty routines if they don't need
>> to do anything, but they have to be defined.
>
> Hi Amit,
>
> Can you give some input on why none of the ARM platforms are calling
> this routine currently.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-16 15:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-06 5:55 Query: When will drv->poweroff() called Viresh Kumar
2012-02-06 12:07 ` Rafael J. Wysocki
2012-02-07 4:19 ` Viresh Kumar
2012-02-16 15:16 ` viresh kumar
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).