From patchwork Thu Mar 9 16:58:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Izard X-Patchwork-Id: 9613661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA4C0604D9 for ; Thu, 9 Mar 2017 16:59:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD8BC286B8 for ; Thu, 9 Mar 2017 16:59:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0E3C286BB; Thu, 9 Mar 2017 16:59:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3FADC286B8 for ; Thu, 9 Mar 2017 16:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=5h7vfajaFlUX3ZfFzyfEavDSLIQ9D6hrZNk4koMw+vA=; b=WmR YIM3v9iwPrVHTqWFFuuZRXX1ADPw9kFTsaFLUc72v/0s9+QW0lLfuhBTchrDYXoUCMh+IGZ1gASRd H/wrkRhSplmF2GCzvP98noSEwGfnzxYMhpCSsGF0RJ126B+cSdDKTVe7weQT1xfMCwY/qNP8QL8bK /bTVELD4ljeTtLVWD6jRLgctainTF+pt9apfiBJ0LcPs8i/bnVAeZ/bArXKXl6fQB6enC/47M4tDp DamlWAYyF66wifRE3xprPcAQGz7jUbRiCYeP7R+7tmu01UB5R1wthcCK3zF7+xxqnDvGBd8HR6pca Au4fQWwuEtHHXTE1keH0B3tRiEBZqKQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cm1PF-0004PU-0m; Thu, 09 Mar 2017 16:59:13 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cm1PB-0004O0-3w for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2017 16:59:11 +0000 Received: by mail-wr0-x243.google.com with SMTP id l37so8623044wrc.3 for ; Thu, 09 Mar 2017 08:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hwHaVA4rshsLU86MOUzsIG06ji1nMxyhj9ZJd42rKUQ=; b=f8H8wJUR63zjrDavWN1Uubn0+8odwdGNgWNB2ogkoXq/HY+FGEuxo8zquG4Nw6lueT J98Fw9/+wAn4qadpcTLTQrERpYfZsOcdkrNu9HsWH0num1hEyLulp9Z9HSMajQoc9L8P hFu8jWm4CLzLtX5pet+qgfOYOUUW0oOgcvk0CF4mPx1ZVLzZpG+PSqYljR1bTxOkHjzA zFEcEsWB18g6KdjfYziwjLRHQH61pDR/SUiQiOrFY3s/JxcznkH8so9Dml4jsFpBZDb/ awO+ezrXHzUYMH+CZAhuVN4B4G2Q8vXTnIjOwzUiJzPUVoMJbrpBHkVJIvCBjRbK96Is uUZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hwHaVA4rshsLU86MOUzsIG06ji1nMxyhj9ZJd42rKUQ=; b=I2O+FZICr98a1+520fogwcDVaOyQLgEf3/6kC+sOsQXYGzBylA/kyzv7WoO2ozm1QL XeLfs0SYOzxvqXyFTY+c7G3o8b1E8WAYL77cFqQuyKNnwc9Y9wcwzmqrFqsXxPsBCem3 Je3I9Mk4S9M8PC6wVt3lOctQ/19OFnwfoDz+mBe7+duT5Iyci88i3wrqA6oUg8/D+PHO 9Bcxy6Cc1hqA/qbFPp5+3XfQz8tADzCWXC9hGDtkhlg2PCJAtyvBu2d048UepElaO+fH h6h+96DQVLsqSgmokng8n2ObRD3Iwi2xcky/zutZ1jpCUAczucJEGyHz7U7pJ89aqCgP ROUA== X-Gm-Message-State: AMke39k8FufvLKhiZevKXrpMVSgqmJddiI3uvUfL2I5mxuejK03ha4aI/Zerb/EaGhkIwg== X-Received: by 10.223.153.225 with SMTP id y88mr11265387wrb.81.1489078727274; Thu, 09 Mar 2017 08:58:47 -0800 (PST) Received: from localhost.localdomain (146.187.3.109.rev.sfr.net. [109.3.187.146]) by smtp.gmail.com with ESMTPSA id t103sm8960388wrc.43.2017.03.09.08.58.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2017 08:58:46 -0800 (PST) From: Romain Izard To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Ferre , Daniel Lezcano , Thomas Gleixner Subject: [PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock" Date: Thu, 9 Mar 2017 17:58:38 +0100 Message-Id: <20170309165838.7683-1-romain.izard.pro@gmail.com> X-Mailer: git-send-email 2.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170309_085909_320292_D08A4475 X-CRM114-Status: GOOD ( 13.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Romain Izard , David Engraf MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 7b9f1d16e6d1 ("clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"). In the current state, the kernel warns against a late registration of the new sched_clock, the printk clock resets after only a few minutes, and it seems that scheduling can be affected as well. Signed-off-by: Romain Izard --- drivers/clocksource/tcb_clksrc.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c index 745844ee973e..d4ca9962a759 100644 --- a/drivers/clocksource/tcb_clksrc.c +++ b/drivers/clocksource/tcb_clksrc.c @@ -10,7 +10,6 @@ #include #include #include -#include /* @@ -57,14 +56,9 @@ static u64 tc_get_cycles(struct clocksource *cs) return (upper << 16) | lower; } -static u32 tc_get_cv32(void) -{ - return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV)); -} - static u64 tc_get_cycles32(struct clocksource *cs) { - return tc_get_cv32(); + return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV)); } static struct clocksource clksrc = { @@ -75,11 +69,6 @@ static struct clocksource clksrc = { .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; -static u64 notrace tc_read_sched_clock(void) -{ - return tc_get_cv32(); -} - #ifdef CONFIG_GENERIC_CLOCKEVENTS struct tc_clkevt_device { @@ -350,9 +339,6 @@ static int __init tcb_clksrc_init(void) clksrc.read = tc_get_cycles32; /* setup ony channel 0 */ tcb_setup_single_chan(tc, best_divisor_idx); - - /* register sched_clock on chips with single 32 bit counter */ - sched_clock_register(tc_read_sched_clock, 32, divided_rate); } else { /* tclib will give us three clocks no matter what the * underlying platform supports.