From patchwork Mon Aug 10 09:52:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 52183 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id E8B932152A for ; Mon, 10 Aug 2015 10:00:57 +0000 (UTC) Received: by lbcje9 with SMTP id je9sf5631844lbc.3 for ; Mon, 10 Aug 2015 03:00:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=/DDqvfeX4VWGnRvRlh769H3qFztGg3HvTQ7gM8b+/4E=; b=Hr06Lk8bX7aq3eEbyWGexzqmoKzwMnLvimOhzTMfFjnwzBdTRyTBqJdBECvWQQlMPN 85TcXA93aAdekv72Z2XArs7l0SMX5j0TlsEQ6c84drtD0dY8dt796JFwg5C/kZPuIANQ NlOOzahvjSiQqAPgp0lSlOCfvaWLJ4YzNnSPdl2KYJXvzsHBudvSvJqc+O6ApVs2m80j xwaOe3QD8b6pdZLyUy6G/pZ+mgfpoRuLTPjQ/grHLbdztvw8rrkkisqft0SL71LLcRCB yyxU9eAFzrJrtpuCo3imhhzmqMS9Yjg7AzgbWMqvB8z5EJV6Phn52sf6iKR+TjVVacsC Z6bw== X-Gm-Message-State: ALoCoQlk4DAk5/zfXrqULfYOFIXCQt5Hhk5Hw1PY6cjPIGEM7HzN6lFOj2EdB+JRo5KvVPVJ3nKc X-Received: by 10.113.3.8 with SMTP id bs8mr6130945lbd.23.1439200856953; Mon, 10 Aug 2015 03:00:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.105 with SMTP id i9ls684853laa.72.gmail; Mon, 10 Aug 2015 03:00:56 -0700 (PDT) X-Received: by 10.152.8.130 with SMTP id r2mr19427933laa.17.1439200856632; Mon, 10 Aug 2015 03:00:56 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id r1si13788524lar.2.2015.08.10.03.00.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 03:00:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbpu9 with SMTP id pu9so64619145lbb.3 for ; Mon, 10 Aug 2015 03:00:56 -0700 (PDT) X-Received: by 10.152.170.230 with SMTP id ap6mr2899245lac.73.1439200856359; Mon, 10 Aug 2015 03:00:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1830390lba; Mon, 10 Aug 2015 03:00:55 -0700 (PDT) X-Received: by 10.68.103.5 with SMTP id fs5mr43320244pbb.55.1439200854419; Mon, 10 Aug 2015 03:00:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si4808536pdm.52.2015.08.10.03.00.53; Mon, 10 Aug 2015 03:00:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755338AbbHJKAk (ORCPT + 28 others); 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 Received: by wibhh20 with SMTP id hh20so142961888wib.0 for ; Mon, 10 Aug 2015 02:54:46 -0700 (PDT) X-Received: by 10.180.184.168 with SMTP id ev8mr23480933wic.28.1439200486883; Mon, 10 Aug 2015 02:54:46 -0700 (PDT) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id jr5sm28598154wjc.14.2015.08.10.02.54.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Aug 2015 02:54:46 -0700 (PDT) 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 Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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; }