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: 10397589 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 F35AC600D0 for ; Mon, 14 May 2018 09:04:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2579290A3 for ; Mon, 14 May 2018 09:04:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D559E290CA; Mon, 14 May 2018 09:04:09 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 F2304290A3 for ; Mon, 14 May 2018 09:04:08 +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:References: In-Reply-To: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:List-Owner; bh=Olj5EYwHGv2mffAw0yh+pwVMkrOmR+yg4T8N6YdIdsI=; b=lCAVAk5NIV9t4o/h3IsEpp2sf2 EdXxcQVeDS40Y01IihbyI3cGMPdBkRjKAav3gq176hKSdgKOJ2BG/XD9JwBVAD7aGMl+BJE1qs7bt 8+6DRO9ajEaJNPo4MLyxw6eslMMR3LwPlCNgLLd98TMH49TwLXAcvC/7rhw0+s7RT1DE+dzIqVro6 sG0CM+KVFM8IJFQsPFZ6wPK9t7APFfOPPz1FVICHSzxE1k501HOIqVbSpkXrXGuIbKVpUtedrV5kU B3hko9iyEe32gUVf/GIbiGsEOM4xNG4OIk2tcuS02yEsM5Qt02mjYcXhF/7GAIYtNMlQs4Dhg2aYK OINyki6Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fI9Og-0001Az-TB; Mon, 14 May 2018 09:03:58 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fI9Hy-0003Au-Mq for linux-arm-kernel@lists.infradead.org; Mon, 14 May 2018 08:57:05 +0000 Received: by mail-pf0-x241.google.com with SMTP id q22-v6so5687780pff.11 for ; Mon, 14 May 2018 01:56:52 -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=FwmVAOuyhFo/NNctcIRKPZnFt7inYhn5n6y0RgTCxoN/DNza68fmvSQYn/gwDc1iea 8VRQMi+IH/3ATZgo69BFCkkgiIuB770nCuDbqlQxW+7uC+cMFIcrJTZwwgMVRvPIIjQ/ i0sSvBfYQtbPcKh/qKJhdVaDzu4zX09CqJzcMVyxOx7/NCvbtQ5mPPfCTk6aG+4HXnx4 G/omwMDnQtDwzneL3pDp+hA79YnVKlYFd/kmc5p3n9QnjNu4DHXayxfnFdMEnSWlGojO 8u0gQL6k7uvdsu9SxCbWWLT2sl5Pg+jLc8FdiZ4QtRCKpKn7zn/2xAdwmtzN7STC1+M6 qxKQ== X-Gm-Message-State: ALKqPweQZSIiL+/ePk2RYPtp5QR8DG9dppNsmhJV9L9g897BePlyR8xH JIlhDgBGkVRcUzhKGZ2NDrKeUQ== 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 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180514_015702_753287_0D50FE3F X-CRM114-Status: GOOD ( 12.17 ) 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: kstewart@linuxfoundation.org, alexandre.belloni@bootlin.com, heiko@sntech.de, peterz@infradead.org, viresh.kumar@linaro.org, linus.walleij@linaro.org, linux-kernel@vger.kernel.org, thierry.reding@gmail.com, hpa@zytor.com, mingo@kernel.org, x86@kernel.org, jonathanh@nvidia.com, paulmck@linux.vnet.ibm.com, len.brown@intel.com, mlichvar@redhat.com, broonie@kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, douly.fnst@cn.fujitsu.com, baolin.wang@linaro.org, gregkh@linuxfoundation.org, rdunlap@infradead.org, rajvi.jingar@intel.com, pombredanne@nexb.com 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 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) {