Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1480297 > unrolled thread

[RFC v6 10/23] arch/tile/kernel/time: set ->min_delta_ticks and ->max_delta_ticks

Started byNicolai Stange <nicstange@gmail.com>
First post2016-09-09 22:10 +0200
Last post2016-09-09 22:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC v6 10/23] arch/tile/kernel/time: set ->min_delta_ticks and ->max_delta_ticks Nicolai Stange <nicstange@gmail.com> - 2016-09-09 22:10 +0200

#1480297 — [RFC v6 10/23] arch/tile/kernel/time: set ->min_delta_ticks and ->max_delta_ticks

FromNicolai Stange <nicstange@gmail.com>
Date2016-09-09 22:10 +0200
Subject[RFC v6 10/23] arch/tile/kernel/time: set ->min_delta_ticks and ->max_delta_ticks
Message-ID<sfAhA-7rj-9@gated-at.bofh.it>
With the yet to come introduction of NTP correction awareness to the
clockevent core, drivers should report their valid ranges in units of
cycles to the latter.

Currently, the tile's timer clockevent device is initialized as follows:

  evt->max_delta_ns = clockevent_delta2ns(MAX_TICK, evt);

and

  .min_delta_ns = 1000,

The first one translates to a ->max_delta_ticks value of MAX_TICK.
For the latter, note that the clockevent core will superimpose a
minimum of 1us by itself -- setting ->min_delta_ticks to 1 is safe here.

Initialize ->min_delta_ticks and ->max_delta_ticks with these values.

Signed-off-by: Nicolai Stange <nicstange@gmail.com>
---
 arch/tile/kernel/time.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/tile/kernel/time.c b/arch/tile/kernel/time.c
index 178989e..c2fd280 100644
--- a/arch/tile/kernel/time.c
+++ b/arch/tile/kernel/time.c
@@ -154,6 +154,7 @@ static DEFINE_PER_CPU(struct clock_event_device, tile_timer) = {
 	.name = "tile timer",
 	.features = CLOCK_EVT_FEAT_ONESHOT,
 	.min_delta_ns = 1000,
+	.min_delta_ticks = 1,
 	.rating = 100,
 	.irq = -1,
 	.set_next_event = tile_timer_set_next_event,
@@ -169,6 +170,7 @@ void setup_tile_timer(void)
 	/* Fill in fields that are speed-specific. */
 	clockevents_calc_mult_shift(evt, cycles_per_sec, TILE_MINSEC);
 	evt->max_delta_ns = clockevent_delta2ns(MAX_TICK, evt);
+	evt->max_delta_ticks = MAX_TICK;
 
 	/* Mark as being for this cpu only. */
 	evt->cpumask = cpumask_of(smp_processor_id());
-- 
2.9.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web