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


Groups > linux.kernel > #1468188

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

From Nicolai Stange <nicstange@gmail.com>
Newsgroups linux.kernel
Subject [RFC v4 10/22] arch/tile/kernel/time: set ->min_delta_ticks and ->max_delta_ticks
Date 2016-08-23 01:40 +0200
Message-ID <s96YX-4v1-75@gated-at.bofh.it> (permalink)
References <s96YV-4v1-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.2

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC v4 00/22] adapt clockevents frequencies to mono clock Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200
  [RFC v4 15/22] clockevents: clockevents_program_min_delta(): don't set ->next_event Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200
  [RFC v4 02/22] clocksource: sh_tmu: compute rate before registration again Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200
  [RFC v4 11/22] clockevents: always initialize ->min_delta_ns and ->max_delta_ns Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200
  [RFC v4 18/22] timer_list: print_tickdevice(): calculate ->*_delta_ns dynamically Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200
  [RFC v4 19/22] clockevents: purge ->min_delta_ns and ->max_delta_ns Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200
  [RFC v4 13/22] clockevents: check a programmed delta's bounds in terms of cycles Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200
  [RFC v4 10/22] arch/tile/kernel/time: set ->min_delta_ticks and ->max_delta_ticks Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200

csiph-web