From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Grygorii Strashko <Grygorii.Strashko@linaro.org>,
Jacek Anaszewski <j.anaszewski@samsung.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: [PATCH 4.0 51/58] leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger
Date: Sun, 19 Jul 2015 12:11:29 -0700 [thread overview]
Message-ID: <20150719190812.932896057@linuxfoundation.org> (raw)
In-Reply-To: <20150719190811.308546345@linuxfoundation.org>
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Grygorii Strashko <Grygorii.Strashko@linaro.org>
commit 084609bf727981c7a2e6e69aefe0052c9d793300 upstream.
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.
Fixes: 73e1ab41a80d (leds: Convert led class driver from legacy pm ops to dev_pm_ops)
Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/leds/led-class.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -187,6 +187,7 @@ void led_classdev_resume(struct led_clas
}
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);
@@ -206,11 +207,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.
next prev parent reply other threads:[~2015-07-19 19:21 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-19 19:10 [PATCH 4.0 00/58] 4.0.9-stable review Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 01/58] fs: Add helper functions for permanently empty directories Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 02/58] sysctl: Allow creating permanently empty directories that serve as mountpoints Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 03/58] proc: Allow creating permanently empty directories that serve as mount points Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 04/58] kernfs: Add support for always empty directories Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 05/58] sysfs: Add support for permanently empty directories to serve as mount points Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 06/58] mnt: Update fs_fully_visible to test for permanently empty directories Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 07/58] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 08/58] mnt: Modify fs_fully_visible to deal with locked ro nodev and atime Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 09/58] sysfs: Create mountpoints with sysfs_create_mount_point Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 10/58] gpio: crystalcove: set IRQCHIP_SKIP_SET_WAKE for the irqchip Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 11/58] rcu: Correctly handle non-empty Tiny RCU callback list with none ready Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 12/58] ipr: Increase default adapter init stage change timeout Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 13/58] Disable write buffering on Toshiba ToPIC95 Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 14/58] ALSA: pcm: Fix pcm_class sysfs output Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 15/58] ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 16/58] ALSA: hda - set proper caps for newer AMD hda audio in KB/KV Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 17/58] ALSA: hda - Add headset support to Acer Aspire V5 Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 18/58] ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780 Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 19/58] ACPI / init: Switch over platform to the ACPI mode later Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 20/58] ACPI / PM: Add missing pm_generic_complete() invocation Greg Kroah-Hartman
2015-07-19 19:10 ` [PATCH 4.0 21/58] iio: accel: kxcjk-1013: add the "KXCJ9000" ACPI id Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 22/58] tools selftests: Fix clean target with make 3.81 Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 23/58] ARC: add smp barriers around atomics per Documentation/atomic_ops.txt Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 24/58] ARC: add compiler barrier to LLSC based cmpxchg Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 25/58] mei: me: wait for power gating exit confirmation Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 26/58] mei: txe: reduce suspend/resume time Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 27/58] arm64: Do not attempt to use init_mm in reset_context() Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 28/58] arm64: entry: fix context tracking for el0_sp_pc Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 29/58] arm64: mm: Fix freeing of the wrong memmap entries with !SPARSEMEM_VMEMMAP Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 30/58] arm64: vdso: work-around broken ELF toolchains in Makefile Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 31/58] mm: kmemleak: allow safe memory scanning during kmemleak disabling Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 32/58] mm: kmemleak_alloc_percpu() should follow the gfp from per_alloc() Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 33/58] mm, thp: respect MPOL_PREFERRED policy with non-local node Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 34/58] iser-target: release stale iser connections Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 35/58] regmap: Fix regmap_bulk_read in BE mode Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 36/58] regmap: Fix possible shift overflow in regmap_field_init() Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 37/58] regulator: max77686: fix gpio_enabled shift wrapping bug Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 38/58] regulator: core: fix constraints output buffer Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 39/58] livepatch: add module locking around kallsyms calls Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 41/58] spi: orion: Fix maximum baud rates for Armada 370/XP Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 42/58] spi: pl022: Specify num-cs property as required in devicetree binding Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 43/58] scsi_transport_srp: Introduce srp_wait_for_queuecommand() Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 44/58] scsi_transport_srp: Fix a race condition Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 45/58] IB/srp: Remove an extraneous scsi_host_put() from an error path Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 46/58] IB/srp: Fix a connection setup race Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 47/58] IB/srp: Fix connection state tracking Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 48/58] IB/srp: Fix reconnection failure handling Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 49/58] genirq: devres: Fix testing return value of request_any_context_irq() Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 50/58] video: mxsfb: Make sure axi clock is enabled when accessing registers Greg Kroah-Hartman
2015-07-19 19:11 ` Greg Kroah-Hartman [this message]
2015-07-19 19:11 ` [PATCH 4.0 52/58] mtd: fix: avoid race condition when accessing mtd->usecount Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 54/58] PCI: Propagate the "ignore hotplug" setting to parent Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 55/58] PCI: Add pci_bus_addr_t Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 56/58] PCI: pciehp: Wait for hotplug command completion where necessary Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 57/58] of/pci: Fix pci_address_to_pio() conversion of CPU address to I/O port Greg Kroah-Hartman
2015-07-19 19:11 ` [PATCH 4.0 58/58] Input: pixcir_i2c_ts - fix receive error Greg Kroah-Hartman
2015-07-20 3:17 ` [PATCH 4.0 00/58] 4.0.9-stable review Guenter Roeck
2015-07-20 7:18 ` Sudip Mukherjee
2015-07-20 17:18 ` Shuah Khan
2015-07-20 21:29 ` Rafael J. Wysocki
2015-07-20 22:04 ` Greg Kroah-Hartman
2015-07-20 22:38 ` Rafael J. Wysocki
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=20150719190812.932896057@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=Grygorii.Strashko@linaro.org \
--cc=j.anaszewski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=stable@vger.kernel.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 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).