2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/arch/arm/mach-mx5
Arnaud Patard (Rtp) 100aafc992 ARM: mx5: fix clock usage for suspend
While suspending, we're enabling a clock in ->suspend() but we're in atomic
context, leading to this :

[30803.667305] PM: late suspend of devices complete after 1.237 msecs
[30803.667449] BUG: sleeping function called from invalid context at kernel/mutex.c:271
[30803.667464] in_atomic(): 0, irqs_disabled(): 128, pid: 4941, name: pm-suspend
[30803.667474] INFO: lockdep is turned off.
[30803.667483] irq event stamp: 0
[30803.667489] hardirqs last  enabled at (0): [<  (null)>]   (null)
[30803.667503] hardirqs last disabled at (0): [<c001e4a8>] copy_process.part.48+0x1e0/0xa7c
[30803.667543] softirqs last  enabled at (0): [<c001e4a8>] copy_process.part.48+0x1e0/0xa7c
[30803.667562] softirqs last disabled at (0): [<  (null)>]   (null)
[30803.667574] Backtrace:
[30803.667611] [<c0010e00>] (dump_backtrace+0x0/0x110) from [<c0424c00>] (dump_stack+0x18/0x1c)
[30803.667624]  r6:00000000 r5:00000000 r4:d9648000 r3:d9648000
[30803.667652] [<c0424be8>] (dump_stack+0x0/0x1c) from [<c0424eec>] (__might_sleep.part.101+0x90/0xa8)
[30803.667673] [<c0424e5c>] (__might_sleep.part.101+0x0/0xa8) from [<c001a5c4>] (__might_sleep+0x80/0x94)
[30803.667686]  r4:c05d58c0
[30803.667705] [<c001a544>] (__might_sleep+0x0/0x94) from [<c043230c>] (mutex_lock_nested+0x2c/0x30c)
[30803.667735] [<c04322e0>] (mutex_lock_nested+0x0/0x30c) from [<c0017834>] (clk_enable+0x28/0x50)
[30803.667747]  r8:c0438464 r7:00000003 r6:00000000 r5:00000000 r4:c05d2e98
[30803.667780] [<c001780c>] (clk_enable+0x0/0x50) from [<c0017260>] (mx5_suspend_enter+0x1c/0x98)
[30803.667792]  r4:00000003 r3:c060dfe0
[30803.667821] [<c0017244>] (mx5_suspend_enter+0x0/0x98) from [<c0059b48>] (suspend_enter+0xec/0x15c)
[30803.667833]  r4:00000003 r3:c0017244
[30803.667856] [<c0059a5c>] (suspend_enter+0x0/0x15c) from [<c0059c4c>] (suspend_devices_and_enter+0x94/0x130)
[30803.667868]  r6:00000000 r5:00000003 r4:c0c0af00 r3:00002710
[30803.667897] [<c0059bb8>] (suspend_devices_and_enter+0x0/0x130) from [<c0059db0>] (enter_state+0xc8/0x130)
[30803.667909]  r6:00000000 r5:00000003 r4:c05286e4
[30803.667934] [<c0059ce8>] (enter_state+0x0/0x130) from [<c00592d4>] (state_store+0xac/0xc0)
[30803.667945]  r6:00000003 r5:00000003 r4:df39d000 r3:00000003
[30803.667978] [<c0059228>] (state_store+0x0/0xc0) from [<c01b0100>] (kobj_attr_store+0x1c/0x28)
[30803.668009] [<c01b00e4>] (kobj_attr_store+0x0/0x28) from [<c00e435c>] (sysfs_write_file+0x88/0xbc)
[30803.668032] [<c00e42d4>] (sysfs_write_file+0x0/0xbc) from [<c0091fa0>] (vfs_write+0xbc/0x138)
[30803.668051] [<c0091ee4>] (vfs_write+0x0/0x138) from [<c0092204>] (sys_write+0x44/0x70)
[30803.668062]  r8:00000000 r7:00000004 r6:00000003 r5:002694d0 r4:d966acc0
[30803.668094] [<c00921c0>] (sys_write+0x0/0x70) from [<c000db00>] (ret_fast_syscall+0x0/0x3c)
[30803.668106]  r9:d9648000 r8:c000dcc4 r6:00000001 r5:002694d0 r4:00000003
[30803.669927] PM: early resume of devices complete after 0.972 msecs

Just move the clk_enable/disable in ->prepare() and ->finish()

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2011-10-08 21:43:06 +02:00
..
board-cpuimx51.c ARM: mx5: board-cpuimx51.c fixup irq_to_gpio() usage 2011-08-08 08:24:16 +02:00
board-cpuimx51sd.c gpio/mxc: Change gpio-mxc into an upstanding gpio driver 2011-06-06 10:01:19 -06:00
board-mx50_rdp.c gpio/mxc: Change gpio-mxc into an upstanding gpio driver 2011-06-06 10:01:19 -06:00
board-mx51_3ds.c Merge branch 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-25 12:38:42 -07:00
board-mx51_babbage.c Merge commit 'v3.1-rc1' into imx-fixes 2011-08-08 08:22:41 +02:00
board-mx51_efikamx.c Merge commit 'v3.1-rc1' into imx-fixes 2011-08-08 08:22:41 +02:00
board-mx51_efikasb.c Merge commit 'v3.1-rc1' into imx-fixes 2011-08-08 08:22:41 +02:00
board-mx53_ard.c ARM: mach-mx5/mx53_ard: Add gpio_keys support 2011-07-07 10:01:14 +02:00
board-mx53_evk.c ARM: mx5/mx53_evk: Add support for LED 2011-07-07 10:01:06 +02:00
board-mx53_loco.c mmc: sdhci-esdhc-imx: extend card_detect and write_protect support for mx5 2011-07-27 09:31:14 +08:00
board-mx53_smd.c gpio/mxc: Change gpio-mxc into an upstanding gpio driver 2011-06-06 10:01:19 -06:00
clock-mx51-mx53.c Merge commit 'v3.1-rc1' into imx-fixes 2011-08-08 08:22:41 +02:00
cpu_op-mx51.c cpufreq for freescale mx51 2010-10-22 08:24:14 +02:00
cpu_op-mx51.h cpufreq for freescale mx51 2010-10-22 08:24:14 +02:00
cpu.c ARM: mx53: Print silicon revision on boot 2011-05-19 13:11:00 +02:00
crm_regs.h ARM: mx53: Add support for missing UARTs 2011-07-07 10:01:12 +02:00
devices-imx50.h ARM: imx: clean up the section marks of extern data 2011-05-19 13:11:11 +02:00
devices-imx51.h ARM: mx51: Remove imx51_add_gpio_keys 2011-05-19 13:11:25 +02:00
devices-imx53.h ARM: mx53: Add keypad support 2011-07-07 10:01:13 +02:00
devices.c gpio/mxc: Change gpio-mxc into an upstanding gpio driver 2011-06-06 10:01:19 -06:00
devices.h ARM: mx5: dynamically allocate imx-keypad devices 2011-01-12 14:50:45 +01:00
efika.h efikamx: add usb h1 support 2011-02-18 10:56:38 +01:00
ehci.c ARM i.MX ehci: factor out soc specific functions 2011-02-11 08:34:17 +01:00
eukrea_mbimx51-baseboard.c ARM i.MX: get rid of wrong MXC_INTERNAL_IRQ usage 2011-07-07 10:00:00 +02:00
eukrea_mbimxsd-baseboard.c ARM: mx5: convert to new leds-gpio registration helper 2011-07-07 09:59:57 +02:00
Kconfig ARM: mach-mx5/mx53_ard: Add gpio_keys support 2011-07-07 10:01:14 +02:00
Makefile ARM: mx51: Add support for low power suspend on MX51 2011-07-07 10:01:10 +02:00
Makefile.boot ARM i.MX53: Make MX53 EVK bootable 2011-01-04 12:00:23 +01:00
mm-mx50.c gpio/mxc: get rid of the uses of cpu_is_mx() 2011-07-08 12:38:12 -06:00
mm.c dmaengine: imx-sdma: use platform_device_id to identify sdma version 2011-07-27 09:31:45 +08:00
mx51_efika.c Merge commit 'v3.1-rc1' into imx-fixes 2011-08-08 08:22:41 +02:00
pm-imx5.c ARM: mx5: fix clock usage for suspend 2011-10-08 21:43:06 +02:00
system.c ARM: mx51: Implement code to allow mx51 to enter WFI 2011-03-23 15:08:15 +01:00