clk: samsung: fix missing spin_lock initialization
authorChanho Park <chanho61.park@samsung.com>
Tue, 12 Aug 2014 01:24:31 +0000 (10:24 +0900)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 03:00:29 +0000 (12:00 +0900)
This patch adds missing spin_lock initialization since applied aca4c144.
It can fix below error during mct_init_dt.

[    0.000000] BUG: spinlock bad magic on CPU#0, swapper/0/0
[    0.000000]  lock: 0xeb0028d0, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.52-03511-g2e14cbe-dirty #30
[    0.000000] [<c00141c4>] (unwind_backtrace+0x0/0xf4) from [<c0011520>] (show_stack+0x10/0x14)
[    0.000000] [<c0011520>] (show_stack+0x10/0x14) from [<c02163e8>] (do_raw_spin_lock+0x154/0x180)
[    0.000000] [<c02163e8>] (do_raw_spin_lock+0x154/0x180) from [<c05f5f44>] (_raw_spin_lock_irqsave+0x20/0x28)
[    0.000000] [<c05f5f44>] (_raw_spin_lock_irqsave+0x20/0x28) from [<c04437c8>] (clk_gate_endisable+0x28/0x88)
[    0.000000] [<c04437c8>] (clk_gate_endisable+0x28/0x88) from [<c044383c>] (clk_gate_enable+0xc/0x14)
[    0.000000] [<c044383c>] (clk_gate_enable+0xc/0x14) from [<c0440b00>] (__clk_enable+0x5c/0x9c)
[    0.000000] [<c0440b00>] (__clk_enable+0x5c/0x9c) from [<c0440dec>] (clk_enable+0x18/0x2c)
[    0.000000] [<c0440dec>] (clk_enable+0x18/0x2c) from [<c083d0d8>] (exynos4_timer_resources+0x154/0x224)
[    0.000000] [<c083d0d8>] (exynos4_timer_resources+0x154/0x224) from [<c083d260>] (mct_init_dt+0x64/0x70)
[    0.000000] [<c083d260>] (mct_init_dt+0x64/0x70) from [<c083cec4>] (clocksource_of_init+0x34/0x58)
[    0.000000] [<c083cec4>] (clocksource_of_init+0x34/0x58) from [<c0826e40>] (exynos_init_time+0x40/0x108)
[    0.000000] [<c0826e40>] (exynos_init_time+0x40/0x108) from [<c0822ed4>] (time_init+0x20/0x30)
[    0.000000] [<c0822ed4>] (time_init+0x20/0x30) from [<c081f954>] (start_kernel+0x1e4/0x3a8)
[    0.000000] [<c081f954>] (start_kernel+0x1e4/0x3a8) from [<40008074>] (0x40008074)

Change-Id: I6271d2a82f0296629a30a2788517658d45ef797c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
drivers/clk/samsung/clk.c

index ae15ba5..295d7a7 100644 (file)
@@ -73,6 +73,7 @@ struct samsung_clk_provider *__init samsung_clk_init(struct device_node *np,
                return NULL;
 
        ctx->reg_base = base;
+       spin_lock_init(&ctx->lock);
 
 #ifdef CONFIG_PM_SLEEP
        if (rdump && nr_rdump) {