From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965303AbcIPUKm (ORCPT ); Fri, 16 Sep 2016 16:10:42 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:32983 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965556AbcIPUJd (ORCPT ); Fri, 16 Sep 2016 16:09:33 -0400 From: Nicolai Stange To: Thomas Gleixner Cc: John Stultz , linux-kernel@vger.kernel.org, Nicolai Stange Subject: [RFC v7 10/23] arch/tile/kernel/time: set ->min_delta_ticks and ->max_delta_ticks Date: Fri, 16 Sep 2016 22:08:38 +0200 Message-Id: <20160916200851.9273-11-nicstange@gmail.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20160916200851.9273-1-nicstange@gmail.com> References: <20160916200851.9273-1-nicstange@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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.10.0