linux/arch/arm
Anson Huang 6e6cdf6656 ARM: imx: avoid calling clk APIs in idle thread which may cause schedule
As clk_pllv3_wait_lock will call usleep_range, and the clk APIs
mutex lock may be held when CPU entering idle, so calling clk
APIs must be avoided in cpu idle thread, this is to avoid reschedule
warning in cpu idle, just access register directly to achieve that.

bad: scheduling from the idle thread!
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.0-rc1+ #657
Backtrace:
[<80012188>] (dump_backtrace) from [<8001246c>] (show_stack+0x18/0x1c)
 r6:808c0038 r5:00000000 r4:808e5a1c r3:00000000
[<80012454>] (show_stack) from [<8064b2ec>] (dump_stack+0x84/0x9c)
[<8064b268>] (dump_stack) from [<80055ee0>] (dequeue_task_idle+0x20/0x30)
 r5:808bef40 r4:bf7dff40
[<80055ec0>] (dequeue_task_idle) from [<8004f028>] (dequeue_task+0x30/0x50)
 r4:bf7dff40 r3:80055ec0
[<8004eff8>] (dequeue_task) from [<800503c0>] (deactivate_task+0x30/0x34)
 r4:bf7dff40
[<80050390>] (deactivate_task) from [<8064d8e4>] (__schedule+0x2c8/0x5c0)
[<8064d61c>] (__schedule) from [<8064dc14>] (schedule+0x38/0x88)
 r10:80912964 r9:808c1e50 r8:808c0038 r7:808cbf30 r6:80e128ec r5:60000093
 r4:80912968
[<8064dbdc>] (schedule) from [<8064dfec>] (schedule_preempt_disabled+0x10/0x14)
[<8064dfdc>] (schedule_preempt_disabled) from [<8064ebc0>] (mutex_lock_nested+0x1c0/0x3c0)
[<8064ea00>] (mutex_lock_nested) from [<804ae71c>] (clk_prepare_lock+0x44/0xe4)
 r10:806554cc r9:bf7df1bc r8:808cf4f8 r7:808cf544 r6:bf7df1b8 r5:808c0010
 r4:80e69750
[<804ae6d8>] (clk_prepare_lock) from [<804af214>] (clk_get_rate+0x14/0x64)
 r6:bf7df1b8 r5:00000002 r4:bf017000 r3:80922ad0
[<804af200>] (clk_get_rate) from [<80025d30>] (imx6sl_set_wait_clk+0x18/0x20)
 r5:00000002 r4:00000001
[<80025d18>] (imx6sl_set_wait_clk) from [<80023454>] (imx6sl_enter_wait+0x20/0x48)
[<80023434>] (imx6sl_enter_wait) from [<80477c24>] (cpuidle_enter_state+0x44/0xfc)
 r4:3c386e48 r3:80023434
[<80477be0>] (cpuidle_enter_state) from [<80477dd8>] (cpuidle_idle_call+0xfc/0x160)
 r8:808cf4f8 r7:00000001 r6:80e69534 r5:00000000 r4:bf7df1b8
[<80477cdc>] (cpuidle_idle_call) from [<8000f61c>] (arch_cpu_idle+0x10/0x50)
 r9:808c0000 r8:00000000 r7:80921a89 r6:808c8938 r5:808c899c r4:808c0000
[<8000f60c>] (arch_cpu_idle) from [<8006fa94>] (cpu_startup_entry+0x108/0x160)
[<8006f98c>] (cpu_startup_entry) from [<806452ac>] (rest_init+0xb4/0xdc)
 r7:808afae0
[<806451f8>] (rest_init) from [<8086fb58>] (start_kernel+0x328/0x38c)
 r6:ffffffff r5:808c8880 r4:808c8a30
[<8086f830>] (start_kernel) from [<80008074>] (0x80008074)

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2014-03-05 10:35:21 +08:00
..
boot ARM: SoC fixes for 3.14-rc 2014-02-23 17:38:04 -08:00
common ARM: SoC platform changes for 3.14 2014-01-23 18:40:49 -08:00
configs ARM: imx_v6_v7_defconfig: Select CONFIG_MMC_UNSAFE_RESUME 2014-03-05 10:35:17 +08:00
crypto CRYPTO: Fix more AES build errors 2014-01-05 13:59:56 +00:00
firmware
include ARM: 7957/1: add DSB after icache flush in __flush_icache_all() 2014-02-17 23:09:00 +00:00
kernel ARM: 7952/1: mm: Fix the memblock allocation for LPAE machines 2014-02-10 11:44:12 +00:00
kvm First round of KVM updates for 3.14; PPC parts will come next week. 2014-01-22 21:40:43 -08:00
lib
mach-at91 ARM: SoC platform changes for 3.14 2014-01-23 18:40:49 -08:00
mach-bcm ARM: centralize common multi-platform kconfig options 2014-02-19 16:38:18 -06:00
mach-bcm2835 ARM: bcm2835: enable V6K instead of plain V6 2014-02-19 16:46:57 -06:00
mach-berlin ARM: select HAVE_SMP for V7 multi-platform 2014-02-19 16:43:27 -06:00
mach-clps711x ARM: SoC platform changes for 3.14 2014-01-23 18:40:49 -08:00
mach-cns3xxx ARM: cns3xxx: enable V6K instead of plain V6 2014-02-19 16:47:15 -06:00
mach-davinci ARM: driver updates for 3.14 2014-01-23 18:49:36 -08:00
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
mach-footbridge Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-01-24 17:17:30 -08:00
mach-gemini
mach-highbank ARM: select HAVE_SMP for V7 multi-platform 2014-02-19 16:43:27 -06:00
mach-hisi ARM: select HAVE_SMP for V7 multi-platform 2014-02-19 16:43:27 -06:00
mach-imx ARM: imx: avoid calling clk APIs in idle thread which may cause schedule 2014-03-05 10:35:21 +08:00
mach-integrator ARM: integrator: restore static map on the CP 2014-01-31 14:58:52 -08:00
mach-iop13xx
mach-iop32x ARM: iop32x: fix power off handling for the EM7210 board 2014-01-31 14:58:53 -08:00
mach-iop33x
mach-ixp4xx ARM: SoC platform changes for 3.14 2014-01-23 18:40:49 -08:00
mach-keystone ARM: select HAVE_SMP for V7 multi-platform 2014-02-19 16:43:27 -06:00
mach-kirkwood mvebu fixes for v3.13 (incremental #2) 2014-01-31 14:59:28 -08:00
mach-ks8695
mach-lpc32xx
mach-mmp ARM: SoC platform changes for 3.14 2014-01-23 18:40:49 -08:00
mach-moxart ARM: centralize common multi-platform kconfig options 2014-02-19 16:38:18 -06:00
mach-msm ARM: driver updates for 3.14 2014-01-23 18:49:36 -08:00
mach-mv78xx0
mach-mvebu ARM: select HAVE_SMP for V7 multi-platform 2014-02-19 16:43:27 -06:00
mach-mxs ARM: centralize common multi-platform kconfig options 2014-02-19 16:38:18 -06:00
mach-netx
mach-nomadik ARM: centralize common multi-platform kconfig options 2014-02-19 16:38:18 -06:00
mach-nspire ARM: centralize common multi-platform kconfig options 2014-02-19 16:38:18 -06:00
mach-omap1 ARM: OMAP1: nokia770: enable tahvo-usb 2014-02-13 15:20:14 -08:00
mach-omap2 - Remove common kconfig options required by multi-platform builds out 2014-03-05 10:31:54 +08:00
mach-orion5x
mach-picoxcell ARM: Select V6K instead of V6 by default for multi-platform 2014-02-19 16:46:32 -06:00
mach-prima2 ARM: select MIGHT_HAVE_CACHE_L2X0 for V6 and V7 multi-platform 2014-02-19 16:44:00 -06:00
mach-pxa Merge tag 'pwm_pxa_for_v3.14' of https://git.kernel.org/pub/scm/linux/kernel/git/hzhuang1/linux into fixes 2014-02-18 15:32:21 -08:00
mach-realview
mach-rockchip ARM: select HAVE_SMP for V7 multi-platform 2014-02-19 16:43:27 -06:00
mach-rpc
mach-s3c24xx ARM: SoC cleanups for 3.14 2014-01-23 18:36:55 -08:00
mach-s3c64xx ARM: SoC cleanups for 3.14 2014-01-23 18:36:55 -08:00
mach-s5p64x0
mach-s5pc100
mach-s5pv210
mach-sa1100 ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
mach-shmobile ARM: select MIGHT_HAVE_CACHE_L2X0 for V6 and V7 multi-platform 2014-02-19 16:44:00 -06:00
mach-socfpga ARM: select HAVE_SMP for V7 multi-platform 2014-02-19 16:43:27 -06:00
mach-spear ARM: select MIGHT_HAVE_CACHE_L2X0 for V6 and V7 multi-platform 2014-02-19 16:44:00 -06:00
mach-sti ARM: select MIGHT_HAVE_CACHE_L2X0 for V6 and V7 multi-platform 2014-02-19 16:44:00 -06:00
mach-sunxi ARM: select HAVE_SMP for V7 multi-platform 2014-02-19 16:43:27 -06:00
mach-tegra - Remove common kconfig options required by multi-platform builds out 2014-03-05 10:31:54 +08:00
mach-u300 ARM: centralize common multi-platform kconfig options 2014-02-19 16:38:18 -06:00
mach-ux500 ARM: select MIGHT_HAVE_CACHE_L2X0 for V6 and V7 multi-platform 2014-02-19 16:44:00 -06:00
mach-versatile
mach-vexpress ARM: select MIGHT_HAVE_CACHE_L2X0 for V6 and V7 multi-platform 2014-02-19 16:44:00 -06:00
mach-vt8500 ARM: vt8500: enable V6K instead of plain V6 2014-02-19 16:47:16 -06:00
mach-w90x900
mach-zynq ARM: select MIGHT_HAVE_CACHE_L2X0 for V6 and V7 multi-platform 2014-02-19 16:44:00 -06:00
mm Merge branch 'fixes-for-v3.14' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2014-02-20 11:58:56 -08:00
net bpf: do not use reciprocal divide 2014-01-15 17:02:08 -08:00
nwfpe
oprofile
plat-iop
plat-omap
plat-orion mvebu fixes for v3.13 (incremental #2) 2014-01-31 14:59:28 -08:00
plat-pxa
plat-samsung MTD updates for 3.14: 2014-01-28 18:56:37 -08:00
plat-versatile ARM: SoC platform changes for 3.14 2014-01-23 18:40:49 -08:00
tools
vfp
xen xen/gnttab: Use phys_addr_t to describe the grant frame base address 2014-01-30 12:56:34 +00:00
Kconfig ARM: virt: select ARM_AMBA 2014-02-19 16:47:46 -06:00
Kconfig-nommu
Kconfig.debug ARM: SoC platform changes for 3.14 2014-01-23 18:40:49 -08:00
Makefile ARM: virt: make mach-virt just a kconfig option 2014-02-19 16:47:16 -06:00