]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/xen/time: Set ->min_delta_ticks and ->max_delta_ticks
authorNicolai Stange <nicstange@gmail.com>
Thu, 30 Mar 2017 20:06:42 +0000 (22:06 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 13 Sep 2017 04:37:56 +0000 (21:37 -0700)
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 x86 arch's xen 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.

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: xen-devel@lists.xenproject.org
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
OraBug: 26662731

(cherry picked from commit 3d18d661aaad5a22f4d37a0592acc9d784f2a11b)
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Conflicts:
arch/x86/xen/time.c
(whitespaces)

arch/x86/xen/time.c

index 376ac405dc8b15908f94769cadf1ed2a05140c54..a4f0e5d89c4f0636cb4f3e43524af60af7a32023 100644 (file)
@@ -221,8 +221,10 @@ static const struct clock_event_device xen_timerop_clockevent = {
        .name = "xen",
        .features = CLOCK_EVT_FEAT_ONESHOT,
 
-       .max_delta_ns = 0xffffffff,
-       .min_delta_ns = TIMER_SLOP,
+       .max_delta_ns           = 0xffffffff,
+       .max_delta_ticks        = 0xffffffff,
+       .min_delta_ns           = TIMER_SLOP,
+       .min_delta_ticks        = TIMER_SLOP,
 
        .mult = 1,
        .shift = 0,
@@ -282,7 +284,9 @@ static const struct clock_event_device xen_vcpuop_clockevent = {
        .features = CLOCK_EVT_FEAT_ONESHOT,
 
        .max_delta_ns = 0xffffffff,
+       .max_delta_ticks = 0xffffffff,
        .min_delta_ns = TIMER_SLOP,
+       .min_delta_ticks = TIMER_SLOP,
 
        .mult = 1,
        .shift = 0,