Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1405883 > unrolled thread
| Started by | Ocean HY1 He <hehy1@lenovo.com> |
|---|---|
| First post | 2016-05-24 08:50 +0200 |
| Last post | 2016-05-31 12:00 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
RE: [PATCH] ACPI: Execute the _PTS method when system reboot Ocean HY1 He <hehy1@lenovo.com> - 2016-05-24 08:50 +0200
Re: [PATCH] ACPI: Execute the _PTS method when system reboot Prarit Bhargava <prarit@redhat.com> - 2016-05-24 12:20 +0200
RE: [PATCH] ACPI: Execute the _PTS method when system reboot Ocean HY1 He <hehy1@lenovo.com> - 2016-05-30 05:40 +0200
Re: [PATCH] ACPI: Execute the _PTS method when system reboot Prarit Bhargava <prarit@redhat.com> - 2016-05-31 12:00 +0200
| From | Ocean HY1 He <hehy1@lenovo.com> |
|---|---|
| Date | 2016-05-24 08:50 +0200 |
| Subject | RE: [PATCH] ACPI: Execute the _PTS method when system reboot |
| Message-ID | <rCek9-8ge-5@gated-at.bofh.it> |
Hi Prarit and Jon,
How do you think of this?
Thanks.
Ocean He / 何海洋
SW Development Dept.
Beijing Design Center
Enterprise Product Group
Mobile: 18911778926
E-mail: hehy1@lenovo.com
No.6 Chuang Ye Road, Haidian District, Beijing, China 100085
-----Original Message-----
From: Ocean HY1 He
Sent: Monday, May 16, 2016 11:04 AM
To: rjw@rjwysocki.net; lenb@kernel.org
Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David Tanaka; Nagananda Chumbalkar
Subject: RE: [PATCH] ACPI: Execute the _PTS method when system reboot
To whom may concern,
A Lenovo feature depends on _PTS method execution when reboot. And after check the ACPI spec, I think _PTS should be exectued when reboo. This patch could fix the problem.
Any comments of this patch? Many thanks!
Ocean He / 何海洋
SW Development Dept.
Beijing Design Center
Enterprise Product Group
Mobile: 18911778926
E-mail: hehy1@lenovo.com
No.6 Chuang Ye Road, Haidian District, Beijing, China 100085
-----Original Message-----
From: Ocean HY1 He
Sent: Monday, May 09, 2016 1:50 PM
To: rjw@rjwysocki.net; lenb@kernel.org
Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David Tanaka; Ocean HY1 He; Nagananda Chumbalkar
Subject: [PATCH] ACPI: Execute the _PTS method when system reboot
The _PTS control method is defined in the section 7.4.1 of acpi 6.0
spec. The _PTS control method is executed by the OS during the sleep
transition process for S1, S2, S3, S4, and for orderly S5 shutdown.
The sleeping state value (For example, 1, 2, 3, 4 or 5 for the S5
soft-off state) is passed to the _PTS control method. This method
is called after OSPM has notified native device drivers of the sleep
state transition and before the OSPM has had a chance to fully
prepare the system for a sleep state transition.
The _PTS control method provides the BIOS a mechanism for performing
some housekeeping, such as writing the sleep type value to the embedded
controller, before entering the system sleeping state.
According to section 7.5 of acpi 6.0 spec, _PTS should run after _TTS.
Thus, a _PTS block notifier is added to the reboot notifier list so that
the _PTS object will also be evaluated when the system reboot.
Signed-off-by: Ocean He <hehy1@lenovo.com>
Signed-off-by: Nagananda Chumbalkar <nchumbalkar@lenovo.com>
---
drivers/acpi/sleep.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 2a8b596..8b290fb 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -55,6 +55,26 @@ static struct notifier_block tts_notifier = {
.priority = 0,
};
+static int pts_notify_reboot(struct notifier_block *this,
+ unsigned long code, void *x)
+{
+ acpi_status status;
+
+ status = acpi_execute_simple_method(NULL, "\\_PTS", ACPI_STATE_S5);
+ if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
+ /* It won't break anything. */
+ printk(KERN_NOTICE "Failure in evaluating _PTS object\n");
+ }
+
+ return NOTIFY_DONE;
+}
+
+static struct notifier_block pts_notifier = {
+ .notifier_call = pts_notify_reboot,
+ .next = NULL,
+ .priority = 0,
+};
+
static int acpi_sleep_prepare(u32 acpi_state)
{
#ifdef CONFIG_ACPI_SLEEP
@@ -896,5 +916,12 @@ int __init acpi_sleep_init(void)
* object can also be evaluated when the system enters S5.
*/
register_reboot_notifier(&tts_notifier);
+
+ /*
+ * According to section 7.5 of acpi 6.0 spec, _PTS should run after
+ * _TTS when the system enters S5.
+ */
+ register_reboot_notifier(&pts_notifier);
+
return 0;
}
--
1.8.3.1
[toc] | [next] | [standalone]
| From | Prarit Bhargava <prarit@redhat.com> |
|---|---|
| Date | 2016-05-24 12:20 +0200 |
| Message-ID | <rChBn-1Ye-19@gated-at.bofh.it> |
| In reply to | #1405883 |
On 05/24/2016 02:41 AM, Ocean HY1 He wrote:
> Hi Prarit and Jon,
>
> How do you think of this?
>
> Thanks.
>
> Ocean He / 何海洋
> SW Development Dept.
> Beijing Design Center
> Enterprise Product Group
> Mobile: 18911778926
> E-mail: hehy1@lenovo.com
> No.6 Chuang Ye Road, Haidian District, Beijing, China 100085
>
> -----Original Message-----
> From: Ocean HY1 He
> Sent: Monday, May 16, 2016 11:04 AM
> To: rjw@rjwysocki.net; lenb@kernel.org
> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David Tanaka; Nagananda Chumbalkar
> Subject: RE: [PATCH] ACPI: Execute the _PTS method when system reboot
>
> To whom may concern,
>
> A Lenovo feature depends on _PTS method execution when reboot. And after check the ACPI spec, I think _PTS should be exectued when reboo. This patch could fix the problem.
>
> Any comments of this patch? Many thanks!
>
> Ocean He / 何海洋
> SW Development Dept.
> Beijing Design Center
> Enterprise Product Group
> Mobile: 18911778926
> E-mail: hehy1@lenovo.com
> No.6 Chuang Ye Road, Haidian District, Beijing, China 100085
>
> -----Original Message-----
> From: Ocean HY1 He
> Sent: Monday, May 09, 2016 1:50 PM
> To: rjw@rjwysocki.net; lenb@kernel.org
> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David Tanaka; Ocean HY1 He; Nagananda Chumbalkar
> Subject: [PATCH] ACPI: Execute the _PTS method when system reboot
>
> The _PTS control method is defined in the section 7.4.1 of acpi 6.0
> spec. The _PTS control method is executed by the OS during the sleep
> transition process for S1, S2, S3, S4, and for orderly S5 shutdown.
> The sleeping state value (For example, 1, 2, 3, 4 or 5 for the S5
> soft-off state) is passed to the _PTS control method. This method
> is called after OSPM has notified native device drivers of the sleep
> state transition and before the OSPM has had a chance to fully
> prepare the system for a sleep state transition.
>
> The _PTS control method provides the BIOS a mechanism for performing
> some housekeeping, such as writing the sleep type value to the embedded
> controller, before entering the system sleeping state.
>
> According to section 7.5 of acpi 6.0 spec, _PTS should run after _TTS.
>
> Thus, a _PTS block notifier is added to the reboot notifier list so that
> the _PTS object will also be evaluated when the system reboot.
>
> Signed-off-by: Ocean He <hehy1@lenovo.com>
> Signed-off-by: Nagananda Chumbalkar <nchumbalkar@lenovo.com>
> ---
> drivers/acpi/sleep.c | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> index 2a8b596..8b290fb 100644
> --- a/drivers/acpi/sleep.c
> +++ b/drivers/acpi/sleep.c
> @@ -55,6 +55,26 @@ static struct notifier_block tts_notifier = {
> .priority = 0,
> };
>
> +static int pts_notify_reboot(struct notifier_block *this,
> + unsigned long code, void *x)
> +{
> + acpi_status status;
> +
> + status = acpi_execute_simple_method(NULL, "\\_PTS", ACPI_STATE_S5);
> + if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
> + /* It won't break anything. */
> + printk(KERN_NOTICE "Failure in evaluating _PTS object\n");
^^^^
pr_debug("No _PTS object found.\n");
It isn't a warning or error, so don't put the word "Failure" in there.
Beyond that, looks entirely reasonable to me.
P.
> + }
> +
> + return NOTIFY_DONE;
> +}
> +
> +static struct notifier_block pts_notifier = {
> + .notifier_call = pts_notify_reboot,
> + .next = NULL,
> + .priority = 0,
> +};
> +
> static int acpi_sleep_prepare(u32 acpi_state)
> {
> #ifdef CONFIG_ACPI_SLEEP
> @@ -896,5 +916,12 @@ int __init acpi_sleep_init(void)
> * object can also be evaluated when the system enters S5.
> */
> register_reboot_notifier(&tts_notifier);
> +
> + /*
> + * According to section 7.5 of acpi 6.0 spec, _PTS should run after
> + * _TTS when the system enters S5.
> + */
> + register_reboot_notifier(&pts_notifier);
> +
> return 0;
> }
>
[toc] | [prev] | [next] | [standalone]
| From | Ocean HY1 He <hehy1@lenovo.com> |
|---|---|
| Date | 2016-05-30 05:40 +0200 |
| Message-ID | <rEmdA-76Y-3@gated-at.bofh.it> |
| In reply to | #1406032 |
> -----Original Message-----
> From: Prarit Bhargava [mailto:prarit@redhat.com]
> Sent: Tuesday, May 24, 2016 6:16 PM
> To: Ocean HY1 He; jcm@redhat.com
> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David Tanaka;
> Nagananda Chumbalkar; rjw@rjwysocki.net; lenb@kernel.org;
> wefu@redhat.com
> Subject: Re: [PATCH] ACPI: Execute the _PTS method when system reboot
>
>
>
> On 05/24/2016 02:41 AM, Ocean HY1 He wrote:
> > Hi Prarit and Jon,
> >
> > How do you think of this?
> >
> > Thanks.
> >
> > Ocean He / 何海洋
> > SW Development Dept.
> > Beijing Design Center
> > Enterprise Product Group
> > Mobile: 18911778926
> > E-mail: hehy1@lenovo.com
> > No.6 Chuang Ye Road, Haidian District, Beijing, China 100085
> >
> > -----Original Message-----
> > From: Ocean HY1 He
> > Sent: Monday, May 16, 2016 11:04 AM
> > To: rjw@rjwysocki.net; lenb@kernel.org
> > Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David
> Tanaka; Nagananda Chumbalkar
> > Subject: RE: [PATCH] ACPI: Execute the _PTS method when system
> reboot
> >
> > To whom may concern,
> >
> > A Lenovo feature depends on _PTS method execution when reboot. And
> after check the ACPI spec, I think _PTS should be exectued when reboo.
> This patch could fix the problem.
> >
> > Any comments of this patch? Many thanks!
> >
> > Ocean He / 何海洋
> > SW Development Dept.
> > Beijing Design Center
> > Enterprise Product Group
> > Mobile: 18911778926
> > E-mail: hehy1@lenovo.com
> > No.6 Chuang Ye Road, Haidian District, Beijing, China 100085
> >
> > -----Original Message-----
> > From: Ocean HY1 He
> > Sent: Monday, May 09, 2016 1:50 PM
> > To: rjw@rjwysocki.net; lenb@kernel.org
> > Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David
> Tanaka; Ocean HY1 He; Nagananda Chumbalkar
> > Subject: [PATCH] ACPI: Execute the _PTS method when system reboot
> >
> > The _PTS control method is defined in the section 7.4.1 of acpi 6.0
> > spec. The _PTS control method is executed by the OS during the sleep
> > transition process for S1, S2, S3, S4, and for orderly S5 shutdown.
> > The sleeping state value (For example, 1, 2, 3, 4 or 5 for the S5
> > soft-off state) is passed to the _PTS control method. This method
> > is called after OSPM has notified native device drivers of the sleep
> > state transition and before the OSPM has had a chance to fully
> > prepare the system for a sleep state transition.
> >
> > The _PTS control method provides the BIOS a mechanism for performing
> > some housekeeping, such as writing the sleep type value to the
> embedded
> > controller, before entering the system sleeping state.
> >
> > According to section 7.5 of acpi 6.0 spec, _PTS should run after _TTS.
> >
> > Thus, a _PTS block notifier is added to the reboot notifier list so that
> > the _PTS object will also be evaluated when the system reboot.
> >
> > Signed-off-by: Ocean He <hehy1@lenovo.com>
> > Signed-off-by: Nagananda Chumbalkar <nchumbalkar@lenovo.com>
> > ---
> > drivers/acpi/sleep.c | 27 +++++++++++++++++++++++++++
> > 1 file changed, 27 insertions(+)
> >
> > diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> > index 2a8b596..8b290fb 100644
> > --- a/drivers/acpi/sleep.c
> > +++ b/drivers/acpi/sleep.c
> > @@ -55,6 +55,26 @@ static struct notifier_block tts_notifier = {
> > .priority = 0,
> > };
> >
> > +static int pts_notify_reboot(struct notifier_block *this,
> > + unsigned long code, void *x)
> > +{
> > + acpi_status status;
> > +
> > + status = acpi_execute_simple_method(NULL, "\\_PTS",
> ACPI_STATE_S5);
> > + if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
> > + /* It won't break anything. */
> > + printk(KERN_NOTICE "Failure in evaluating _PTS object\n");
>
> ^^^^
> pr_debug("No _PTS object found.\n");
>
> It isn't a warning or error, so don't put the word "Failure" in there.
>
> Beyond that, looks entirely reasonable to me.
>
> P.
>
Hi Prarit,
The message outputs when _PTS is found but fail to execute. I copy this code
from existed function acpi_sleep_tts_switch(). I just wants to keep new codes
as the same style as existed codes. Make sense? ;-)
Ocean.
>
> > + }
> > +
> > + return NOTIFY_DONE;
> > +}
> > +
> > +static struct notifier_block pts_notifier = {
> > + .notifier_call = pts_notify_reboot,
> > + .next = NULL,
> > + .priority = 0,
> > +};
> > +
> > static int acpi_sleep_prepare(u32 acpi_state)
> > {
> > #ifdef CONFIG_ACPI_SLEEP
> > @@ -896,5 +916,12 @@ int __init acpi_sleep_init(void)
> > * object can also be evaluated when the system enters S5.
> > */
> > register_reboot_notifier(&tts_notifier);
> > +
> > + /*
> > + * According to section 7.5 of acpi 6.0 spec, _PTS should run after
> > + * _TTS when the system enters S5.
> > + */
> > + register_reboot_notifier(&pts_notifier);
> > +
> > return 0;
> > }
> >
[toc] | [prev] | [next] | [standalone]
| From | Prarit Bhargava <prarit@redhat.com> |
|---|---|
| Date | 2016-05-31 12:00 +0200 |
| Message-ID | <rEOCS-11o-41@gated-at.bofh.it> |
| In reply to | #1408745 |
On 05/29/2016 11:28 PM, Ocean HY1 He wrote:
>> -----Original Message-----
>> From: Prarit Bhargava [mailto:prarit@redhat.com]
>> Sent: Tuesday, May 24, 2016 6:16 PM
>> To: Ocean HY1 He; jcm@redhat.com
>> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David Tanaka;
>> Nagananda Chumbalkar; rjw@rjwysocki.net; lenb@kernel.org;
>> wefu@redhat.com
>> Subject: Re: [PATCH] ACPI: Execute the _PTS method when system reboot
>>
>>
>>
>> On 05/24/2016 02:41 AM, Ocean HY1 He wrote:
>>> Hi Prarit and Jon,
>>>
>>> How do you think of this?
>>>
>>> Thanks.
>>>
>>> Ocean He / 何海洋
>>> SW Development Dept.
>>> Beijing Design Center
>>> Enterprise Product Group
>>> Mobile: 18911778926
>>> E-mail: hehy1@lenovo.com
>>> No.6 Chuang Ye Road, Haidian District, Beijing, China 100085
>>>
>>> -----Original Message-----
>>> From: Ocean HY1 He
>>> Sent: Monday, May 16, 2016 11:04 AM
>>> To: rjw@rjwysocki.net; lenb@kernel.org
>>> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David
>> Tanaka; Nagananda Chumbalkar
>>> Subject: RE: [PATCH] ACPI: Execute the _PTS method when system
>> reboot
>>>
>>> To whom may concern,
>>>
>>> A Lenovo feature depends on _PTS method execution when reboot. And
>> after check the ACPI spec, I think _PTS should be exectued when reboo.
>> This patch could fix the problem.
>>>
>>> Any comments of this patch? Many thanks!
>>>
>>> Ocean He / 何海洋
>>> SW Development Dept.
>>> Beijing Design Center
>>> Enterprise Product Group
>>> Mobile: 18911778926
>>> E-mail: hehy1@lenovo.com
>>> No.6 Chuang Ye Road, Haidian District, Beijing, China 100085
>>>
>>> -----Original Message-----
>>> From: Ocean HY1 He
>>> Sent: Monday, May 09, 2016 1:50 PM
>>> To: rjw@rjwysocki.net; lenb@kernel.org
>>> Cc: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; David
>> Tanaka; Ocean HY1 He; Nagananda Chumbalkar
>>> Subject: [PATCH] ACPI: Execute the _PTS method when system reboot
>>>
>>> The _PTS control method is defined in the section 7.4.1 of acpi 6.0
>>> spec. The _PTS control method is executed by the OS during the sleep
>>> transition process for S1, S2, S3, S4, and for orderly S5 shutdown.
>>> The sleeping state value (For example, 1, 2, 3, 4 or 5 for the S5
>>> soft-off state) is passed to the _PTS control method. This method
>>> is called after OSPM has notified native device drivers of the sleep
>>> state transition and before the OSPM has had a chance to fully
>>> prepare the system for a sleep state transition.
>>>
>>> The _PTS control method provides the BIOS a mechanism for performing
>>> some housekeeping, such as writing the sleep type value to the
>> embedded
>>> controller, before entering the system sleeping state.
>>>
>>> According to section 7.5 of acpi 6.0 spec, _PTS should run after _TTS.
>>>
>>> Thus, a _PTS block notifier is added to the reboot notifier list so that
>>> the _PTS object will also be evaluated when the system reboot.
>>>
>>> Signed-off-by: Ocean He <hehy1@lenovo.com>
>>> Signed-off-by: Nagananda Chumbalkar <nchumbalkar@lenovo.com>
>>> ---
>>> drivers/acpi/sleep.c | 27 +++++++++++++++++++++++++++
>>> 1 file changed, 27 insertions(+)
>>>
>>> diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
>>> index 2a8b596..8b290fb 100644
>>> --- a/drivers/acpi/sleep.c
>>> +++ b/drivers/acpi/sleep.c
>>> @@ -55,6 +55,26 @@ static struct notifier_block tts_notifier = {
>>> .priority = 0,
>>> };
>>>
>>> +static int pts_notify_reboot(struct notifier_block *this,
>>> + unsigned long code, void *x)
>>> +{
>>> + acpi_status status;
>>> +
>>> + status = acpi_execute_simple_method(NULL, "\\_PTS",
>> ACPI_STATE_S5);
>>> + if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
>>> + /* It won't break anything. */
>>> + printk(KERN_NOTICE "Failure in evaluating _PTS object\n");
>>
>> ^^^^
>> pr_debug("No _PTS object found.\n");
>>
>> It isn't a warning or error, so don't put the word "Failure" in there.
>>
>> Beyond that, looks entirely reasonable to me.
>>
>> P.
>>
> Hi Prarit,
>
> The message outputs when _PTS is found but fail to execute. I copy this code
> from existed function acpi_sleep_tts_switch(). I just wants to keep new codes
> as the same style as existed codes. Make sense? ;-)
Not really. "Failure" is something that QE groups look for when testing,
debugging, or verifying. This message implies something went wrong when the
_PTS object is an optional implementation of ACPI.
P.
>
> Ocean.
>>
>>> + }
>>> +
>>> + return NOTIFY_DONE;
>>> +}
>>> +
>>> +static struct notifier_block pts_notifier = {
>>> + .notifier_call = pts_notify_reboot,
>>> + .next = NULL,
>>> + .priority = 0,
>>> +};
>>> +
>>> static int acpi_sleep_prepare(u32 acpi_state)
>>> {
>>> #ifdef CONFIG_ACPI_SLEEP
>>> @@ -896,5 +916,12 @@ int __init acpi_sleep_init(void)
>>> * object can also be evaluated when the system enters S5.
>>> */
>>> register_reboot_notifier(&tts_notifier);
>>> +
>>> + /*
>>> + * According to section 7.5 of acpi 6.0 spec, _PTS should run after
>>> + * _TTS when the system enters S5.
>>> + */
>>> + register_reboot_notifier(&pts_notifier);
>>> +
>>> return 0;
>>> }
>>>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web