From: Nicolai Stange <nicstange@gmail.com> To: John Stultz <john.stultz@linaro.org> Cc: linux-kernel@vger.kernel.org, Nicolai Stange <nicstange@gmail.com>, Daniel Lezcano <daniel.lezcano@linaro.org>, Thomas Gleixner <tglx@linutronix.de>, Barry Song <baohua@kernel.org>, linux-arm-kernel@lists.infradead.org Subject: [PATCH] clockevents/drivers/atlas7: set ->min_delta_ticks and ->max_delta_ticks Date: Thu, 30 Mar 2017 22:10:21 +0200 [thread overview] Message-ID: <20170330201022.8548-1-nicstange@gmail.com> (raw) In-Reply-To: <20170326134403.16226-1-nicstange@gmail.com> In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the timer-atlas7 clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Signed-off-by: Nicolai Stange <nicstange@gmail.com> --- Notes: This prerequisite patch is part of a larger effort to feed NTP corrections into the clockevent devices' frequencies and thus avoiding their notion of time to diverge from the system's one. If you're interested, the current state of the whole series can be found at [1]. If you haven't got any objections and these prerequisites get merged by 4.12 everywhere, I'll proceed with the remainder of this series in 4.13. Applicable to next-20170324 as well as to John' Stultz tree [2]. [1] git://nicst.de/linux.git cev-freq-adj.v10.fortglx-4.12-time https://nicst.de/git/?p=linux.git;a=shortlog;h=refs/heads/cev-freq-adj.v10.fortglx-4.12-time [2] https://git.linaro.org/people/john.stultz/linux.git fortglx/4.12/time drivers/clocksource/timer-atlas7.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clocksource/timer-atlas7.c b/drivers/clocksource/timer-atlas7.c index 3d8a181f0252..50300eec4a39 100644 --- a/drivers/clocksource/timer-atlas7.c +++ b/drivers/clocksource/timer-atlas7.c @@ -192,7 +192,9 @@ static int sirfsoc_local_timer_starting_cpu(unsigned int cpu) ce->set_next_event = sirfsoc_timer_set_next_event; clockevents_calc_mult_shift(ce, atlas7_timer_rate, 60); ce->max_delta_ns = clockevent_delta2ns(-2, ce); + ce->max_delta_ticks = (unsigned long)-2; ce->min_delta_ns = clockevent_delta2ns(2, ce); + ce->min_delta_ticks = 2; ce->cpumask = cpumask_of(cpu); action->dev_id = ce; -- 2.12.0
WARNING: multiple messages have this Message-ID (diff)
From: nicstange@gmail.com (Nicolai Stange) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] clockevents/drivers/atlas7: set ->min_delta_ticks and ->max_delta_ticks Date: Thu, 30 Mar 2017 22:10:21 +0200 [thread overview] Message-ID: <20170330201022.8548-1-nicstange@gmail.com> (raw) In-Reply-To: <20170326134403.16226-1-nicstange@gmail.com> In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the timer-atlas7 clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Signed-off-by: Nicolai Stange <nicstange@gmail.com> --- Notes: This prerequisite patch is part of a larger effort to feed NTP corrections into the clockevent devices' frequencies and thus avoiding their notion of time to diverge from the system's one. If you're interested, the current state of the whole series can be found at [1]. If you haven't got any objections and these prerequisites get merged by 4.12 everywhere, I'll proceed with the remainder of this series in 4.13. Applicable to next-20170324 as well as to John' Stultz tree [2]. [1] git://nicst.de/linux.git cev-freq-adj.v10.fortglx-4.12-time https://nicst.de/git/?p=linux.git;a=shortlog;h=refs/heads/cev-freq-adj.v10.fortglx-4.12-time [2] https://git.linaro.org/people/john.stultz/linux.git fortglx/4.12/time drivers/clocksource/timer-atlas7.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clocksource/timer-atlas7.c b/drivers/clocksource/timer-atlas7.c index 3d8a181f0252..50300eec4a39 100644 --- a/drivers/clocksource/timer-atlas7.c +++ b/drivers/clocksource/timer-atlas7.c @@ -192,7 +192,9 @@ static int sirfsoc_local_timer_starting_cpu(unsigned int cpu) ce->set_next_event = sirfsoc_timer_set_next_event; clockevents_calc_mult_shift(ce, atlas7_timer_rate, 60); ce->max_delta_ns = clockevent_delta2ns(-2, ce); + ce->max_delta_ticks = (unsigned long)-2; ce->min_delta_ns = clockevent_delta2ns(2, ce); + ce->min_delta_ticks = 2; ce->cpumask = cpumask_of(cpu); action->dev_id = ce; -- 2.12.0
next prev parent reply other threads:[~2017-03-30 20:10 UTC|newest] Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-26 13:44 [PATCH] x86/apic/timer: set ->min_delta_ticks and ->max_delta_ticks Nicolai Stange 2017-03-30 19:39 ` [PATCH] avr32/time: " Nicolai Stange 2017-04-03 6:42 ` Hans-Christian Noren Egtvedt 2017-03-30 19:41 ` [PATCH] blackfin: time-ts: " Nicolai Stange 2017-03-30 19:42 ` [PATCH] c6x/timer64: " Nicolai Stange 2017-03-30 19:43 ` [PATCH] hexagon/time: " Nicolai Stange 2017-04-03 15:49 ` Richard Kuo 2017-03-30 19:44 ` [PATCH] m68k/coldfire/pit: " Nicolai Stange 2017-03-30 19:44 ` Nicolai Stange 2017-03-31 1:10 ` Greg Ungerer 2017-03-31 1:10 ` Greg Ungerer 2017-03-30 19:45 ` [PATCH] microblaze/timer: " Nicolai Stange 2017-04-07 13:14 ` Daniel Lezcano 2017-04-16 2:47 ` Nicolai Stange 2017-04-16 9:46 ` Daniel Lezcano 2017-05-29 9:03 ` Michal Simek 2017-03-30 19:47 ` [PATCH] MIPS: clockevent drivers: " Nicolai Stange 2017-04-12 20:10 ` Ralf Baechle 2017-03-30 19:48 ` [PATCH] mn10300/cevt-mn10300: " Nicolai Stange 2017-03-30 19:53 ` [PATCH] powerpc/time: " Nicolai Stange 2017-03-31 3:03 ` Michael Ellerman 2017-03-30 19:54 ` [PATCH] s390/time: " Nicolai Stange 2017-03-30 19:55 ` [PATCH] score/time: " Nicolai Stange 2017-03-30 19:56 ` [PATCH] sparc/time: " Nicolai Stange 2017-03-30 19:56 ` Nicolai Stange 2017-04-01 19:18 ` David Miller 2017-04-01 19:18 ` David Miller 2017-03-30 19:57 ` [PATCH] tile/time: " Nicolai Stange 2017-03-30 19:59 ` [PATCH] um/time: " Nicolai Stange 2017-03-30 20:01 ` [PATCH] unicore32/time: " Nicolai Stange 2017-03-31 1:59 ` Xuetao Guan 2017-03-30 20:03 ` [PATCH] x86/lguest/timer: " Nicolai Stange 2017-04-02 1:35 ` Rusty Russell 2017-03-30 20:04 ` [PATCH] x86/uv/time: " Nicolai Stange 2017-03-30 20:06 ` [PATCH] x86/xen/time: " Nicolai Stange 2017-03-30 20:06 ` Nicolai Stange 2017-03-30 22:59 ` Boris Ostrovsky 2017-03-30 22:59 ` Boris Ostrovsky 2017-04-06 9:11 ` Juergen Gross 2017-04-06 9:11 ` Juergen Gross 2017-04-11 5:09 ` Juergen Gross 2017-04-11 5:09 ` Juergen Gross 2017-03-30 20:07 ` [PATCH] clockevents/drivers/dw_apb: " Nicolai Stange 2017-04-07 13:20 ` Daniel Lezcano 2017-03-30 20:08 ` [PATCH] clockevents/drivers/metag: " Nicolai Stange 2017-04-07 13:20 ` Daniel Lezcano 2017-03-30 20:08 ` [PATCH] x86/numachip timer: " Nicolai Stange 2017-04-07 13:21 ` Daniel Lezcano 2017-03-30 20:09 ` [PATCH] clockevents/drivers/sh_cmt: " Nicolai Stange 2017-04-07 13:22 ` Daniel Lezcano 2017-03-30 20:10 ` Nicolai Stange [this message] 2017-03-30 20:10 ` [PATCH] clockevents/drivers/atlas7: " Nicolai Stange 2017-04-07 13:23 ` Daniel Lezcano 2017-04-07 13:23 ` Daniel Lezcano
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170330201022.8548-1-nicstange@gmail.com \ --to=nicstange@gmail.com \ --cc=baohua@kernel.org \ --cc=daniel.lezcano@linaro.org \ --cc=john.stultz@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=tglx@linutronix.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.