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: 135693 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1484098lji; Mon, 14 May 2018 01:56:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpuWLWuyt2UjZbxPO96SLpw1pL1LmAIUDfMm/w4uXHdj6Ibs1kQrHfw1GzSIheRWe4doafO X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr8823305plb.211.1526288217077; Mon, 14 May 2018 01:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526288217; cv=none; d=google.com; s=arc-20160816; b=MBJr1JKvtOP9IUg7TLhTZwIRzvuE8+wpbcU42KDsQPtU06TEp7UkIrai1rpjw5BEyA O+6/JkTVxl/Keza1XjHj9asAaRYwTSY7JwFbWLJuKQknJlEUI8J4ElK3sfxUtAMJORIX gy3dK5ms2lmkAqnuGUDKxDeaJAf+QG4pbNtJzX23pxYAjjrkj6bNl2E9ef4de722Uxxm t3KJqwd+ix0fTkPYB2iG3M1lvHXky99JJsSuqp/u7RnOP8boB0yyDg+xHg0E6++egiCk ewrY7AZLs7TzEIse+H5NI4WgaubGSwbH9GbUVNUiPu/rnWsNR3LK6+MT2lCpp6oMhBD9 H/HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Eel7Cy1vzjSfGnvDW7hlCZjLq+FDPDHooRhbIXHnQjA=; b=zNP00WkZwenkW8YLugVluAzECw4iEug0zB6bc7LPvqKOyHUoYTY6/A55+Fyk5CuroU Z6D0bf4I1uAhIR2pIv1p61SnjkeCxkVhTeVUVGWmKuBtebB6rHZ7cisRRu9TYekZbc95 Tr63KzMenCYfbOPmHkD07qJrEX4VKOM/HddePJ8oHWzjYwi3uAl8K/cKwFMeVNbOOW9h fS+EcgyqyPAPIxyrSRaRZbjdcd8X1o7QdDm0B3tKV7e/Z0SNPGAg1PeKQQpFU8Yul11G n78ohpHOpeLTV9J7Sr6BUO4a2ur9BUODz0ESUi+hkLQNGJxhMnZGfSIm53XSCFKHR7Fi vTDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T1bQBNI3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si5083231plh.34.2018.05.14.01.56.56; Mon, 14 May 2018 01:56:57 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T1bQBNI3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752286AbeENI4y (ORCPT + 29 others); Mon, 14 May 2018 04:56:54 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34168 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752250AbeENI4w (ORCPT ); Mon, 14 May 2018 04:56:52 -0400 Received: by mail-pf0-f195.google.com with SMTP id a14-v6so5693921pfi.1 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=qoHbfkW5DVcB0MepKEbVRHKjwoXkZl51NgPCi5c4JB9U5asj1gi0PhwZEe+252WscC 9xC+Rb48ofuUqfwVnTch+a/PiZGgjPBunCzI4Tjg6RQMsDzw1wPAjeZKo8/fD/seaamJ Cle4RCEu0c8iqF7an1NOUNPX4dFmMtJPt1rUw9k89HzEhT0hntWGcNiSm5MuPnKpxmpl 313LUZ+e/FKmnSiEo0Zijr6t8ki3PyZmV3yfkBbYBUxoI0zcN12Zy+WLm4UI0NXJmMfS qfF+3JKv/K3oLgh0ZYO8InX0m609MDfju0Gz7NvJBDvaTOP1SMQkT+PnZO7eF1a1NKYE qokA== X-Gm-Message-State: ALKqPwe7dx5nP3r2fmqxU+0/PydAf71oO0s2t08PfB8jOF0OT2Bs38Yc P3/9Ru4drT145k43tj/ngRcOqw== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 1.7.9.5 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) {