From: "Grygorii.Strashko@linaro.org" <grygorii.strashko@linaro.org>
To: Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
linux-leds@vger.kernel.org
Cc: sumit.semwal@linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, "Menon,
Nishanth" <nm@ti.com>, Kevin Hilman <khilman@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v2] leds: fix hibernation on arm when gpio-led used with CPU led trigger
Date: Wed, 18 Mar 2015 21:39:13 +0200 [thread overview]
Message-ID: <5509D461.3090703@linaro.org> (raw)
In-Reply-To: <54ECA2E3.8060401@linaro.org>
Hi All,
On 02/24/2015 06:12 PM, Grygorii.Strashko@linaro.org wrote:
> On 02/05/2015 04:37 PM, grygorii.strashko@linaro.org wrote:
>> From: Grygorii Strashko <Grygorii.Strashko@linaro.org>
>>
>> Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of
>> hibernation callbacks means those pm functions will not be
>> called upon hibernation - that leads to system crash on ARM during
>> freezing if gpio-led is used in combination with CPU led trigger.
>> It may happen after freeze_noirq stage (GPIO is suspended)
>> and before syscore_suspend stage (CPU led trigger is suspended)
>> - usually when disable_nonboot_cpus() is called.
>>
>> Log:
>> PM: noirq freeze of devices complete after 1.425 msecs
>> Disabling non-boot CPUs ...
>> ^ system may crash or stuck here with message (TI AM572x)
>>
>> WARNING: CPU: 0 PID: 3100 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x22c/0x370()
>> 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
>>
>> CPU1: shutdown
>> ^ or here
>>
>> Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
>> assigns the suspend and hibernation callbacks and move
>> led_suspend/led_resume under CONFIG_PM_SLEEP to avoid
>> build warnings.
>>
>> Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
>> ---
>> This patch actually fixes commit:
>> 73e1ab4 "leds: Convert led class driver from legacy pm ops to dev_pm_ops"
>>
On 02/24/2015 06:12 PM, Grygorii.Strashko@linaro.org wrote:
>> Changes in v2:
>> - fixed compile time warnings when !CONFIG_PM_SLEEP
>> - updated commit message
>>
>> v1:
>> - https://lkml.org/lkml/2015/2/2/476
>>
>> drivers/leds/led-class.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
>> index dbeebac..5033e0d 100644
>> --- a/drivers/leds/led-class.c
>> +++ b/drivers/leds/led-class.c
>> @@ -183,6 +183,7 @@ void led_classdev_resume(struct led_classdev *led_cdev)
>> }
>> EXPORT_SYMBOL_GPL(led_classdev_resume);
>>
>> +#ifdef CONFIG_PM_SLEEP
>> static int led_suspend(struct device *dev)
>> {
>> struct led_classdev *led_cdev = dev_get_drvdata(dev);
>> @@ -202,11 +203,9 @@ static int led_resume(struct device *dev)
>>
>> return 0;
>> }
>> +#endif
>>
>> -static const struct dev_pm_ops leds_class_dev_pm_ops = {
>> - .suspend = led_suspend,
>> - .resume = led_resume,
>> -};
>> +static SIMPLE_DEV_PM_OPS(leds_class_dev_pm_ops, led_suspend, led_resume);
>>
>> /**
>> * led_classdev_register - register a new object of led_classdev class.
>>
>
> Could you pay attention on this patch, pls? It fixes a real issue for me.
>
> Actually, I'd like to note that it fixes regression introduced by commit
> 73e1ab41a80d36207e8ea7cc2c9897afdeeef387
> "leds: Convert led class driver from legacy pm ops to dev_pm_ops" from
> Shuah Khan <shuah.kh@samsung.com> (Jun 20 2013).
>
Gentle reminder. Any comments on this?
--
regards,
-grygorii
WARNING: multiple messages have this Message-ID (diff)
From: grygorii.strashko@linaro.org (Grygorii.Strashko@linaro.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] leds: fix hibernation on arm when gpio-led used with CPU led trigger
Date: Wed, 18 Mar 2015 21:39:13 +0200 [thread overview]
Message-ID: <5509D461.3090703@linaro.org> (raw)
In-Reply-To: <54ECA2E3.8060401@linaro.org>
Hi All,
On 02/24/2015 06:12 PM, Grygorii.Strashko at linaro.org wrote:
> On 02/05/2015 04:37 PM, grygorii.strashko at linaro.org wrote:
>> From: Grygorii Strashko <Grygorii.Strashko@linaro.org>
>>
>> Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of
>> hibernation callbacks means those pm functions will not be
>> called upon hibernation - that leads to system crash on ARM during
>> freezing if gpio-led is used in combination with CPU led trigger.
>> It may happen after freeze_noirq stage (GPIO is suspended)
>> and before syscore_suspend stage (CPU led trigger is suspended)
>> - usually when disable_nonboot_cpus() is called.
>>
>> Log:
>> PM: noirq freeze of devices complete after 1.425 msecs
>> Disabling non-boot CPUs ...
>> ^ system may crash or stuck here with message (TI AM572x)
>>
>> WARNING: CPU: 0 PID: 3100 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x22c/0x370()
>> 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
>>
>> CPU1: shutdown
>> ^ or here
>>
>> Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
>> assigns the suspend and hibernation callbacks and move
>> led_suspend/led_resume under CONFIG_PM_SLEEP to avoid
>> build warnings.
>>
>> Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
>> ---
>> This patch actually fixes commit:
>> 73e1ab4 "leds: Convert led class driver from legacy pm ops to dev_pm_ops"
>>
On 02/24/2015 06:12 PM, Grygorii.Strashko at linaro.org wrote:
>> Changes in v2:
>> - fixed compile time warnings when !CONFIG_PM_SLEEP
>> - updated commit message
>>
>> v1:
>> - https://lkml.org/lkml/2015/2/2/476
>>
>> drivers/leds/led-class.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
>> index dbeebac..5033e0d 100644
>> --- a/drivers/leds/led-class.c
>> +++ b/drivers/leds/led-class.c
>> @@ -183,6 +183,7 @@ void led_classdev_resume(struct led_classdev *led_cdev)
>> }
>> EXPORT_SYMBOL_GPL(led_classdev_resume);
>>
>> +#ifdef CONFIG_PM_SLEEP
>> static int led_suspend(struct device *dev)
>> {
>> struct led_classdev *led_cdev = dev_get_drvdata(dev);
>> @@ -202,11 +203,9 @@ static int led_resume(struct device *dev)
>>
>> return 0;
>> }
>> +#endif
>>
>> -static const struct dev_pm_ops leds_class_dev_pm_ops = {
>> - .suspend = led_suspend,
>> - .resume = led_resume,
>> -};
>> +static SIMPLE_DEV_PM_OPS(leds_class_dev_pm_ops, led_suspend, led_resume);
>>
>> /**
>> * led_classdev_register - register a new object of led_classdev class.
>>
>
> Could you pay attention on this patch, pls? It fixes a real issue for me.
>
> Actually, I'd like to note that it fixes regression introduced by commit
> 73e1ab41a80d36207e8ea7cc2c9897afdeeef387
> "leds: Convert led class driver from legacy pm ops to dev_pm_ops" from
> Shuah Khan <shuah.kh@samsung.com> (Jun 20 2013).
>
Gentle reminder. Any comments on this?
--
regards,
-grygorii
next prev parent reply other threads:[~2015-03-18 19:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 14:37 [PATCH v2] leds: fix hibernation on arm when gpio-led used with CPU led trigger grygorii.strashko
2015-02-05 14:37 ` grygorii.strashko
2015-02-05 14:37 ` grygorii.strashko at linaro.org
2015-02-24 16:12 ` Grygorii.Strashko@linaro.org
2015-02-24 16:12 ` Grygorii.Strashko@linaro.org
2015-03-18 19:39 ` Grygorii.Strashko@linaro.org [this message]
2015-03-18 19:39 ` Grygorii.Strashko@linaro.org
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=5509D461.3090703@linaro.org \
--to=grygorii.strashko@linaro.org \
--cc=arnd@arndb.de \
--cc=cooloney@gmail.com \
--cc=khilman@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=rpurdie@rpsys.net \
--cc=sumit.semwal@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.