From patchwork Mon May 14 08:55:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10397547 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 B8C93600D0 for ; Mon, 14 May 2018 08:58:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2823A28876 for ; Mon, 14 May 2018 08:58:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BDEB28913; Mon, 14 May 2018 08:58:24 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A253028876 for ; Mon, 14 May 2018 08:58:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268AbeENI4y (ORCPT ); Mon, 14 May 2018 04:56:54 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:44824 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752245AbeENI4v (ORCPT ); Mon, 14 May 2018 04:56:51 -0400 Received: by mail-pf0-f195.google.com with SMTP id q22-v6so5687779pff.11 for ; Mon, 14 May 2018 01:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Eel7Cy1vzjSfGnvDW7hlCZjLq+FDPDHooRhbIXHnQjA=; b=T1bQBNI3qh7v/08aIXQZItbjVSsI4O/VAnj/GGeXw5A8C0iWI15KOjDIcmN1EkUPCy U6Z02C3QxtMZAAedhY8YQYPaPTrffMqPV6mhiwncXgZfLcsdY3gaVPOf3UX+B5wGzi6j 328r6o0s3pXMjhPYXOGpUP6kfUZ5s6nm47MEY= 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:in-reply-to :references:in-reply-to:references; bh=Eel7Cy1vzjSfGnvDW7hlCZjLq+FDPDHooRhbIXHnQjA=; b=KVqCLpiMk0GsEidcfopXNZ3mmJIgImeBIPcJQIyxH0lu5yQuET1kTOBTjgXz2IYE3I thZnRNl/m32BjPl4XGlg7X0e0SMNX0yrE3KE2f7U074hX/0uLPulGT6v305p+RQ0CCbO 1tQR2ACIApK65vOp5o80BQqU4Yqy+AxgSWsg/Y+vUqI4holI0/+2Z/sgZZvv9WSupjlm 8QECbqdMbgbSsbhvUg8CSeU5Y34r7Id5x3HKa1xiwlwR2NuUXNVhv9xHJNlbzqMnkYKm quFAsDkGNjslqFFiF6wM3bHAN4Xd9wHLcMZgaVwixG4iN3+XJ+/gMkwxYcG8X6PZpu8l NWlQ== X-Gm-Message-State: ALKqPwfvzIVmm64w8q139CKAUWnUJ/riM65MKMORWlwZEZuyryA3uhS9 rnm6xe/B4zrfBqGW8q8kbrOsjyRVu08= X-Google-Smtp-Source: AB8JxZpdNQik0jChNqY6KcTP2cM/CssVWVYNluBZ6mhnQXBoMPBFg5q1HsTiEbQZ63sbAmdhPie37w== X-Received: by 2002:a62:ac14:: with SMTP id v20-v6mr9654715pfe.101.1526288211529; Mon, 14 May 2018 01:56:51 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id x71-v6sm23308158pfe.47.2018.05.14.01.56.42 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 May 2018 01:56:51 -0700 (PDT) From: Baolin Wang To: tglx@linutronix.de, john.stultz@linaro.org, daniel.lezcano@linaro.org, arnd@arndb.de, tony@atomide.com, aaro.koskinen@iki.fi, linux@armlinux.org.uk, mark.rutland@arm.com, marc.zyngier@arm.com Cc: baolin.wang@linaro.org, broonie@kernel.org, paulmck@linux.vnet.ibm.com, mlichvar@redhat.com, rdunlap@infradead.org, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, pombredanne@nexb.com, thierry.reding@gmail.com, jonathanh@nvidia.com, heiko@sntech.de, linus.walleij@linaro.org, viresh.kumar@linaro.org, mingo@kernel.org, hpa@zytor.com, peterz@infradead.org, douly.fnst@cn.fujitsu.com, len.brown@intel.com, rajvi.jingar@intel.com, alexandre.belloni@bootlin.com, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: [RFC PATCH 05/10] arm: time: Remove the persistent clock support for ARM Date: Mon, 14 May 2018 16:55:31 +0800 Message-Id: <8d74ba31d4d2b14f21bea7a9cbc4f029bc59f60f.1526285602.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We have converted all drivers to use common persistent clock framework to compensate the suspend time, so we can remove the persistent clock, which only supports the ARM architecture. Moreover there are no drivers will register read_boot_clock64(), so remove it too. Signed-off-by: Baolin Wang --- arch/arm/include/asm/mach/time.h | 4 ---- arch/arm/kernel/time.c | 36 ------------------------------------ 2 files changed, 40 deletions(-) diff --git a/arch/arm/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h index 0f79e4d..3cbcafc 100644 --- a/arch/arm/include/asm/mach/time.h +++ b/arch/arm/include/asm/mach/time.h @@ -12,8 +12,4 @@ extern void timer_tick(void); -typedef void (*clock_access_fn)(struct timespec64 *); -extern int register_persistent_clock(clock_access_fn read_boot, - clock_access_fn read_persistent); - #endif diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index cf2701c..713905c 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -76,42 +76,6 @@ void timer_tick(void) } #endif -static void dummy_clock_access(struct timespec64 *ts) -{ - ts->tv_sec = 0; - ts->tv_nsec = 0; -} - -static clock_access_fn __read_persistent_clock = dummy_clock_access; -static clock_access_fn __read_boot_clock = dummy_clock_access; - -void read_persistent_clock64(struct timespec64 *ts) -{ - __read_persistent_clock(ts); -} - -void read_boot_clock64(struct timespec64 *ts) -{ - __read_boot_clock(ts); -} - -int __init register_persistent_clock(clock_access_fn read_boot, - clock_access_fn read_persistent) -{ - /* Only allow the clockaccess functions to be registered once */ - if (__read_persistent_clock == dummy_clock_access && - __read_boot_clock == dummy_clock_access) { - if (read_boot) - __read_boot_clock = read_boot; - if (read_persistent) - __read_persistent_clock = read_persistent; - - return 0; - } - - return -EINVAL; -} - void __init time_init(void) { if (machine_desc->init_time) {