summaryrefslogtreecommitdiff
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2016-12-01 14:49:10 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:40:15 +0900
commitcf757a2020a769dac7d391645639217f1ce7957d (patch)
treecd5f468ec44b5e38b534f10f9ad3d387dbd63de5 /drivers/clocksource
parent8576fa45c10e665bb72931a31461c7310f3c5494 (diff)
clocksource: exynos_mct: clear irq at stop local mct to fix suspend
This patch adds clear interrupt to exynos4_mct_tick_stop(). Without clearing, after turning on non boot cpu at wakeup from suspend to ram, not cleared tick interrupt occurs and it causes following null deference for MCT_INT_SPI type mct. Unable to handle kernel NULL pointer dereference at virtual address 00000108 pgd = ffffffc001309000 [00000108] *pgd=00000000c402d003, *pud=00000000c402d003, *pmd=00000000c402e003, *pte=0060000011001707 Internal error: Oops: 96000005 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 12 Comm: ksoftirqd/1 Not tainted 4.1.35-01409-gf0c4b20 #16 Hardware name: Samsung TM2 board (DT) Task: ffffffc0a41dcec0 ti: ffffffc0a4204000 task.ti: ffffffc0a4204000 PC is at tick_periodic+0x38/0xc4 LR is at tick_periodic+0x28/0xc4 pc : [<ffffffc000108234>] lr : [<ffffffc000108224>] pstate: 800000c5 sp : ffffffc0a4207b60 x29: ffffffc0a4207b60 x28: ffffffc000eab000 x27: ffffffc000eab000 x26: ffffffc001249f10 x25: ffffffc0a4005a00 x24: ffffffc00124a000 x23: ffffffc00124a000 x22: 0000000000000001 x21: 0000000000000000 x20: ffffffc0bf5c64c0 x19: 0000010a2ad67b00 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0ffffffffffffffe x13: 0000000000000020 x12: 0000000000000001 x11: 7f7f7f7f7f7f7f7f x10: fefefeff534f484f x9 : ffffffc0a4207cc0 x8 : ffffffc0a41dd430 x7 : 0000000000000008 x6 : ffffff8000048440 x5 : 0000000000005dc0 x4 : 0000000000000100 x3 : ffffffc0a4204000 x2 : ffffffc0a4207b20 x1 : 00000000be51f000 x0 : 0000000000000000 Process ksoftirqd/1 (pid: 12, stack limit = 0xffffffc0a4204020) Stack: (0xffffffc0a4207b60 to 0xffffffc0a4208000) 7b60: a4207b80 ffffffc0 001084ac ffffffc0 2ad67b00 0000010a bf5c64c0 ffffffc0 7b80: a4207bb0 ffffffc0 0073d084 ffffffc0 bf5c64c0 ffffffc0 00000003 00000000 7ba0: 00000000 00000000 00000000 00000000 a4207bd0 ffffffc0 000e9fe0 ffffffc0 7bc0: a40ddc00 ffffffc0 000d49e8 ffffffc0 a4207c40 ffffffc0 000ea254 ffffffc0 7be0: a4005a00 ffffffc0 a4005a98 ffffffc0 01120460 ffffffc0 00ea7008 ffffffc0 7c00: 00f52630 ffffffc0 00f72648 ffffffc0 00000100 00000000 010ba000 ffffffc0 7c20: 010a1000 ffffffc0 00ea7008 ffffffc0 00eabdc0 ffffffc0 00eabda8 ffffffc0 7c40: a4207c80 ffffffc0 000ecf90 ffffffc0 a4005a00 ffffffc0 a4005a98 ffffffc0 7c60: 01120460 ffffffc0 00ea7008 ffffffc0 a4207c80 ffffffc0 a40ddc00 ffffffc0 7c80: a4207cb0 ffffffc0 000ec92c ffffffc0 00000003 00000000 0127a6a0 ffffffc0 7ca0: 010da348 ffffffc0 010a1a98 ffffffc0 a4207ce0 ffffffc0 0009fa90 ffffffc0 7cc0: 010da390 ffffffc0 010da398 ffffffc0 00000000 00000000 0009fa58 ffffffc0 7ce0: a4207d20 ffffffc0 0009edfc ffffffc0 00000006 00000000 00000007 00000000 7d00: 0124a300 ffffffc0 010ba130 ffffffc0 00000006 00000000 00000040 00000000 7d20: a4207da0 ffffffc0 0009f10c ffffffc0 a4204000 ffffffc0 a4119d00 ffffffc0 7d40: 00000001 00000000 010d1ce0 ffffffc0 00000001 00000000 00000002 00000000 7d60: 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7d80: 0001495e 00000001 00ea75a8 ffffffc0 04208040 0000000a 010a1b38 ffffffc0 7da0: a4207db0 ffffffc0 000bb520 ffffffc0 a4207e00 ffffffc0 000b7d34 ffffffc0 7dc0: a4119d40 ffffffc0 01257658 ffffffc0 00ea7010 ffffffc0 a4119d00 ffffffc0 7de0: 000bb304 ffffffc0 00000000 00000000 00000000 00000000 a4119d00 ffffffc0 7e00: 00000000 00000000 00085d80 ffffffc0 000b7c58 ffffffc0 a4119d40 ffffffc0 7e20: 00000000 00000000 00000000 00000000 00000000 00000000 00a810b4 ffffffc0 7e40: a4207e50 ffffffc0 00000001 00000000 00000001 ffffffc0 a4119d00 ffffffc0 7e60: 00000000 ffffffc0 01f501f5 dead4ead ffffffff 00000000 ffffffff ffffffff 7e80: a4207e80 ffffffc0 a4207e80 ffffffc0 00000000 00000000 00000000 dead4ead 7ea0: ffffffff ffffffc0 ffffffff ffffffff a4207eb0 ffffffc0 a4207eb0 ffffffc0 7ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7f20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7fa0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7fc0: 00000000 00000000 00000005 00000000 00000000 00000000 00000000 00000000 7fe0: 00000000 00000000 00000000 00000000 ffffffff ffffffff ffffffff ffffffff Call trace: [<ffffffc000108234>] tick_periodic+0x38/0xc4 [<ffffffc0001084ac>] tick_handle_periodic+0x24/0x78 [<ffffffc00073d084>] exynos4_mct_tick_isr+0x54/0x64 [<ffffffc0000e9fe0>] handle_irq_event_percpu+0x6c/0x294 [<ffffffc0000ea254>] handle_irq_event+0x4c/0x78 [<ffffffc0000ecf90>] handle_fasteoi_irq+0xe4/0x1a4 [<ffffffc0000ec92c>] resend_irqs+0x54/0x8c [<ffffffc00009fa90>] tasklet_action+0xa4/0x170 [<ffffffc00009edfc>] __do_softirq+0xcc/0x3a8 [<ffffffc00009f10c>] run_ksoftirqd+0x34/0x48 [<ffffffc0000bb520>] smpboot_thread_fn+0x21c/0x2b4 [<ffffffc0000b7d34>] kthread+0xdc/0xf0 Code: b0007ce0 d538d081 913c6000 f8606820 (f9408400) ---[ end trace 7232a23031ea6a74 ]--- Change-Id: I20b7d867d9894df1c81a30e91bca0233cf3b173e Fixes: 56a94f13919c ("clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier") Cc: stable@vger.kernel.org #v4.2+ #v4.1.4+ #3.18.18+ #v3.16.18+ #v3.12.46+ Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Adjust commit-msg] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/exynos_mct.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index c844616028d2..c6935558f7e7 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -485,8 +485,15 @@ static void exynos4_local_timer_stop(struct clock_event_device *evt)
{
evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt);
if (mct_int_type == MCT_INT_SPI) {
- if (evt->irq != -1)
+ if (evt->irq != -1) {
+ struct mct_clock_event_device *mevt =
+ container_of(evt, struct mct_clock_event_device,
+ evt);
+
disable_irq_nosync(evt->irq);
+ exynos4_mct_write(0x1, mevt->base +
+ MCT_L_INT_CSTAT_OFFSET);
+ }
} else {
disable_percpu_irq(mct_irqs[MCT_L0_IRQ]);
}