Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755337AbbHJKAk (ORCPT ); Mon, 10 Aug 2015 06:00:40 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:37822 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933378AbbHJJys (ORCPT ); Mon, 10 Aug 2015 05:54:48 -0400 From: Daniel Lezcano To: mingo@kernel.org Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, Viresh Kumar , Geert Uytterhoeven Subject: [PATCH 57/74] clocksource/drivers/sh_tmu: Fix traceback spotted in -next Date: Mon, 10 Aug 2015 11:52:14 +0200 Message-Id: <1439200352-26767-57-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439200352-26767-1-git-send-email-daniel.lezcano@linaro.org> References: <55C87382.4070309@linaro.org> <1439200352-26767-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2578 Lines: 72 From: Viresh Kumar Traceback in -next due to commit 'clockevents/drivers/sh_tmu: Migrate to new 'set-state' interface'. Commit ("clockevents/drivers/sh_tmu: Migrate to new 'set-state' interface") in -next causes the following traceback. This is seen with qemu runs for the sh target. ------------[ cut here ]------------ WARNING: at drivers/clocksource/sh_tmu.c:202 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 4.2.0-rc3-next-20150720 #1 task: 8c411ed8 ti: 8c40e000 task.ti: 8c40e000 PC is at sh_tmu_disable+0x40/0x60 PR is at sh_tmu_clock_event_shutdown+0x8/0x20 PC : 8c271220 SP : 8c40ff10 SR : 400081f1 TEA : 00000000 R0 : 8c271240 R1 : 8fc08cfc R2 : 00000000 R3 : 3fffffff R4 : 8fc08c00 R5 : 00000001 R6 : 00000002 R7 : ffffffff R8 : 00000001 R9 : 8fc08c20 R10 : 00000000 R11 : 00000000 R12 : 8c012820 R13 : 00000000 R14 : 00000000 MACH: 3b9ac9ff MACL: 80000000 GBR : 00000000 PR : 8c271248 Call trace: [<8c065836>] clockevents_switch_state+0x16/0x60 [<8c06588c>] clockevents_shutdown+0xc/0x40 [<8c066330>] tick_check_new_device+0x90/0xc0 [<8c065556>] clockevents_register_device+0x56/0x120 [<8c0662a0>] tick_check_new_device+0x0/0xc0 [<8c27167a>] sh_tmu_probe+0x29a/0x4e0 [<8c18a994>] kasprintf+0x14/0x20 [<8c442782>] early_platform_driver_probe+0x20e/0x2bc [<8c1fade0>] platform_match+0x0/0x100 [<8c33babc>] printk+0x0/0x24 [<8c434892>] start_kernel+0x32e/0x574 [<8c33babc>] printk+0x0/0x24 [<8c17d320>] strlen+0x0/0x58 [<8c43430c>] unknown_bootoption+0x0/0x1e0 [<8c011024>] _stext+0x24/0x30 ---[ end trace cb88537fdc8fa200 ]--- Signed-off-by: Viresh Kumar Signed-off-by: Daniel Lezcano Tested-by: Geert Uytterhoeven --- drivers/clocksource/sh_tmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 43c9814..469e776 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c @@ -362,7 +362,8 @@ static int sh_tmu_clock_event_shutdown(struct clock_event_device *ced) { struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); - sh_tmu_disable(ch); + if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced)) + sh_tmu_disable(ch); return 0; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/