Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1366720pxx; Fri, 30 Oct 2020 08:24:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSUcpPaJCodzCc8Y2rfphh8XzIrQcsKCmjmV7yRK4aEig1ehKt3Xj740SNDGl5eO2mhjWw X-Received: by 2002:a50:fd99:: with SMTP id o25mr2284898edt.6.1604071475049; Fri, 30 Oct 2020 08:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604071475; cv=none; d=google.com; s=arc-20160816; b=qdnCJ1qW/g5SR4atV6x3ZKQXhbSWtp8h1TOiCPQNTahSr2YEWx1C/kzsvjYeQwAaxK L1cWB7wR+G/aQ3/IyDV13UGtLUBmqgk8QIRQaefXUwabFcFnHZOKcw2VRmUWPXwnPtFl 3fJvH3VIBPT06eWXmgmvHaW5sZe8PVzfkEJ2w2OV4XAwpr6c5fOp/++T1UnaAWXJelao 630sNOYl01E9K6ns+Qm8Wa07FpkAaZe/y+r/Nc8IDv1ZY8OfULEh+p9MCYxwigz5NrHM fMp2dq/scdmksFcWvQOUNfEh4f+La0c1WIovFZdBwDRNqUzlezWx+C3mlSxqJ72jYpl8 yGSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6LDD4z9adLvNmuyoOysxavcVhxcEPkr9xdmGTb077n4=; b=eYy3sUbf+LVNfjxdFpB1VhzIuXvwolBzTGNOS8P8bOdHAGSGUw3lVGhMz57HFpA/Or QVdDnR+hgqkRIMQ3QAn7MauPL/G+TXteC0TnHIzpeOjbStr078Qo7EF6LnOFpUbFMsuB fTs7RUrWNKb+ITze4qrDbXeViqPIhPtJGunlVwXQC1vQC3iB540Mq8DK3+Sgh0vUa3CQ kU0rPkvn/0V87Fhgxp0OdL3LMTW7BID/c1mxPADJAYnFQ/5PuW6u9rBR21DB+YRluAHK wjvPbXACO0YCG5QCtJU7L+soIrU1XldICIMJ2eziOVnIntN/kgEBENQYcKXk6B+9zT1O UnSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="FJ/JrVi+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j13si4617256edj.549.2020.10.30.08.24.11; Fri, 30 Oct 2020 08:24:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="FJ/JrVi+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727129AbgJ3PUd (ORCPT + 99 others); Fri, 30 Oct 2020 11:20:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:53058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726995AbgJ3PUB (ORCPT ); Fri, 30 Oct 2020 11:20:01 -0400 Received: from localhost.localdomain (HSI-KBW-46-223-126-90.hsi.kabel-badenwuerttemberg.de [46.223.126.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 287942224E; Fri, 30 Oct 2020 15:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604071164; bh=hpq25w7YsZaBF0F4LlMqvKcXZb1aUi1ae0/gcETtpew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FJ/JrVi+9szrGBEP/LSniEyZGoGchJ7DUxx0tL+H2lDWb99COBF3948HAVcDRbWhR J6WbQ5vp1/KCOEdVHzhQ0F4JzYEeouAipCvFQa3PLXvujOMqOghqY1iT5YM92w4+G+ IccB1XEQqMpWQ51uwGztWCm/UoX0Dawz1b3I+XMU= From: Arnd Bergmann To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Arnd Bergmann , Russell King , Tony Luck , Fenghua Yu , Greg Ungerer , Finn Thain , Philip Blundell , Joshua Thompson , Sam Creasey , "James E.J. Bottomley" , Helge Deller , Daniel Lezcano , John Stultz , Stephen Boyd , Linus Walleij , linux-ia64@vger.kernel.org, Parisc List , linux-m68k , Linux ARM , Geert Uytterhoeven Subject: [PATCH v2 14/15] timekeeping: remove xtime_update Date: Fri, 30 Oct 2020 16:17:57 +0100 Message-Id: <20201030151758.1241164-15-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201030151758.1241164-1-arnd@kernel.org> References: <20201030151758.1241164-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann There are no more users of xtime_update aside from legacy_timer_tick(), so fold it into that function and remove the declaration. update_process_times() is now only called inside of the kernel/time/ code, so the declaration can be moved there. Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann --- include/linux/timekeeping.h | 2 -- kernel/time/tick-legacy.c | 22 ++++++++++++++++++++-- kernel/time/timekeeping.c | 16 ---------------- kernel/time/timekeeping.h | 1 + 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 3670cb1670ff..d47009611109 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h @@ -10,8 +10,6 @@ void timekeeping_init(void); extern int timekeeping_suspended; /* Architecture timer tick functions: */ -extern void update_process_times(int user); -extern void xtime_update(unsigned long ticks); extern void legacy_timer_tick(unsigned long ticks); /* diff --git a/kernel/time/tick-legacy.c b/kernel/time/tick-legacy.c index 73c5a0af4743..af225b32f5b3 100644 --- a/kernel/time/tick-legacy.c +++ b/kernel/time/tick-legacy.c @@ -10,10 +10,28 @@ #include "tick-internal.h" +/** + * legacy_timer_tick() - advances the timekeeping infrastructure + * @ticks: number of ticks, that have elapsed since the last call. + * + * This is used by platforms that have not been converted to + * generic clockevents. + * + * If 'ticks' is zero, the CPU is not handling timekeeping, so + * only perform process accounting and profiling. + * + * Must be called with interrupts disabled. + */ void legacy_timer_tick(unsigned long ticks) { - if (ticks) - xtime_update(ticks); + if (ticks) { + raw_spin_lock(&jiffies_lock); + write_seqcount_begin(&jiffies_seq); + do_timer(ticks); + write_seqcount_end(&jiffies_seq); + raw_spin_unlock(&jiffies_lock); + update_wall_time(); + } update_process_times(user_mode(get_irq_regs())); profile_tick(CPU_PROFILING); } diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 52fff7e9edcd..daa0ff017819 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -2438,19 +2438,3 @@ void hardpps(const struct timespec64 *phase_ts, const struct timespec64 *raw_ts) } EXPORT_SYMBOL(hardpps); #endif /* CONFIG_NTP_PPS */ - -/** - * xtime_update() - advances the timekeeping infrastructure - * @ticks: number of ticks, that have elapsed since the last call. - * - * Must be called with interrupts disabled. - */ -void xtime_update(unsigned long ticks) -{ - raw_spin_lock(&jiffies_lock); - write_seqcount_begin(&jiffies_seq); - do_timer(ticks); - write_seqcount_end(&jiffies_seq); - raw_spin_unlock(&jiffies_lock); - update_wall_time(); -} diff --git a/kernel/time/timekeeping.h b/kernel/time/timekeeping.h index 099737f6f10c..d94b69c5b869 100644 --- a/kernel/time/timekeeping.h +++ b/kernel/time/timekeeping.h @@ -22,6 +22,7 @@ static inline int sched_clock_suspend(void) { return 0; } static inline void sched_clock_resume(void) { } #endif +extern void update_process_times(int user); extern void do_timer(unsigned long ticks); extern void update_wall_time(void); -- 2.27.0