x86/apic/timer: set ->min_delta_ticks and ->max_delta_ticks
PATCH 1/1 x86/apic/timer: set ->min_delta_ticks and ->max_delta_ticks
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 apic 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.
---
Notes:
(First test sending for 23 similar patches in different subsystems
to follow.)
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
arch/x86/kernel/apic/apic.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/kernel/apic/apic.c +4 -0
@@ -731,8 +731,10 @@ static int __init calibrate_APIC_clock(void) TICK_NSEC, lapic_clockevent.shift); lapic_clockevent.max_delta_ns =clockevent_delta2ns (0x7FFFFF , &lapic_clockevent); + lapic_clockevent.max_delta_ticks =0x7FFFFF ; lapic_clockevent.min_delta_ns =clockevent_delta2ns (0xF , &lapic_clockevent); + lapic_clockevent.min_delta_ticks =0xF ; lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY ;return 0 ; }
@@ -778,8 +780,10 @@ static int __init calibrate_APIC_clock(void) lapic_clockevent.shift); lapic_clockevent.max_delta_ns =clockevent_delta2ns (0x7FFFFFFF , &lapic_clockevent); + lapic_clockevent.max_delta_ticks =0x7FFFFFFF ; lapic_clockevent.min_delta_ns =clockevent_delta2ns (0xF , &lapic_clockevent); + lapic_clockevent.min_delta_ticks =0xF ; lapic_timer_frequency = (delta *APIC_DIVISOR ) /LAPIC_CAL_LOOPS ;
Signature · 1 line
2.12.0
PATCH 1/1 avr32/time: set ->min_delta_ticks and ->max_delta_ticks
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 avr32 arch's 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.
---
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
arch/avr32/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)
arch/avr32/kernel/time.c +2 -0
@@ -142,7 +142,9 @@ void __init time_init(void)/* setup COMPARE clockevent */ comparator.mult =div_sc (counter_hz,NSEC_PER_SEC , comparator.shift); comparator.max_delta_ns =clockevent_delta2ns ((u32 )~0 , &comparator); + comparator.max_delta_ticks = (u32 )~0 ; comparator.min_delta_ns =clockevent_delta2ns (50 , &comparator) +1 ; + comparator.min_delta_ticks =50 ; comparator.cpumask =cpumask_of (0 );sysreg_write (COMPARE ,0 );
Signature · 1 line
2.12.0
Re: [PATCH] avr32/time: set ->min_delta_ticks and ->max_delta_ticks
Quoted 8 lines · Nicolai Stange
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 avr32 arch's clockevent driver initialize these fields properly.
Quoted 7 lines
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 <[email protected]>
-1
Please do not spend time on AVR32 architecture. It will be removed in the next merge window.
<snipp diff>
Signature · 2 lines
Best regards, Hans-Christian Noren Egtvedt
PATCH 1/1 blackfin: time-ts: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 blackfin arch's 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.
---
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
arch/blackfin/kernel/time-ts.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/blackfin/kernel/time-ts.c +4 -0
@@ -230,7 +230,9 @@ static void __init bfin_gptmr0_clockevent_init(struct clock_event_device *evt) clock_tick =get_sclk (); evt->mult =div_sc (clock_tick,NSEC_PER_SEC , evt->shift); evt->max_delta_ns =clockevent_delta2ns (-1 , evt); + evt->max_delta_ticks = (unsigned long )-1 ; evt->min_delta_ns =clockevent_delta2ns (100 , evt); + evt->min_delta_ticks =100 ; evt->cpumask =cpumask_of (0 );
@@ -344,7 +346,9 @@ void bfin_coretmr_clockevent_init(void) clock_tick =get_cclk () /TIME_SCALE ; evt->mult =div_sc (clock_tick,NSEC_PER_SEC , evt->shift); evt->max_delta_ns =clockevent_delta2ns (-1 , evt); + evt->max_delta_ticks = (unsigned long )-1 ; evt->min_delta_ns =clockevent_delta2ns (100 , evt); + evt->min_delta_ticks =100 ; evt->cpumask =cpumask_of (cpu);
Signature · 1 line
2.12.0
PATCH 1/1 c6x/timer64: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 c6x arch's 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.
---
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
arch/c6x/platforms/timer64.c | 2 ++ 1 file changed, 2 insertions(+)
arch/c6x/platforms/timer64.c +2 -0
@@ -234,7 +234,9 @@ void __init timer64_init(void)clockevents_calc_mult_shift (cd, c6x_core_freq /TIMER_DIVISOR ,5 ); cd->max_delta_ns =clockevent_delta2ns (0x7fffffff , cd); + cd->max_delta_ticks =0x7fffffff ; cd->min_delta_ns =clockevent_delta2ns (250 , cd); + cd->min_delta_ticks =250 ; cd->cpumask =cpumask_of (smp_processor_id ());
Signature · 1 line
2.12.0
PATCH 1/1 hexagon/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 hexagon arch's 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.
---
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
arch/hexagon/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)
arch/hexagon/kernel/time.c +2 -0
@@ -199,7 +199,9 @@ void __init time_init_deferred(void)clockevents_calc_mult_shift (ce_dev, sleep_clk_freq,4 ); ce_dev->max_delta_ns =clockevent_delta2ns (0x7fffffff , ce_dev); + ce_dev->max_delta_ticks =0x7fffffff ; ce_dev->min_delta_ns =clockevent_delta2ns (0xf , ce_dev); + ce_dev->min_delta_ticks =0xf ;#ifdef CONFIG_SMP setup_percpu_clockdev ();
Signature · 1 line
2.12.0
Re: [PATCH] hexagon/time: set ->min_delta_ticks and ->max_delta_ticks
Quoted 35 lines · Nicolai Stange
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 hexagon arch's 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 <[email protected]>---
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.gitcev-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
Quoted 5 lines
[2]
https://git.linaro.org/people/john.stultz/linux.git fortglx/4.12/timearch/hexagon/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)
Signature · 3 lines
Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 1/1 m68k/coldfire/pit: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 m68k arch's coldfire 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.
---
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
arch/m68k/coldfire/pit.c | 2 ++ 1 file changed, 2 insertions(+)
arch/m68k/coldfire/pit.c +2 -0
@@ -149,8 +149,10 @@ void hw_timer_init(irq_handler_t handler) cf_pit_clockevent.mult =div_sc (FREQ ,NSEC_PER_SEC ,32 ); cf_pit_clockevent.max_delta_ns =clockevent_delta2ns (0xFFFF , &cf_pit_clockevent); + cf_pit_clockevent.max_delta_ticks =0xFFFF ; cf_pit_clockevent.min_delta_ns =clockevent_delta2ns (0x3f , &cf_pit_clockevent); + cf_pit_clockevent.min_delta_ticks =0x3f ;clockevents_register_device (&cf_pit_clockevent);setup_irq (MCF_IRQ_PIT1 , &pit_irq);
Signature · 1 line
2.12.0
Re: [PATCH] m68k/coldfire/pit: set ->min_delta_ticks and ->max_delta_ticks
Hi Nicolai,
Quoted 9 lines · Nicolai Stange
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 m68k arch's coldfire clockevent driver initialize these fields properly.
Quoted 7 lines
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 <[email protected]>
Looks ok to me.
Are you pushing this through some other git tree?
Or do you want me to push up to Linus?
Regards
Greg
Quoted 41 lines
---
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.gitcev-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/timearch/m68k/coldfire/pit.c | 2 ++ 1 file changed, 2 insertions(+)arch/m68k/coldfire/pit.c +2
-0@@ -149,8 +149,10 @@ void hw_timer_init(irq_handler_t handler) cf_pit_clockevent.mult =div_sc (FREQ ,NSEC_PER_SEC ,32 ); cf_pit_clockevent.max_delta_ns =clockevent_delta2ns (0xFFFF , &cf_pit_clockevent); + cf_pit_clockevent.max_delta_ticks =0xFFFF ; cf_pit_clockevent.min_delta_ns =clockevent_delta2ns (0x3f , &cf_pit_clockevent); + cf_pit_clockevent.min_delta_ticks =0x3f ;clockevents_register_device (&cf_pit_clockevent);setup_irq (MCF_IRQ_PIT1 , &pit_irq);
Re: [PATCH] m68k/coldfire/pit: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeHi Nicolai,
Quoted 9 lines · Nicolai Stange
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 m68k arch's coldfire clockevent driver initialize these fields properly.
Quoted 7 lines
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 <[email protected]>
Looks ok to me.
Are you pushing this through some other git tree?
Or do you want me to push up to Linus?
Regards
Greg
Quoted 41 lines
---
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.gitcev-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/timearch/m68k/coldfire/pit.c | 2 ++ 1 file changed, 2 insertions(+)arch/m68k/coldfire/pit.c +2
-0@@ -149,8 +149,10 @@ void hw_timer_init(irq_handler_t handler) cf_pit_clockevent.mult =div_sc (FREQ ,NSEC_PER_SEC ,32 ); cf_pit_clockevent.max_delta_ns =clockevent_delta2ns (0xFFFF , &cf_pit_clockevent); + cf_pit_clockevent.max_delta_ticks =0xFFFF ; cf_pit_clockevent.min_delta_ns =clockevent_delta2ns (0x3f , &cf_pit_clockevent); + cf_pit_clockevent.min_delta_ticks =0x3f ;clockevents_register_device (&cf_pit_clockevent);setup_irq (MCF_IRQ_PIT1 , &pit_irq);
PATCH 1/1 microblaze/timer: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 microblaze arch's 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.
---
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
arch/microblaze/kernel/timer.c | 2 ++ 1 file changed, 2 insertions(+)
arch/microblaze/kernel/timer.c +2 -0
@@ -178,8 +178,10 @@ static __init int xilinx_clockevent_init(void) clockevent_xilinx_timer.shift); clockevent_xilinx_timer.max_delta_ns =clockevent_delta2ns ((u32 )~0 , &clockevent_xilinx_timer); + clockevent_xilinx_timer.max_delta_ticks = (u32 )~0 ; clockevent_xilinx_timer.min_delta_ns =clockevent_delta2ns (1 , &clockevent_xilinx_timer); + clockevent_xilinx_timer.min_delta_ticks =1 ; clockevent_xilinx_timer.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_xilinx_timer);
Signature · 1 line
2.12.0
Re: [PATCH] microblaze/timer: set ->min_delta_ticks and ->max_delta_ticks
Quoted 46 lines · Nicolai Stange
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 microblaze arch's 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 <[email protected]>---
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.gitcev-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/timearch/microblaze/kernel/timer.c | 2 ++ 1 file changed, 2 insertions(+)arch/microblaze/kernel/timer.c +0
-0
arch/microblaze/kernel/timer.c static __init int xilinx_clockevent_init(void) · line 181
Quoted 4 lines
arch/microblaze/kernel/timer.c +1
-0@@ -178,8 +178,10 @@ static __init int xilinx_clockevent_init(void) clockevent_xilinx_timer.shift); clockevent_xilinx_timer.max_delta_ns =clockevent_delta2ns ((u32 )~0 , &clockevent_xilinx_timer); + clockevent_xilinx_timer.max_delta_ticks = (u32 )~0 ;
Can you take the opportunity to fix the type (unsigned long) ?
Quoted 9 lines
arch/microblaze/kernel/timer.c +1
-0clockevent_xilinx_timer.min_delta_ns =clockevent_delta2ns (1 , &clockevent_xilinx_timer); + clockevent_xilinx_timer.min_delta_ticks =1 ; clockevent_xilinx_timer.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_xilinx_timer);Signature · 1 line
2.12.0
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH] microblaze/timer: set ->min_delta_ticks and ->max_delta_ticks
Hello Daniel,
Quoted 12 lines · Daniel Lezcano
arch/microblaze/kernel/timer.c static __init int xilinx_clockevent_init(void) · line 181
Quoted 9 lines · Nicolai Stange
arch/microblaze/kernel/timer.c +1
-0@@ -178,8 +178,10 @@ static __init int xilinx_clockevent_init(void) clockevent_xilinx_timer.shift); clockevent_xilinx_timer.max_delta_ns =clockevent_delta2ns ((u32 )~0 , &clockevent_xilinx_timer); + clockevent_xilinx_timer.max_delta_ticks = (u32 )~0 ;Can you take the opportunity to fix the type (unsigned long) ?
Hmm, I personally think that it'd be better to leave the u32 there as it corresponds to the hardware's counter width?
clockevent_delta2ns()' latch argument has been of type unsigned long from the beginning and this might indicate that at least this driver's original author followed this line of reasoning...
OTOH, I think that u32 is equivalent to unsigned long on microblaze, so it doesn't matter much.
Does the above convince you or do you still want the
- clockevent_xilinx_timer.max_delta_ticks = (u32)~0; + clockevent_xilinx_timer.max_delta_ticks = ~0UL;
change?
Thanks,
Nicolai
Daniel Lezcano
Acked-byRe: [PATCH] microblaze/timer: set ->min_delta_ticks and ->max_delta_ticks
Quoted 20 lines · Nicolai Stange
Hello Daniel,
Quoted 12 lines · Daniel Lezcano
arch/microblaze/kernel/timer.c static __init int xilinx_clockevent_init(void) · line 181
Quoted 9 lines · Nicolai Stange
arch/microblaze/kernel/timer.c +1
-0@@ -178,8 +178,10 @@ static __init int xilinx_clockevent_init(void) clockevent_xilinx_timer.shift); clockevent_xilinx_timer.max_delta_ns =clockevent_delta2ns ((u32 )~0 , &clockevent_xilinx_timer); + clockevent_xilinx_timer.max_delta_ticks = (u32 )~0 ;Can you take the opportunity to fix the type (unsigned long) ?
Hmm, I personally think that it'd be better to leave the u32 there as it corresponds to the hardware's counter width?
Quoted 8 lines
clockevent_delta2ns()' latch argument has been of type unsigned long from the beginning and this might indicate that at least this driver's original author followed this line of reasoning...OTOH, I think that u32 is equivalent to unsigned long on microblaze, so it doesn't matter much.
Does the above convince you or do you still want the
Yeah, I was nitpicking.
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Michal Simek
maintainerRe: [PATCH] microblaze/timer: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeQuoted 47 lines · Nicolai Stange
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 microblaze arch's 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 <[email protected]>---
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.gitcev-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/timearch/microblaze/kernel/timer.c | 2 ++ 1 file changed, 2 insertions(+)arch/microblaze/kernel/timer.c +0
-0
arch/microblaze/kernel/timer.c static __init int xilinx_clockevent_init(void) · line 187
Quoted 10 lines
arch/microblaze/kernel/timer.c +2
-0@@ -178,8 +178,10 @@ static __init int xilinx_clockevent_init(void) clockevent_xilinx_timer.shift); clockevent_xilinx_timer.max_delta_ns =clockevent_delta2ns ((u32 )~0 , &clockevent_xilinx_timer); + clockevent_xilinx_timer.max_delta_ticks = (u32 )~0 ; clockevent_xilinx_timer.min_delta_ns =clockevent_delta2ns (1 , &clockevent_xilinx_timer); + clockevent_xilinx_timer.min_delta_ticks =1 ; clockevent_xilinx_timer.cpumask =cpumask_of (0 );clockevents_register_device (&clockevent_xilinx_timer);
Applied as
microblaze: Set ->min_delta_ticks and ->max_delta_ticks for timer
With Daniel's ACK.
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs
PATCH 1/1 MIPS: clockevent drivers: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 MIPS arch's clockevent drivers 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 these drivers.
---
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
arch/mips/alchemy/common/time.c | 4 +++- arch/mips/jz4740/time.c | 2 ++ arch/mips/kernel/cevt-bcm1480.c | 2 ++ arch/mips/kernel/cevt-ds1287.c | 2 ++ arch/mips/kernel/cevt-gt641xx.c | 2 ++ arch/mips/kernel/cevt-sb1250.c | 2 ++ arch/mips/kernel/cevt-txx9.c | 2 ++ arch/mips/loongson32/common/time.c | 2 ++ arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c | 2 ++ arch/mips/loongson64/loongson-3/hpet.c | 2 ++ arch/mips/ralink/cevt-rt3352.c | 2 ++ arch/mips/sgi-ip27/ip27-timer.c | 2 ++ 12 files changed, 25 insertions(+), 1 deletion(-)
arch/mips/alchemy/common/time.c +3 -1
@@ -138,7 +138,9 @@ static int __init alchemy_time_init(unsigned int m2int) cd->shift =32 ; cd->mult =div_sc (32768 ,NSEC_PER_SEC , cd->shift); cd->max_delta_ns =clockevent_delta2ns (0xffffffff , cd); - cd->min_delta_ns =clockevent_delta2ns (9 , cd);/* ~0.28ms */ + cd->max_delta_ticks =0xffffffff ; + cd->min_delta_ns =clockevent_delta2ns (9 , cd); + cd->min_delta_ticks =9 ;/* ~0.28ms */ clockevents_register_device (cd);setup_irq (m2int, &au1x_rtcmatch2_irqaction);
arch/mips/jz4740/time.c +2 -0
@@ -145,7 +145,9 @@ void __init plat_time_init(void)clockevent_set_clock (&jz4740_clockevent, clk_rate); jz4740_clockevent.min_delta_ns =clockevent_delta2ns (100 , &jz4740_clockevent); + jz4740_clockevent.min_delta_ticks =100 ; jz4740_clockevent.max_delta_ns =clockevent_delta2ns (0xffff , &jz4740_clockevent); + jz4740_clockevent.max_delta_ticks =0xffff ; jz4740_clockevent.cpumask =cpumask_of (0 );clockevents_register_device (&jz4740_clockevent);
arch/mips/kernel/cevt-bcm1480.c +2 -0
@@ -123,7 +123,9 @@ void sb1480_clockevent_init(void)CLOCK_EVT_FEAT_ONESHOT ;clockevent_set_clock (cd,V_SCD_TIMER_FREQ ); cd->max_delta_ns =clockevent_delta2ns (0x7fffff , cd); + cd->max_delta_ticks =0x7fffff ; cd->min_delta_ns =clockevent_delta2ns (2 , cd); + cd->min_delta_ticks =2 ; cd->rating =200 ; cd->irq = irq; cd->cpumask =cpumask_of (cpu);
arch/mips/kernel/cevt-ds1287.c +2 -0
@@ -128,7 +128,9 @@ int __init ds1287_clockevent_init(int irq) cd->irq = irq;clockevent_set_clock (cd,32768 ); cd->max_delta_ns =clockevent_delta2ns (0x7fffffff , cd); + cd->max_delta_ticks =0x7fffffff ; cd->min_delta_ns =clockevent_delta2ns (0x300 , cd); + cd->min_delta_ticks =0x300 ; cd->cpumask =cpumask_of (0 );clockevents_register_device (&ds1287_clockevent);
arch/mips/kernel/cevt-gt641xx.c +2 -0
@@ -152,7 +152,9 @@ static int __init gt641xx_timer0_clockevent_init(void) cd->rating =200 + gt641xx_base_clock /10000000 ;clockevent_set_clock (cd, gt641xx_base_clock); cd->max_delta_ns =clockevent_delta2ns (0x7fffffff , cd); + cd->max_delta_ticks =0x7fffffff ; cd->min_delta_ns =clockevent_delta2ns (0x300 , cd); + cd->min_delta_ticks =0x300 ; cd->cpumask =cpumask_of (0 );clockevents_register_device (>641xx_timer0_clockevent);
arch/mips/kernel/cevt-sb1250.c +2 -0
@@ -123,7 +123,9 @@ void sb1250_clockevent_init(void)CLOCK_EVT_FEAT_ONESHOT ;clockevent_set_clock (cd,V_SCD_TIMER_FREQ ); cd->max_delta_ns =clockevent_delta2ns (0x7fffff , cd); + cd->max_delta_ticks =0x7fffff ; cd->min_delta_ns =clockevent_delta2ns (2 , cd); + cd->min_delta_ticks =2 ; cd->rating =200 ; cd->irq = irq; cd->cpumask =cpumask_of (cpu);
arch/mips/kernel/cevt-txx9.c +2 -0
@@ -196,7 +196,9 @@ void __init txx9_clockevent_init(unsigned long baseaddr, int irq,clockevent_set_clock (cd,TIMER_CLK (imbusclk)); cd->max_delta_ns =clockevent_delta2ns (0xffffffff >> (32 -TXX9_TIMER_BITS ), cd); + cd->max_delta_ticks =0xffffffff >> (32 -TXX9_TIMER_BITS ); cd->min_delta_ns =clockevent_delta2ns (0xf , cd); + cd->min_delta_ticks =0xf ; cd->irq = irq; cd->cpumask =cpumask_of (0 ),clockevents_register_device (cd);
arch/mips/loongson32/common/time.c +2 -0
@@ -199,7 +199,9 @@ static void __init ls1x_time_init(void)clockevent_set_clock (cd, mips_hpt_frequency); cd->max_delta_ns =clockevent_delta2ns (0xffffff , cd); + cd->max_delta_ticks =0xffffff ; cd->min_delta_ns =clockevent_delta2ns (0x000300 , cd); + cd->min_delta_ticks =0x000300 ; cd->cpumask =cpumask_of (smp_processor_id ());clockevents_register_device (cd);
arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c +2 -0
@@ -123,7 +123,9 @@ void __init setup_mfgpt0_timer(void) cd->cpumask =cpumask_of (cpu);clockevent_set_clock (cd,MFGPT_TICK_RATE ); cd->max_delta_ns =clockevent_delta2ns (0xffff , cd); + cd->max_delta_ticks =0xffff ; cd->min_delta_ns =clockevent_delta2ns (0xf , cd); + cd->min_delta_ticks =0xf ;/* Enable MFGPT0 Comparator 2 Output to the Interrupt Mapper */ _wrmsr (DIVIL_MSR_REG (MFGPT_IRQ ),0 ,0x100 );
arch/mips/loongson64/loongson-3/hpet.c +2 -0
@@ -241,7 +241,9 @@ void __init setup_hpet_timer(void) cd->cpumask =cpumask_of (cpu);clockevent_set_clock (cd,HPET_FREQ ); cd->max_delta_ns =clockevent_delta2ns (0x7fffffff , cd); + cd->max_delta_ticks =0x7fffffff ; cd->min_delta_ns =clockevent_delta2ns (HPET_MIN_PROG_DELTA , cd); + cd->min_delta_ticks =HPET_MIN_PROG_DELTA ;clockevents_register_device (cd);setup_irq (HPET_T0_IRQ , &hpet_irq);
arch/mips/ralink/cevt-rt3352.c +2 -0
@@ -129,7 +129,9 @@ static int __init ralink_systick_init(struct device_node *np) systick.dev.name = np->name;clockevents_calc_mult_shift (&systick.dev,SYSTICK_FREQ ,60 ); systick.dev.max_delta_ns =clockevent_delta2ns (0x7fff , &systick.dev); + systick.dev.max_delta_ticks =0x7fff ; systick.dev.min_delta_ns =clockevent_delta2ns (0x3 , &systick.dev); + systick.dev.min_delta_ticks =0x3 ; systick.dev.irq =irq_of_parse_and_map (np,0 );if (!systick.dev.irq) {pr_err ("%s: request_irq failed" , np->name);
arch/mips/sgi-ip27/ip27-timer.c +2 -0
@@ -113,7 +113,9 @@ void hub_rt_clock_event_init(void) cd->features =CLOCK_EVT_FEAT_ONESHOT ;clockevent_set_clock (cd,CYCLES_PER_SEC ); cd->max_delta_ns =clockevent_delta2ns (0xfffffffffffff , cd); + cd->max_delta_ticks =0xfffffffffffff ; cd->min_delta_ns =clockevent_delta2ns (0x300 , cd); + cd->min_delta_ticks =0x300 ; cd->rating =200 ; cd->irq = irq; cd->cpumask =cpumask_of (cpu);
Signature · 1 line
2.12.0
Re: [PATCH] MIPS: clockevent drivers: set ->min_delta_ticks and ->max_delta_ticks
Quoted 8 lines · Nicolai Stange
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 MIPS arch's clockevent drivers initialize these fields properly.
Quoted 7 lines
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 these drivers.
Signed-off-by Nicolai Stange <[email protected]>
Feel free to push this to Linus.
Ralf
PATCH 1/1 mn10300/cevt-mn10300: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 mn10300 arch's 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.
---
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
arch/mn10300/kernel/cevt-mn10300.c | 2 ++ 1 file changed, 2 insertions(+)
arch/mn10300/kernel/cevt-mn10300.c +2 -0
@@ -98,7 +98,9 @@ int __init init_clockevents(void)/* Calculate the min / max delta */ cd->max_delta_ns =clockevent_delta2ns (TMJCBR_MAX , cd); + cd->max_delta_ticks =TMJCBR_MAX ; cd->min_delta_ns =clockevent_delta2ns (100 , cd); + cd->min_delta_ticks =100 ; cd->rating =200 ; cd->cpumask =cpumask_of (smp_processor_id ());
Signature · 1 line
2.12.0
PATCH 1/1 powerpc/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 powerpc arch's 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.
---
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
arch/powerpc/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/kernel/time.c +2 -0
@@ -995,8 +995,10 @@ static void __init init_decrementer_clockevent(void) decrementer_clockevent.max_delta_ns =clockevent_delta2ns (decrementer_max, &decrementer_clockevent); + decrementer_clockevent.max_delta_ticks = decrementer_max; decrementer_clockevent.min_delta_ns =clockevent_delta2ns (2 , &decrementer_clockevent); + decrementer_clockevent.min_delta_ticks =2 ;register_decrementer_clockevent (cpu); }
Signature · 1 line
2.12.0
Re: [PATCH] powerpc/time: set ->min_delta_ticks and ->max_delta_ticks
Quoted 45 lines · Nicolai Stange
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 powerpc arch's 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 <[email protected]>---
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.gitcev-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/timearch/powerpc/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)arch/powerpc/kernel/time.c +0
-0
arch/powerpc/kernel/time.c static void __init init_decrementer_clockevent(void) · line 1001
Quoted 7 lines
arch/powerpc/kernel/time.c +2
-0@@ -995,8 +995,10 @@ static void __init init_decrementer_clockevent(void) decrementer_clockevent.max_delta_ns =clockevent_delta2ns (decrementer_max, &decrementer_clockevent); + decrementer_clockevent.max_delta_ticks = decrementer_max; decrementer_clockevent.min_delta_ns =clockevent_delta2ns (2 , &decrementer_clockevent); + decrementer_clockevent.min_delta_ticks =2 ;
Seems to do what it says on the tin.
cheers
PATCH 1/1 s390/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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.
Currently, the s390's CPU timer clockevent device is initialized as follows:
cd->min_delta_ns = 1; cd->max_delta_ns = LONG_MAX;
Note that the device's time to cycle conversion factor, i.e. cd->mult / (2^cd->shift), is approx. equal to 4.
Hence, this would translate to
cd->min_delta_ticks = 4; cd->max_delta_ticks = 4 * LONG_MAX;
However, a minimum value of 1ns is in the range of noise anyway and the clockevent core will take care of this by increasing it to 1us or so. Furthermore, 4*LONG_MAX would overflow the unsigned long argument the clockevent devices gets programmed with.
Thus, initialize ->min_delta_ticks with 1 and ->max_delta_ticks with ULONG_MAX.
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.
---
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
arch/s390/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)
arch/s390/kernel/time.c +2 -0
@@ -158,7 +158,9 @@ void init_cpu_timer(void) cd->mult =16777 ; cd->shift =12 ; cd->min_delta_ns =1 ; + cd->min_delta_ticks =1 ; cd->max_delta_ns =LONG_MAX ; + cd->max_delta_ticks =ULONG_MAX ; cd->rating =400 ; cd->cpumask =cpumask_of (cpu); cd->set_next_event = s390_next_event;
Signature · 1 line
2.12.0
PATCH 1/1 score/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 score arch's 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.
---
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
arch/score/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)
arch/score/kernel/time.c +2 -0
@@ -81,8 +81,10 @@ void __init time_init(void) score_clockevent.shift); score_clockevent.max_delta_ns =clockevent_delta2ns ((u32 )~0 , &score_clockevent); + score_clockevent.max_delta_ticks = (u32 )~0 ; score_clockevent.min_delta_ns =clockevent_delta2ns (50 , &score_clockevent) +1 ; + score_clockevent.min_delta_ticks =50 ; score_clockevent.cpumask =cpumask_of (0 );clockevents_register_device (&score_clockevent); }
Signature · 1 line
2.12.0
PATCH 1/1 sparc/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 sparc arch's clockevent drivers 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 these drivers.
---
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
arch/sparc/kernel/time_32.c | 2 ++ arch/sparc/kernel/time_64.c | 2 ++ 2 files changed, 4 insertions(+)
arch/sparc/kernel/time_32.c +2 -0
@@ -228,7 +228,9 @@ void register_percpu_ce(int cpu) ce->mult =div_sc (sparc_config.clock_rate,NSEC_PER_SEC , ce->shift); ce->max_delta_ns =clockevent_delta2ns (sparc_config.clock_rate, ce); + ce->max_delta_ticks = (unsigned long )sparc_config.clock_rate; ce->min_delta_ns =clockevent_delta2ns (100 , ce); + ce->min_delta_ticks =100 ;clockevents_register_device (ce); }
arch/sparc/kernel/time_64.c +2 -0
@@ -796,8 +796,10 @@ void __init time_init(void) sparc64_clockevent.max_delta_ns clockevent_delta2ns(0x7fffffffffffffffUL, &sparc64_clockevent); + sparc64_clockevent.max_delta_ticks =0x7fffffffffffffffUL ; sparc64_clockevent.min_delta_ns clockevent_delta2ns(0xF, &sparc64_clockevent); + sparc64_clockevent.min_delta_ticks =0xF ;printk ("clockevent: mult[%x] shift[%d]\n" , sparc64_clockevent.mult, sparc64_clockevent.shift);
Signature · 1 line
2.12.0
Re: [PATCH] sparc/time: set ->min_delta_ticks and ->max_delta_ticks
From: Nicolai Stange <[email protected]>
Date: Thu, 30 Mar 2017 21:56:47 +0200
Quoted 8 lines
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 sparc arch's clockevent drivers initialize these fields properly.
Quoted 7 lines
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 these drivers.
Signed-off-by Nicolai Stange <[email protected]>
PATCH 1/1 tile/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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.
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.
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.
---
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
arch/tile/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)
arch/tile/kernel/time.c +2 -0
@@ -155,6 +155,8 @@ 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, + .max_delta_ticks = MAX_TICK, .rating = 100, .irq = -1, .set_next_event = tile_timer_set_next_event,
Signature · 1 line
2.12.0
PATCH 1/1 um/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 uml arch's 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.
---
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
arch/um/kernel/time.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/um/kernel/time.c +3 -1
@@ -65,7 +65,9 @@ static struct clock_event_device timer_clockevent = { .set_next_event = itimer_next_event, .shift = 0, .max_delta_ns = 0xffffffff, - .min_delta_ns = TIMER_MIN_DELTA, //microsecond resolution should be enough for anyone, same as 640K RAM + .max_delta_ticks = 0xffffffff, + .min_delta_ns = TIMER_MIN_DELTA, + .min_delta_ticks = TIMER_MIN_DELTA, // microsecond resolution should be enough for anyone, same as 640K RAM .irq = 0, .mult = 1, };
Signature · 1 line
2.12.0
PATCH 1/1 unicore32/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 unicore32 arch's 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.
---
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
arch/unicore32/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)
arch/unicore32/kernel/time.c +2 -0
@@ -91,8 +91,10 @@ void __init time_init(void) ckevt_puv3_osmr0.max_delta_ns =clockevent_delta2ns (0x7fffffff , &ckevt_puv3_osmr0); + ckevt_puv3_osmr0.max_delta_ticks =0x7fffffff ; ckevt_puv3_osmr0.min_delta_ns =clockevent_delta2ns (MIN_OSCR_DELTA *2 , &ckevt_puv3_osmr0) +1 ; + ckevt_puv3_osmr0.min_delta_ticks =MIN_OSCR_DELTA *2 ; ckevt_puv3_osmr0.cpumask =cpumask_of (0 );setup_irq (IRQ_TIMER0 , &puv3_timer_irq);
Signature · 1 line
2.12.0
Re: [PATCH] unicore32/time: set ->min_delta_ticks and ->max_delta_ticks
Quoted 9 lines
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 unicore32 arch's clockevent driver initialize these fields properly.
Quoted 7 lines
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 <[email protected]>
Thanks,
Quoted 44 lines
---
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.gitcev-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/timearch/unicore32/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+)arch/unicore32/kernel/time.c +2
-1@@ -91,8 +91,10 @@ void __init time_init(void) ckevt_puv3_osmr0.max_delta_ns =clockevent_delta2ns (0x7fffffff , &ckevt_puv3_osmr0); + ckevt_puv3_osmr0.max_delta_ticks =0x7fffffff ; ckevt_puv3_osmr0.min_delta_ns =clockevent_delta2ns (MIN_OSCR_DELTA *2 , &ckevt_puv3_osmr0) +1 ; + ckevt_puv3_osmr0.min_delta_ticks =MIN_OSCR_DELTA *2 ; ckevt_puv3_osmr0.cpumask =cpumask_of (0 );setup_irq (IRQ_TIMER0 , &puv3_timer_irq); --2.12.0
PATCH 1/1 x86/lguest/timer: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 lguest 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.
---
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
arch/x86/lguest/boot.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/lguest/boot.c +2 -0
@@ -994,7 +994,9 @@ static struct clock_event_device lguest_clockevent = { .mult = 1, .shift = 0, .min_delta_ns = LG_CLOCK_MIN_DELTA, + .min_delta_ticks = LG_CLOCK_MIN_DELTA, .max_delta_ns = LG_CLOCK_MAX_DELTA, + .max_delta_ticks = LG_CLOCK_MAX_DELTA, };/*
Signature · 1 line
2.12.0
Re: [PATCH] x86/lguest/timer: set ->min_delta_ticks and ->max_delta_ticks
Quoted 6 lines · Nicolai Stange
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.
Quoted 8 lines
Make the x86 arch's lguest 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.
Quoted 43 lines
Signed-off-by Nicolai Stange <[email protected]>---
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.gitcev-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/timearch/x86/lguest/boot.c | 2 ++ 1 file changed, 2 insertions(+)arch/x86/lguest/boot.c +2
-0@@ -994,7 +994,9 @@ static struct clock_event_device lguest_clockevent = { .mult = 1, .shift = 0, .min_delta_ns = LG_CLOCK_MIN_DELTA, + .min_delta_ticks = LG_CLOCK_MIN_DELTA, .max_delta_ns = LG_CLOCK_MAX_DELTA, + .max_delta_ticks = LG_CLOCK_MAX_DELTA, };/* Signature · 1 line
2.12.0
PATCH 1/1 x86/uv/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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.
Currently, the x86's uv rtc clockevent device is initialized as follows:
clock_event_device_uv.min_delta_ns = NSEC_PER_SEC /
sn_rtc_cycles_per_second;
clock_event_device_uv.max_delta_ns = clocksource_uv.mask *
(NSEC_PER_SEC / sn_rtc_cycles_per_second);This translates to a ->min_delta_ticks value of 1 and a ->max_delta_ticks value of clocksource_uv.mask.
Initialize ->min_delta_ticks and ->max_delta_ticks with these values respectively.
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.
---
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
arch/x86/platform/uv/uv_time.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/platform/uv/uv_time.c +2 -0
@@ -390,9 +390,11 @@ static __init int uv_rtc_setup_clock(void) clock_event_device_uv.min_delta_ns =NSEC_PER_SEC / sn_rtc_cycles_per_second; + clock_event_device_uv.min_delta_ticks =1 ; clock_event_device_uv.max_delta_ns = clocksource_uv.mask * (NSEC_PER_SEC / sn_rtc_cycles_per_second); + clock_event_device_uv.max_delta_ticks = clocksource_uv.mask; rc =schedule_on_each_cpu (uv_rtc_register_clockevents);if (rc) {
Signature · 1 line
2.12.0
PATCH 1/1 x86/xen/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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.
---
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
arch/x86/xen/time.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/xen/time.c +4 -0
@@ -209,7 +209,9 @@ static const struct clock_event_device xen_timerop_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,
@@ -268,7 +270,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,
Signature · 7 lines
2.12.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 1/1 x86/xen/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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.
---
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
arch/x86/xen/time.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/xen/time.c +4 -0
@@ -209,7 +209,9 @@ static const struct clock_event_device xen_timerop_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,
@@ -268,7 +270,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,
Signature · 1 line
2.12.0
Re: [PATCH] x86/xen/time: set ->min_delta_ticks and ->max_delta_ticks
Quoted 8 lines · Nicolai Stange
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.
Quoted 7 lines
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 <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH] x86/xen/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeQuoted 8 lines · Nicolai Stange
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.
Quoted 7 lines
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 <[email protected]>
Juergen Gross
maintainerRe: [PATCH] x86/xen/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeQuoted 8 lines · Nicolai Stange
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.
Quoted 7 lines
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 <[email protected]>
Shall I carry this patch through the Xen tree or will it be processed via the tip tree? I'm fine with both variants.
Juergen
Quoted 41 lines
---
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.gitcev-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/timearch/x86/xen/time.c | 4 ++++ 1 file changed, 4 insertions(+)arch/x86/xen/time.c +2
-0@@ -209,7 +209,9 @@ static const struct clock_event_device xen_timerop_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,
arch/x86/xen/time.c static const struct clock_event_device xen_vcpuop_clockevent = { · line 278
Quoted 9 lines
arch/x86/xen/time.c +2
-0@@ -268,7 +270,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,
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Juergen Gross
maintainerRe: [PATCH] x86/xen/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeQuoted 8 lines · Nicolai Stange
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.
Quoted 7 lines
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 <[email protected]>
Shall I carry this patch through the Xen tree or will it be processed via the tip tree? I'm fine with both variants.
Juergen
Quoted 50 lines
---
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.gitcev-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/timearch/x86/xen/time.c | 4 ++++ 1 file changed, 4 insertions(+)arch/x86/xen/time.c +4
-0@@ -209,7 +209,9 @@ static const struct clock_event_device xen_timerop_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,@@ -268,7 +270,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,
Re: [PATCH] x86/xen/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeQuoted 8 lines · Nicolai Stange
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.
Quoted 7 lines
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 <[email protected]>
Applied to xen/tip for-linus-4.12
Thanks,
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH] x86/xen/time: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeQuoted 8 lines · Nicolai Stange
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.
Quoted 7 lines
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 <[email protected]>
Applied to xen/tip for-linus-4.12
Thanks,
Juergen
PATCH 1/1 clockevents/drivers/dw_apb: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 dw_apb 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.
---
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/dw_apb_timer.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clocksource/dw_apb_timer.c +2 -0
@@ -257,7 +257,9 @@ dw_apb_clockevent_init(int cpu, const char *name, unsigned rating,clockevents_calc_mult_shift (&dw_ced->ced, freq,APBT_MIN_PERIOD ); dw_ced->ced.max_delta_ns =clockevent_delta2ns (0x7fffffff , &dw_ced->ced); + dw_ced->ced.max_delta_ticks =0x7fffffff ; dw_ced->ced.min_delta_ns =clockevent_delta2ns (5000 , &dw_ced->ced); + dw_ced->ced.min_delta_ticks =5000 ; dw_ced->ced.cpumask =cpumask_of (cpu); dw_ced->ced.features =CLOCK_EVT_FEAT_PERIODIC |CLOCK_EVT_FEAT_ONESHOT |CLOCK_EVT_FEAT_DYNIRQ ;
Signature · 1 line
2.12.0
Re: [PATCH] clockevents/drivers/dw_apb: set ->min_delta_ticks and ->max_delta_ticks
Quoted 8 lines · Nicolai Stange
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
dw_apbclockevent driver initialize these fields properly.
Quoted 7 lines
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 <[email protected]>
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH 1/1 clockevents/drivers/metag: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 metag_generic 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.
---
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/metag_generic.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clocksource/metag_generic.c +2 -0
@@ -114,7 +114,9 @@ static int arch_timer_starting_cpu(unsigned int cpu) clk->mult =div_sc (hwtimer_freq,NSEC_PER_SEC , clk->shift); clk->max_delta_ns =clockevent_delta2ns (0x7fffffff , clk); + clk->max_delta_ticks =0x7fffffff ; clk->min_delta_ns =clockevent_delta2ns (0xf , clk); + clk->min_delta_ticks =0xf ; clk->cpumask =cpumask_of (cpu);clockevents_register_device (clk);
Signature · 1 line
2.12.0
Re: [PATCH] clockevents/drivers/metag: set ->min_delta_ticks and ->max_delta_ticks
Quoted 8 lines · Nicolai Stange
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
metag_genericclockevent driver initialize these fields properly.
Quoted 8 lines
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 <[email protected]>---
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH 1/1 x86/numachip timer: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 numachip 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.
---
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/numachip.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clocksource/numachip.c +2 -0
@@ -51,7 +51,9 @@ static struct clock_event_device numachip2_clockevent = { .mult = 1, .shift = 0, .min_delta_ns = 1250, + .min_delta_ticks = 1250, .max_delta_ns = LONG_MAX, + .max_delta_ticks = LONG_MAX, };static void numachip_timer_interrupt (void )
Signature · 1 line
2.12.0
Re: [PATCH] x86/numachip timer: set ->min_delta_ticks and ->max_delta_ticks
Quoted 8 lines · Nicolai Stange
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 numachip clockevent driver initialize these fields properly.
Quoted 8 lines
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 <[email protected]>---
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH 1/1 clockevents/drivers/sh_cmt: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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 sh_cmt 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.
---
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.
Attention: due to 890f423b2666 ("clocksource: sh_cmt: Compute rate before registration again"), this should go through 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/sh_cmt.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clocksource/sh_cmt.c +2 -0
@@ -815,7 +815,9 @@ static int sh_cmt_register_clockevent(struct sh_cmt_channel *ch, ced->shift =32 ; ced->mult =div_sc (ch->cmt->rate,NSEC_PER_SEC , ced->shift); ced->max_delta_ns =clockevent_delta2ns (ch->max_match_value, ced); + ced->max_delta_ticks = ch->max_match_value; ced->min_delta_ns =clockevent_delta2ns (0x1f , ced); + ced->min_delta_ticks =0x1f ;dev_info (&ch->cmt->pdev->dev,"ch%u: used for clock events\n" , ch->index);
Signature · 1 line
2.12.0
Re: [PATCH] clockevents/drivers/sh_cmt: set ->min_delta_ticks and ->max_delta_ticks
Quoted 8 lines · Nicolai Stange
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
sh_cmtclockevent driver initialize these fields properly.
Quoted 8 lines
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 <[email protected]>---
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH 1/1 clockevents/drivers/atlas7: set ->min_delta_ticks and ->max_delta_ticks
In reply to Nicolai StangeIn 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.
---
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(+)
drivers/clocksource/timer-atlas7.c +2 -0
@@ -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;
Signature · 1 line
2.12.0
Re: [PATCH] clockevents/drivers/atlas7: set ->min_delta_ticks and ->max_delta_ticks
Quoted 8 lines · Nicolai Stange
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.
Quoted 8 lines
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 <[email protected]>---
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog